Sign in

Publish your first doc in 60 seconds

·2 min read

Publish your first doc in 60 seconds

Three commands. Tops.

1. Install the CLI

npm install -g @opendocs.cc/cli

Node 18+. That's the only prerequisite.

2. Log in

Generate an API key in your account settings, then:

opendocs login --key <your-key>

Your credentials land in ~/.config/opendocs/config.json and stay there. You'll only do this once per machine.

3. Publish

opendocs publish my-doc.md

You get back:

Published: my-doc
  URL: https://opendocs.cc/your-workspace/my-doc
  Visibility: workspace

The URL is live. Click it. Done.

What just happened

OpenDocs did more than upload a file:

  • Title extracted from your first # H1 heading. If there isn't one, the CLI errors before upload.
  • Slug generated from that title — # My New Feature Spec/my-new-feature-spec. Override with --slug any-slug-you-want if you need to.
  • Images rehosted. Local ![](./screenshot.png) paths are uploaded alongside the Markdown, and the body is rewritten to point at the public URLs so readers don't see broken images.
  • Version recorded. Every publish (and every later update) increments the version number. OpenDocs keeps the history on the server; opendocs pull <id-or-slug> downloads the current Markdown back to disk.
  • Visibility set. Defaults to workspace — your team sees it, the public doesn't. Pass --visibility public --confirm-public to make it world-readable.

Publishing in bulk

Got a directory of docs? Give the CLI all of them at once:

opendocs publish docs/*.md

The CLI chunks them into batches of 25, uploads, and prints a summary per file. One invocation can handle up to 500 Markdown files, so publishing a whole docs folder or Obsidian vault is still one command.

Telling an AI agent to publish

OpenDocs ships with an agent reference built into the CLI. Run opendocs agent for the short version, opendocs agent --full for the full SKILL.md, or let your agent call it directly. Then you can say things like:

"Publish ./architecture.md as a workspace draft. Tag it architecture and review."

…and the agent runs the right opendocs publish incantation, including the --confirm-public guardrail when you ask for a public doc. We've tested this with Claude Code, Cursor, Cline, Codex, Aider, Copilot, and OpenClaw — agent-agnostic, since it's just Markdown instructions in a file.

Updating a published doc

Edit the file, then:

opendocs update my-doc.md --post-id <id>

Same URL, new version. Readers who had the link bookmarked see the new content immediately. You can flip visibility or retag without re-uploading the body:

opendocs visibility my-doc public --confirm-public
opendocs update my-doc.md --post-id <id> --tags release-notes,q2

The other commands, one-liner each

Command What it does
opendocs list List your published posts
opendocs get <id-or-slug> Fetch metadata: title, URL, version, visibility
opendocs pull <id-or-slug> Download the raw Markdown back to disk
opendocs unpublish <id> Hide the doc (keeps history, reversible)
opendocs delete <id> Permanently remove (destructive, confirm required)
opendocs export <id> Generate PDF or DOCX to disk
opendocs whoami Sanity-check your logged-in user + active workspace
opendocs workspace list / use Switch between workspaces you belong to

Full flag reference lives at docs.opendocs.cc.


Next → Workspaces, teams, and sharing

Last updated April 25, 2026 at 9:27 AM UTC.