The mdm CLI

Read and write your documents from any terminal. mdm doc get prints raw markdown to stdout, so a shell-capable agent can pipe a doc straight into its context.

Install

Build the mdm binary from the md-manager repository (needs Rust):

terminal
cargo install --path apps/cli   # installs the 'mdm' command
Don't want to install anything? Most agents connect over MCP instead — no build required.

Sign in

Point the CLI at this instance and your key (from Settings → API Keys). Saved to ~/.config/md-manager/config.json.

terminal
mdm auth login --api-url https://mdm-api.nimy.work --api-key mk_live_…
mdm whoami     # confirm your identity (org + role)

Read & write documents

terminal
# find before you create
mdm search "deployment runbook"
mdm proj list

# read a document (raw markdown → stdout); add --json for metadata
mdm doc get 019f0e…
mdm doc get-path --project handbook --path runbooks/deploy

# create / update
mdm doc create --project handbook --path runbooks/deploy \
  --title "Deploy" -m "# Deploy\n1. Tag the release\n2. Ship"
mdm doc edit 019f0e… -m "# Deploy (updated)"
mdm doc append 019f0e… -m "\n## Rollback\n…"
mdm doc mv 019f0e… runbooks/deploy-v2

# history + restore
mdm doc history 019f0e…
mdm doc restore 019f0e… --version 3

Organize

terminal
mdm tag add 019f0e… runbook   &&  mdm tag docs runbook
mdm cat create --slug ops --name Ops
mdm search "rollback" --mode hybrid    # keyword, semantic, or hybrid
For agents: data goes to stdout, logs to stderr, and mdm doc get is raw markdown — perfect for piping into a prompt. Run mdm --help for everything else, and grab the ready-made agent instructions on the overview.