Cursor
Cursor's agent mode can write files, run terminal commands, and work across your entire project. When it generates specs, migration plans, API docs, or implementation notes, OpenDocs turns them into shareable URLs in one step.
Setup
Install the CLI and authenticate:
npm install -g @opendocs.cc/cli
opendocs login
Cursor supports project-level rules via .cursorrules files. You can either add the OpenDocs SKILL.md content to your .cursorrules file or reference it in a prompt when you need documentation.
Example prompts
Publish a new doc:
Write a checkout API reference in Markdown, publish it with
OpenDocs, and give me the final URL.
Publish from existing code:
Read the auth middleware in src/middleware/auth.ts and generate
a Markdown reference doc for it. Publish it to OpenDocs with
the slug "auth-middleware" and return the URL.
Update a published doc:
Pull post abc123 from OpenDocs, add documentation for the new
/webhooks endpoint, and publish the update.
Publish with tags:
Write a migration guide for the v3 API changes as Markdown.
Publish it with tags "migration, api, v3" and return the link.
Common workflows
Code-to-docs
Cursor has full context of your codebase, which makes it effective at generating documentation from source code:
Look at the files in src/routes/ and generate a Markdown API
reference covering every endpoint, its method, path, request
body, and response. Publish it to OpenDocs.
opendocs publish api-reference.md --slug api-reference --tags "api,reference" --json
PR documentation
After completing a feature branch, ask Cursor to document what changed:
Summarize all the changes on this branch as a Markdown doc.
Include what was added, what was changed, and any breaking
changes. Publish it to OpenDocs so I can link it in the PR.
Internal runbooks
Use Cursor to generate operational docs that live outside the repo:
Write a deployment runbook for the payments service covering
prerequisites, steps, rollback, and monitoring. Publish it to
OpenDocs with workspace visibility.
Why --json matters for Cursor
Cursor's agent mode handles structured output better than terminal formatting. When you use --json, the output is a clean JSON object:
{
"postId": "abc123",
"url": "https://opendocs.cc/yourname/checkout-api-reference",
"slug": "checkout-api-reference",
"title": "Checkout API Reference"
}
Cursor can parse this and include the URL directly in its response, or store the postId for follow-up updates.
Tips
- Use
.cursorrules— add the OpenDocs workflow to your project rules so Cursor remembers it across chat sessions - Always use
--json— Cursor parses structured output reliably - Leverage code context — Cursor can read your source files and generate accurate documentation from them, unlike tools that only have terminal access
- Combine with edits — "implement the endpoint AND publish the docs" works as a single Cursor task