Skip to content

dohwi/docmost-cli

Repository files navigation

🖥️ docmost-cli

Command-line interface for Docmost — the open-source collaborative wiki

Go License: MIT CI Release

Installation · Quick Start · Commands · Security · Contributing


✨ Features

  • 90+ API endpoints — pages, spaces, comments, search, shares, groups, files, workspace, favorites, notifications, sessions
  • Agent-friendly--json, --no-retry, structured error codes, exit codes, no interactive prompts
  • Secure by default — Bearer auth, --password-stdin, SHA256-verified install & self-update
  • Resilient — 30s timeout, exponential-backoff retry with jitter, Ctrl-C cancellation
  • Path-traversal safefiles download and export reject paths containing ..
  • Self-updatedocmost update checks and upgrades from GitHub Releases
  • Shell completiondocmost completion [bash|zsh|fish|powershell]
  • Community Edition — targets the open-source Docmost CE release

📦 Installation

One-liner (recommended):

curl -fsSL https://raw.githubusercontent.com/dohwi/docmost-cli/main/install.sh | bash

The installer downloads the release tarball for your platform, verifies its SHA256 checksum, and adds docmost to your shell PATH.

Manual download: grab a tarball from GitHub Releases and place the binary on your PATH.

Platforms: linux/amd64, linux/arm64, macos/intel, macos/apple, windows/amd64, windows/arm64


🚀 Quick Start

# Interactive login (reads password from stdin)
docmost login --url https://docs.example.com --email admin@example.com --password-stdin

# Agent / CI login (env vars, no flags in process list)
DOCMOST_URL=https://docs.example.com \
DOCMOST_EMAIL=admin@example.com \
DOCMOST_PASSWORD=secret \
docmost login

# Start using
docmost whoami --json
docmost pages list --limit 10
docmost search pages --query "deployment"

📋 Commands

Category Commands
Pages (25) list · get · create · update · delete · restore · move · move-to-space · duplicate · recent · created-by-user · trash · history · history-info · sidebar · breadcrumbs · labels · labels-add · labels-remove · backlinks · backlinks-count · bulk-update · watch · unwatch · watch-status
Spaces (14) list · get · create · update · delete · members · members-add · members-remove · members-role · permissions · watch · unwatch · watch-status · watched
Comments (5) list · get · create · update · delete
Search (3) pages · suggest · share-search
Favorites (3) add · remove · list
Notifications (4) list · unread-count · mark-read · mark-all-read
Shares (6) list · create · update · delete · info · page-info
Groups (8) list · get · create · update · delete · members · members-add · members-remove
Files (5) upload · download · info · upload-image · remove-icon
Sessions (3) list · revoke · revoke-all
Workspace (7) settings · update · members · invite · member-role · member-deactivate · search-index
Export / Import (5) export page · export space · import page · import zip · tasks
User (2) me · update
Auth & System login · logout · whoami · update · setup · health · liveness · version · config · completion

🔒 Security

  • All API requests use Authorization: Bearer <token> (no cookie leakage)
  • --password flag hidden from help; use --password-stdin or DOCMOST_PASSWORD env var
  • install.sh and docmost update verify SHA256 checksums before replacing the binary
  • files download and export reject paths containing ..
  • Verbose mode masks tokens as *** (N chars)
  • See SECURITY.md for vulnerability reporting

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-change
  3. Make your changes with clear, focused commits
  4. Ensure go vet ./... and go test ./... pass
  5. Open a pull request

Commit messages follow <type>: <description> — see AGENTS.md for details.


📄 License

MIT © dohwi

About

CLI for Docmost — the open-source collaborative wiki

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors