The Dosu CLI is the dosu command, published on npm as @dosu/cli. It connects your local coding agents to Dosu so they pull relevant team knowledge into context automatically and can save what they learn back to the knowledge base. This page covers what the CLI does, how to install it, and how to use it.
What the CLI does#
The CLI sets up the Dosu MCP Server for the coding agents you already run, so an agent can query your Libraries on demand (the init_knowledge, search_documentation, ask, and save_topic tools). See Dosu MCP Server for what the server exposes.
The MCP Server gives your agent tools to query Dosu when it decides it needs knowledge, letting you and your agent pull relevant context from your Libraries on demand.
Prerequisites#
- A Dosu account and at least one Library with Sources connected. Create one at Libraries.
- A deployment API key for authentication. The CLI uses a long-lived deployment API key (the same key the MCP Server uses), which avoids session token expiry during long agent runs. Manage keys in Settings, Account, API keys.
Install and connect#
Run the guided setup:
curl -fsSL https://cli.dosu.dev/install | sh
Setup detects the coding agents installed on your machine (Claude Code, Cursor, VS Code, and others) and lets you choose which ones to connect to the Dosu MCP Server. It also installs the Dosu skill, a set of agent instructions that tell the agent how to use Dosu well, and keeps skills up-to-date when you upgrade.
If your organization has no GitHub repositories connected yet, setup will warn you that the MCP Server can't answer questions from your code and offer to connect a repository. You can connect one immediately through the setup flow or skip and connect later via the Libraries page or by re-running dosu setup.
To connect an agent that was not auto-detected, add it by name:
dosu mcp add <agent>
Updating the CLI#
To update Dosu to the latest version, run:
dosu upgrade
When you run dosu upgrade, it automatically refreshes the Dosu agent skills after the upgrade completes. If skill refresh fails, you can manually retry with dosu skill update.
Using the Dosu MCP Server#
Once connected, your agent can use the Dosu MCP Server tools to query your Libraries. The agent decides when to call these tools based on your prompts and its needs:
init_knowledge— Initialize a knowledge session for the current context.search_documentation— Search across your Libraries for relevant documentation.ask— Ask a question and get an answer from your team's knowledge base.save_topic— Save new learnings back to your Library when the agent discovers something worth documenting.
Your agent can access these tools directly through the MCP Server once it's configured. You don't need to do anything special to enable them beyond the initial setup.
Availability and notes#
- The Dosu MCP Server works with coding agents that support the Model Context Protocol, including Claude Code, Cursor, VS Code with Cline, and others. Use
dosu setupordosu mcp addto configure your agent. - The MCP Server reads from the Libraries your deployment can access. Connect Sources in a Library first so there is knowledge to query. See Sources.
- Usage tied to MCP queries counts toward your plan. For current plans and limits, see plans, billing, and access or Settings, Organization, Billing.