Write and manage Markdown from the CLI
The official CLI for mdedit.ai. Manage workspaces, folders, documents, and existing API keys without leaving your terminal.
npm install -g mdedit-cli
Terminal-native Markdown writing workflows
Write in the app, script from the terminal, and export wherever you publish.
Edit documents from anywhere
Create, inspect, and update content without context switching. Upload markdown from a file or stdin, then keep editing in the web app when you want.
Export and integrate
Pull markdown for pipelines, export ZIPs for sharing, and wire mdedit.ai into your docs workflow.
Automation-friendly when you need it
Readable output for humans, and a clean JSON mode for scripts and agent workflows when you want to pipe results elsewhere.
--format json.Get started
Authenticate once, set a default workspace, and you’re ready to go. Get an API key.
mdedit config login --api-key <KEY>
mdedit workspace list
mdedit config use-workspace <workspaceId>
mdedit info
Document workflows
Copy/paste friendly examples for the most common workflows. See the full CLI docs for every flag and option.
Read & export documents
List, inspect metadata, or pull markdown for piping.
mdedit document list
mdedit document get <documentId>
mdedit document get <documentId> --content-only
mdedit document export <documentId> --output ./document.zip
Edit documents
Create and update content from your terminal.
mdedit document create
mdedit document update <documentId> --title "New title"
mdedit document update <documentId> --archive
mdedit document update <documentId> --pin
mdedit document update <documentId> --file ./document.md
Full CLI reference in the docs
Every command, flag, and configuration option is documented in the mdedit.ai docs.
Open CLI docsWorking with an AI agent instead?
The mdedit.ai MCP server gives Claude Code and other MCP clients twenty tools for reading, editing, reviewing, and publishing documents.
Last updated
Ready to write with confidence?
Free to start. Your files stay Markdown.
Join 9300+ writers publishing with mdedit.ai.