AgentDock

1.7k
Dock Agent Api
CLI Reference

CLI Reference

The agentdock CLI. 46 commands across documents, folders, citation library, and collections, with human-readable output for terminals and JSON for agents and CI.

The agentdock CLI wraps the same workspace as the REST API. It is built for terminals, shell scripts, and CI, and it covers 46 commands across documents, folders, a citation library, and collections, plus login and configuration.

npm i -g agentdockai
agentdock login
agentdock whoami

login opens your browser; whoami confirms the stored token. If you already have a key, set it directly with agentdock config set-token ak_usr_YOUR_TOKEN.

CommandDoes
agentdock loginLog in through your browser
agentdock logoutClear the stored token locally (the key stays valid server-side until you revoke it)
agentdock whoamiVerify the stored token and show the authorized user
agentdock tokenShow the current token info
agentdock mcp-setupPrint the MCP config JSON for your MCP client
agentdock config set-url <url>Set the API base URL
agentdock config set-token <token>Set the auth token

The docs group is the core: 24 commands covering content, suggestions, citations, prompts, and versions.

CommandDoes
docs listList your documents
docs read <id>Read a document (markdown by default; --format json or nodes)
docs write <id> <file>Write a markdown file into a document
docs createCreate a new blank document (--title optional)
docs title <id> <title>Update a document's title
docs duplicate <id>Copy a document
docs publish <id>Publish a document (--slug, --seo-title, --seo-description, --unlisted)
docs unpublish <id>Revert a published document to a draft
docs import-url <url>Import a web page as a new document
docs delete <id>Delete a document
docs suggest <id> <find> <replace>Propose a tracked change for review
docs suggestions <id>List pending suggestions on a document
docs accept-suggestion <id> <sid>Accept a pending suggestion
docs reject-suggestion <id> <sid>Reject a pending suggestion
docs move <id> <folder-id>Move a document to a folder (use root for none)
docs cite <id> <identifier>Add a citation by DOI, URL, PMID, or arXiv ID
docs citations <id>List the citations in a document
docs remove-citation <id> <citation-id>Remove a citation from a document
docs search-citations <query>Search academic sources to cite
docs promptsList your prompts
docs prompt <promptId>Read a specific prompt
docs set-citation-style <id> <style>Set the citation style (APA, MLA, Chicago, Harvard, IEEE, AMA, Vancouver)
docs versions <id>List a document's version history
docs version <id> <versionId>Read a specific version's content

CommandDoes
docs folders listList your document folders
docs folders create <name>Create a folder
docs folders rename <folderId> <name>Rename a folder
docs folders delete <folderId>Delete a folder (its documents move to the root)

CommandDoes
docs library listList citations in your library
docs library get <citationId>Read a single saved citation
docs library save <title>Save a citation to your library
docs library search <query>Search your citation library
docs library format <title>Format a citation in a style (preview, no save)
docs library delete <citationId>Delete a citation from your library

CommandDoes
docs collections listList your citation collections
docs collections create <name>Create a collection
docs collections add <collectionId> <citationId>Add a citation to a collection
docs collections remove <collectionId> <citationId>Remove a citation from a collection
docs collections delete <collectionId>Delete a collection

Every command prints readable output for a person at a terminal. For an agent or a CI job, ask for structured output instead. On docs read, that means --format json:

# Human: readable markdown
agentdock docs read abc123
 
# Agent: structured JSON to parse
agentdock docs read abc123 --format json

This is what makes the CLI usable from inside a pipeline: a person reads the formatted result, and a script parses the JSON. The same command serves both.