Skip to main content

CLI quickstart

This is the manual path. It is also the foundation for agent workflows, because agents ultimately call the same CLI under the hood.

1. Install the CLI

npm install -g @opendocs.cc/cli

2. Create an account and API key

  1. Sign up at opendocs.cc/signup.
  2. Complete onboarding by choosing a username and workspace.
  3. Open Dashboard -> API Keys.
  4. Create a key that starts with od_live_.

3. Log in

Pass the key directly:

opendocs login --key od_live_xxxxx

Or export it first:

export OPENDOCS_API_KEY=od_live_xxxxx
opendocs login

The CLI validates the key against https://api.opendocs.cc by default and saves your config locally.

4. Check who you are logged in as

opendocs whoami

You should see your username, workspace, and API URL.

5. Publish your first Markdown file

opendocs publish plan.md

If plan.md contains a first-level heading, OpenDocs uses that as the title by default. The command returns a stable URL such as:

opendocs.cc/yourteam/plan

A more explicit first publish

opendocs publish plan.md \
--title "Q2 rollout plan" \
--slug q2-rollout-plan \
--visibility workspace \
--tags roadmap,q2-2026

Use JSON when scripting

opendocs publish plan.md --json

Example response:

{
"postId": "abc123",
"slug": "q2-rollout-plan",
"url": "/yourteam/q2-rollout-plan",
"title": "Q2 rollout plan"
}

Helpful commands after login

opendocs list
opendocs get <postId>
opendocs pull <postId>
opendocs update plan.md --post-id <postId>

Local config

The CLI stores auth config at:

~/.config/opendocs/config.json

Next steps