Skip to content
Help Center
  • Create Your First Citation
  • Find Your Documents and Sources
  • Edit and Format Your Document
  • Write and Revise with the AI Assistant
  • Add and Review Citation Sources
  • Insert Citations into Your Writing
  • Choose a Citation Style and Bibliography
  • APA 7 Citation Guide
  • MLA 9 Citation Guide
  • Chicago 18 Citation Guide
  • Review Your Writing and Evidence
  • Check Citation Links and Metadata
  • Review Public Web Matches
  • Organize Research Files and Folders
  • Import an Existing Writing Draft
  • Export Documents and References
  • Share a Document and Choose Access
  • Review Comments and Document History
  • Manage Workspace Members and Roles
  • Use the Citation Developer API
  • Connect Research and Writing Tools
  • Import References from Zotero
  • Use Citation with Google Docs
  • Use Citation with Microsoft Word
  • Use Citation References in Overleaf
  • Use Citation with Obsidian Notes
  • Connect the Citation MCP Server
  • Install and Use the Citation CLI
  • Install Citation Agent Skills
  • Automate Documents and References
  • Set Up Citation with Zapier
  • Set Up Citation with Make
  • Set Up Citation with n8n
  • Set Up Citation with Gumloop
  • Manage Your Citation Account
  • Understand Free Access and Usage
  • Troubleshoot Your Citation Workflow
Help CenterGuidesTrust CenterContact support
Integrations/Install and Use the Citation CLI
Help Center
Get started

Install and Use the Citation CLI

Install the CLI

Version 0.1.0 requires Node.js 22 or later and npm. Download the package, then run the install command from its folder. This is a local package, not an npm registry release. Installation downloads its pinned MCP client dependency.

Install from the repository Run these commands from the Citation repository root. From the Citation repository root npm pack ./packages/cli --ignore-scripts npm install --global ./citation-cli-0.1.0.tgz citation --help

For a project installation, run npm install ./citation-cli-0.1.0.tgz and invoke ./node_modules/.bin/citation from that project.

npm install --global ./citation-cli-0.1.0.tgz
citation --help
citation --version
Download CLI

Connect your workspace

Create a personal token in MCP connections for the workspace and scopes you need. The production server is https://citation.co/mcp. For a local or self hosted server, use the exact configured address in settings.

Run citation auth login, paste your token at the hidden prompt, then press Enter. Citation uses its published server address automatically. For scripts, use CITATION_TOKEN or add --token-stdin for piped input. Keep tokens out of command arguments and agent prompts.

Login verifies access and saves the credential in a private plaintext configuration file, not an operating system keychain. To avoid saving a credential, set CITATION_ENDPOINT and CITATION_TOKEN for the process without running login.

Each token authorizes one workspace. Use citation workspace use WORKSPACE_ID to select and verify it. A different workspace requires another token.

citation auth login
citation documents list
citation auth status --json
citation documents list --limit 10 --json
Create a personal tokenMCP setup

Work with documents and sources

Commands show readable results by default. Add --json for complete structured output, including editor content needed for rich edits. Replace DOCUMENT_ID, VERSION and other placeholders with returned values. Use --all to read every page. Bibliographies and citation reviews stop if the document or sources change during pagination, so you can rerun the command for a consistent result.

Read Read saved work citation documents list --query "research" --all --json citation documents read DOCUMENT_ID --content --all --json citation sources list DOCUMENT_ID --all --json

Write Save a requested change citation 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 --json

Cite Use saved source metadata citation sources add DOCUMENT_ID --file source.json --json citation references format DOCUMENT_ID --style apa --all --json citation citations check DOCUMENT_ID --all --json

Export Export a bibliography citation documents export DOCUMENT_ID \ --format bibtex --output references.bib --json

Source files contain a title, publication type and CSL metadata. Editor files contain the document’s rich content object, not the whole read response. Preserve existing nodes, formatting and citation IDs. Plain text intentionally replaces rich content.

Citation checks inspect saved metadata and links. They do not prove originality, verify every claim or search the public web. The CLI does not expose sharing, invitations or deletion.

Save and retry changes

Read the latest document version before editing. Saves require that version, and conflicting edits are rejected. Source updates use the source’s own version hash.

Every mutation accepts --request-id UUID. The CLI generates one when omitted and includes it in the result or a connection error. It does not retry writes automatically. After an uncertain response, retry with the same ID and input. Use a new ID for a new change.

Results go to standard output. Errors go to standard error with a nonzero exit code. Exports support TXT, BibTeX and RIS, check all chunks and refuse to overwrite an existing file.

Full command guide and file schemas

Remove access

Run citation auth logout to remove the saved token from this computer. Revoke the token in MCP connections to end server access. Clear any CITATION_TOKEN value still present in your environment separately.

PreviousConnect the Citation MCP ServerNextInstall Citation Agent Skills
  • Install the CLI
  • Connect your workspace
  • Work with documents and sources
  • Save and retry changes
  • Remove access

Cookies keep Citation working. You choose the optional ones. Read our cookie policy