A command away
Search your workspace and read a saved draft with its sources, right from your terminal.
Find documents, revise drafts, and format references from your terminal. Bring the same work into your scripts with structured JSON results.
Search your workspace and read a saved draft with its sources, right from your terminal.
Use structured results in scripts, with clear errors and predictable exit codes.
Export document text or a bibliography for the next step in your research.
npm install --global ./citation-cli-0.1.0.tgz
citation --help
citation --versionnpm pack ./packages/cli --ignore-scripts
npm install --global ./citation-cli-0.1.0.tgz
citation --help# Set CITATION_TOKEN through your secret manager.
citation auth login \
--endpoint https://citation.co/mcp
citation workspace list --jsoncitation auth status --json
citation documents list --limit 10 --jsonUse Node.js 22 or later and npm. Download version 0.1.0, then run Install from the package folder. Connect with a scoped token from MCP connections.
Agents that can run terminal commands can use the CLI, including Kimi, Codex, Claude Code, Cursor, GitHub Copilot. In Kimi, use Kimi Code or a Work environment with terminal access.
Create a token for the workspace and permissions you need.
Pass your token through a secret manager or private input.
Check your workspace and permissions before making changes.
Search documents and read saved drafts with their sources.
documents listdocuments readsources listCreate a draft or save an edit with version checks and request IDs.
documents createdocuments updateSave source details, format references and inspect citation links.
sources addreferences formatcitations checkExport saved text as TXT or references as BibTeX and RIS.
documents exportcitation documents list --query "research" --all --json
citation documents read DOCUMENT_ID --content --all --json
citation sources list DOCUMENT_ID --all --jsoncitation documents create --title "Research notes" \
--text-file draft.txt --json
citation documents read DOCUMENT_ID --content --json
citation documents update DOCUMENT_ID --version VERSION \
--content-file revised-content.json --request-id REQUEST_UUID --jsoncitation sources add DOCUMENT_ID --file source.json --json
citation references format DOCUMENT_ID --style apa --all --json
citation citations check DOCUMENT_ID --all --jsoncitation documents export DOCUMENT_ID \
--format bibtex --output references.bib --jsonRead the current version before updating a document. Use editor JSON to preserve formatting and citation nodes. Plain text intentionally replaces rich content. Updates require the version you read.
Every save returns its request ID, including errors after connection attempts. Retry an uncertain save with the same ID and input. The CLI does not retry writes automatically.
Results go to standard output. Errors go to standard error with a nonzero exit code. Exports check every chunk and refuse to overwrite an existing file.
Run citation auth logout to remove the saved token from this computer. Revoke the personal token in Citation settings to end server access, and separately clear any token still present in your environment.
Use Node.js 22 or later and npm. Download the Citation CLI package, then run the install command from the folder containing it.
The download is a local package. Install the downloaded archive using the command above. Installation also downloads its pinned MCP client dependency.
Create a scoped personal token in MCP connections. Provide it through CITATION_TOKEN or private standard input, then use citation auth login to save it locally.
Yes. Set CITATION_ENDPOINT and CITATION_TOKEN for the process without running login. This is useful when your script receives credentials from a secret manager.
Each token authorizes one workspace. Use a token for the workspace you need, then verify it with citation workspace use WORKSPACE_ID.
Export document text as TXT and bibliographies as BibTeX or RIS. The CLI writes the requested file only after checking all export chunks and does not overwrite an existing file.