Skip to main content

Cline

Cline is a VS Code extension that operates autonomously on files in your workspace. It can read and write files, run terminal commands, and chain multi-step tasks. Because it already works with files and shell access, OpenDocs publishing fits naturally into its workflow.

Setup

Install the CLI and authenticate:

npm install -g @opendocs.cc/cli
opendocs login

Cline supports custom instructions that persist across sessions. Add the relevant sections from the OpenDocs SKILL.md to Cline's custom instructions so it remembers the publishing workflow automatically.

Example prompts

Publish a new doc:

Create a v2 migration guide as Markdown, publish it with OpenDocs,
and give me the URL so I can send it to the team.

Document code changes:

Look at the changes in src/services/billing.ts and write a Markdown
doc explaining the new billing logic. Publish it to OpenDocs with
tags "billing, v2" and return the link.

Update an existing doc:

Pull post abc123 from OpenDocs, add the error handling section,
and publish the update. Return the new URL.

Batch documentation:

For each service in src/services/, generate a one-page Markdown
overview explaining what it does, its key functions, and how it
connects to other services. Publish each to OpenDocs with the
tag "architecture" and return all URLs.

Common workflows

Iterative documentation

Cline works well for docs that evolve across multiple sessions. Have it track the postId so updates go to the same URL:

# First publish
opendocs publish v2-migration-guide.md --json
# Returns: { "postId": "abc123", "url": "..." }

# Later update
opendocs update abc123 v2-migration-guide.md --json

Ask Cline to note the postId in its response so you can reference it later:

After publishing, include the postId in your response so I can
ask you to update this doc later.

Documentation from file changes

Cline can detect what files have changed and generate documentation accordingly:

Look at the files I changed today in src/ and write a summary
doc covering what was modified and why. Publish it to OpenDocs.

Workspace-scoped publishing

By default, published docs have workspace visibility — only your team can see them. This makes Cline a good fit for generating internal documentation:

Write an internal architecture overview for the notification
service. Publish it to OpenDocs (workspace visibility is fine)
and share the URL.

For public docs, be explicit:

Write a public-facing changelog for our v2 release. Publish it
to OpenDocs with public visibility and return the URL.

Tips

  • Use custom instructions — Cline retains custom instructions across sessions, so add the OpenDocs workflow once and it persists
  • Track postIds for iterations — Cline is often used across multiple sessions; having the postId lets later sessions update instead of re-publish
  • Use --json — Cline parses structured output cleanly and can extract URLs automatically
  • Let Cline chain steps — Cline is good at autonomous multi-step tasks like "read the code, write the doc, publish it, return the link"