Skip to content
mdedit-cli

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.

terminal
# Install
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.

Prefer scripting? Use --format json.

Get started

Authenticate once, set a default workspace, and you’re ready to go. Get an API key.

terminal
# Authenticate
mdedit config login --api-key <KEY>
# Choose a workspace
mdedit workspace list
mdedit config use-workspace <workspaceId>
# Sanity check
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.

terminal
# List documents (compact table)
mdedit document list
# Get document metadata
mdedit document get <documentId>
# Print markdown only (stdout)
mdedit document get <documentId> --content-only
# Export as a ZIP file
mdedit document export <documentId> --output ./document.zip

Edit documents

Create and update content from your terminal.

terminal
# Create a document (interactive)
mdedit document create
# Update title / archive / pin
mdedit document update <documentId> --title "New title"
mdedit document update <documentId> --archive
mdedit document update <documentId> --pin
# Update content from a file (or use - for stdin)
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 docs

Working 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.

See the MCP server

Last updated

Ready to write

Ready to write with confidence?

Free to start. Your files stay Markdown.

Join 9300+ writers publishing with mdedit.ai.