Skip to content
dosu-aiPublic

About

πŸ” The Dosu CLI Utility

Resources

Stars

14 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

426 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

dosu-cli

Connect Dosu to your AI coding tools. dosu authenticates you, picks a Dosu deployment, and wires the Dosu MCP server into Claude Code, Cursor, Codex, and more β€” plus commands to drive the Dosu platform from your terminal.

npm version CI codecov License: MIT

Quick Start

curl -fsSL https://cli.dosu.dev/install | sh

The interactive wizard authenticates you via browser OAuth, lets you pick a Dosu deployment (or OSS / public-library mode), mints an API key, detects which AI tools you have installed, and writes the Dosu MCP server entry into each one's config. Restart your AI tool and Dosu is available.

Run dosu with no arguments any time to open the interactive menu.

Installation

curl / install (macOS / Linux) (Recommended)

Downloads and installs the latest stable release binary.

curl -fsSL https://cli.dosu.dev/install | sh

To install a specific release tag:

DOSU_INSTALL_VERSION=v0.2.0-rc1 curl -fsSL https://cli.dosu.dev/install | sh

npx / npm

Requires Node.js 22+.

npx @dosu/cli setup

Or install globally:

npm install -g @dosu/cli
dosu setup

Homebrew

brew install dosu-ai/dosu/dosu

The fully qualified name works on every Homebrew version: it taps the repo if needed and, on Homebrew 6.0+, records trust for just the dosu formula. To use tapped short names instead:

brew tap dosu-ai/dosu
brew trust dosu-ai/dosu   # Homebrew 6.0+ only β€” skip on older versions
brew install dosu

Homebrew 6.0+ only (tap trust, since June 2026): third-party taps start untrusted, so short-name installs or upgrades β€” including on machines that tapped dosu-ai/dosu before upgrading Homebrew β€” fail with Error: Refusing to load formula dosu-ai/dosu/dosu from untrusted tap dosu-ai/dosu until a one-time brew trust dosu-ai/dosu (the tap also ships decant). Homebrew 5 and earlier has no trust step and needs none. Tap trust is Homebrew's own consent step, separate from the macOS Gatekeeper warning below β€” Homebrew installs never trigger Gatekeeper.

Manual Download

Download the appropriate archive from the Releases page.

macOS Gatekeeper Warning

When downloading directly from GitHub releases on macOS, you may see:

"Apple could not verify dosu is free of malware that may harm your Mac or compromise your privacy."

This happens because the binary is not signed with an Apple Developer certificate. To bypass this:

# After extracting the archive, remove the quarantine attribute:
xattr -d com.apple.quarantine ./dosu

Or right-click the binary, select "Open", and click "Open" in the dialog.

Note: Installing via Homebrew avoids this issue automatically.

Usage

Core commands

Command Description
dosu Launch the interactive TUI menu
dosu setup Run the setup wizard (auth β†’ deployment β†’ detect tools β†’ configure)
dosu login Authenticate with Dosu via browser OAuth
dosu logout Clear saved credentials
dosu status [--json] Show current authentication and MCP status
dosu upgrade Update Dosu through the package manager that installed it, re-running dosu setup when the update changes agent config
dosu mcp list List supported AI tools
dosu mcp add <tool> Add the Dosu MCP server to a specific tool
dosu mcp refresh Rewrite the Dosu MCP entry in every already-configured tool from the current setup
dosu logs View or manage debug logs (--tail, --clear)
dosu telemetry Manage usage analytics and error diagnostics (status, enable, disable, reset)

dosu mcp add takes -g, --global to install for all projects instead of project-local, and --show-secret to print the full manual config.

dosu upgrade delegates to npm, pnpm, Yarn Classic, or Homebrew only after confirming which manager owns the current installation. Temporary package-runner invocations stay ephemeral, ambiguous or local installs are left unchanged, and standalone binaries receive the latest safe manual download path. After a successful update it hands off to the new version, which re-applies the bundled skills and, only when a configured agent's MCP entry is out of date, runs dosu setup (or the non-interactive dosu mcp refresh without a TTY). An entry is out of date when it doesn't match the shape the current provider code writes. Upgrades done outside dosu upgrade (npm, brew, npx @dosu/cli@latest) get a safety net: on the first command of a new version, the CLI checks each configured provider, silently rewrites only the out-of-date entries, and prompts you to run dosu setup for the rest; the bundled agent skills are always re-applied on the first command after any version change.

Dosu also updates itself automatically. When the update check (every six hours) finds a newer release, npm, pnpm, Yarn Classic, and Homebrew installs start the same package-manager update in a detached background process. The current command runs unchanged, and your next command uses the new version, whose first run applies the skill and MCP refreshes above. Hooks, rules, and the status line still need dosu setup when a release changes them. Background updates never run for npx invocations, standalone binaries, CI, or DOSU_DEV=true. A failed install (for example, a global npm prefix that needs sudo) falls back to the "Run dosu upgrade" notice and is retried after six hours. Turn background updates off with dosu upgrade --auto off (and back on with --auto on), or with DOSU_DISABLE_AUTOUPDATE=1 for a single environment.

Platform commands

Once authenticated against a deployment, you can drive the Dosu platform without leaving the terminal:

Command Description
dosu ask Ask a question and get an AI-generated answer
dosu knowledge Search and browse your knowledge base
dosu docs Manage documents (list, create, update, import, publish)
dosu threads List and manage conversation threads
dosu review Document review workflow for the selected Library, plus review notifications to route a Library's or Agent's reviews to a Slack channel
dosu sources Manage connected data sources (list, connect, create, sync, update)
dosu integrations List and inspect platform integrations (Slack, GitHub, …)
dosu topics List knowledge base topics and their pages
dosu members Invite organization members
dosu org Show organization information
dosu deployments List / show / switch Dosu MCP deployments
dosu analytics View usage statistics
dosu skill Install / update / remove the bundled Dosu agent skills

Run dosu <command> --help for subcommands and flags.

Agent skills

The dosu skill β€” which teaches coding agents how to operate Dosu through this CLI β€” lives in skills/dosu and is embedded in the CLI at build time, so the copy an agent reads always matches the installed CLI version. dosu setup (and dosu skill install) writes it to ~/.agents/skills/dosu, the universal location read by Cursor, Codex, Gemini CLI, Zed, Cline, Copilot, OpenCode, and Antigravity, and symlinks Claude Code's ~/.claude/skills/dosu and Windsurf's ~/.codeium/windsurf/skills/dosu at that copy. After a CLI upgrade, the first command re-applies the skill automatically; dosu skill update does the same on demand. The former standalone dosu-ai/dosu-skill repository is deprecated in favour of this bundle.

To change a skill, edit skills/<name>/… and run bun run embed:skills to regenerate src/generated/skills.ts (a test fails if the two drift).

Supported AI tools

dosu mcp add <id> and the setup wizard support:

ID Tool
claude Claude Code
claude-desktop Claude Desktop
cursor Cursor
vscode VS Code
codex Codex CLI
gemini Gemini CLI
windsurf Windsurf
zed Zed
cline Cline
cline-cli Cline CLI
copilot GitHub Copilot CLI
opencode OpenCode
antigravity Antigravity
mcporter MCPorter
factory Factory
manual Manual Configuration (prints config to paste yourself)

Non-interactive / agent setup

For coding agents and CI, setup has a non-interactive mode:

dosu setup --agent --tool claude

Combine with dosu login --request / --check <ticket> for human-in-the-loop authentication, and --mode oss|cloud to skip the mode prompt.

Studying sessions: status line and incognito

With dosu knowledge hooks enable, Dosu studies finished coding-agent sessions in the background and turns what it learns into shared knowledge. Two switches make that visible and controllable per session. dosu setup installs both alongside the hook; they can also be managed directly:

dosu knowledge statusline enable|disable [claude|cursor]   # status-bar line in Claude Code / Cursor CLI
dosu knowledge incognito on|off [claude|cursor|codex]      # stop/resume studying an agent's sessions
dosu knowledge incognito status                            # which agents are incognito

The status line shows one of πŸ“š Dosu studying… (a sync run is live), πŸ“š Dosu on, πŸ‘» Dosu incognito, βšͺ Dosu paused, βšͺ Dosu not studying this repo, or βšͺ Dosu off. Every session is studied unless you limit studying to picked repos under dosu β†’ settings β†’ study scope. Notes from a session with a known repo and branch are anchored to that branch; the rest are unanchored and reach topics immediately. Neither setup nor enable replaces a status line you already have; they print the one-liner to add to your own script instead.

incognito on is a saved per-agent setting: none of that agent's sessions are studied until you turn it off. Turning it off resumes studying only new sessions going forward; sessions that finished while incognito was on stay unstudied permanently, even if a later sync picks them up. To keep a single chat out instead, type /dosu-incognito in it; setup installs that command with the hook. It marks the session's transcript so studying skips it (the whole session, and for the rest of it β€” start a new session to turn Dosu back on) and tells the model not to use Dosu tools. See docs/studying.md.

Telemetry and privacy

Dosu collects privacy-preserving usage analytics and error diagnostics by default. One global switch controls both; setup does not show a telemetry prompt.

dosu telemetry status [--json]
dosu telemetry enable
dosu telemetry disable
dosu telemetry reset

reset rotates the local pseudonymous telemetry ID; it does not delete already retained events. Signed-out command analytics uses that ID. Signed-in command analytics and minimal error diagnostics use the same Dosu user ID as the web app; Sentry may also receive the account email. Prior installation history is never aliased to an account. Setup-funnel events are linked after sign-in and may include documented coarse setup choices. DO_NOT_TRACK=1 and DOSU_TELEMETRY_DISABLED=1 disable all telemetry for the process. Dosu never collects prompts, raw command lines, free-form argument or option values, user source code, file contents, local paths, credentials, raw error messages, or debug.log. Environment-variable names and values are not collected, with one exception: when a managed Claude Code settings conflict prevents a study run, Dosu reports the allowlisted public Claude Code setting/variable names that caused the conflict (never their values) to help diagnose why knowledge sync fails due to settings conflicts. See Telemetry and privacy for the exact event fields, destinations, retention, and controls.

Configuration

Credentials and the selected deployment live in ~/.config/dosu-cli/config.json. Set DOSU_DEV=true to isolate config under ~/.config/dosu-cli-dev/.

To repoint a published build at a different backend without rebuilding, set any of these runtime overrides:

  • DOSU_WEB_APP_URL_OVERRIDE
  • DOSU_BACKEND_URL_OVERRIDE
  • SUPABASE_URL_OVERRIDE
  • SUPABASE_ANON_KEY_OVERRIDE

Telemetry destination settings are:

  • Build time: DOSU_POSTHOG_PROJECT_TOKEN, DOSU_CLI_SENTRY_DSN
  • Runtime overrides: DOSU_POSTHOG_PROJECT_TOKEN_OVERRIDE, DOSU_CLI_SENTRY_DSN_OVERRIDE
  • Privacy controls: DO_NOT_TRACK=1, DOSU_TELEMETRY_DISABLED=1, DOSU_TELEMETRY_DEBUG=1 (print the exact payload to stderr without sending it)

PostHog project tokens and Sentry DSNs are public client-side ingestion credentials. Never put a PostHog personal API key, Sentry auth token, or admin/management credential in these variables.

Development

bun install        # install dependencies
bun run dev        # run the CLI from source
bun run test       # run tests (vitest)
bun run check      # lint + format check (Biome)
bun run typecheck  # tsc --noEmit

See AGENTS.md for architecture and contributor notes.

Releasing (for maintainers)

Releases are fully automated with semantic-release β€” there are no manual version tags. Every push to a release branch is analyzed for Conventional Commit messages, which determine the version bump.

Branch npm dist-tag Version shape
main latest 0.20.1
alpha alpha 0.20.1-alpha.1

On a qualifying push, the CI pipeline bumps the version, builds binaries for all platforms, creates a GitHub release with the archives, publishes to npm, and (for stable releases only) updates the Homebrew formula.

Commit messages that don't follow Conventional Commits are invisible to semantic-release and won't trigger a release. See AGENTS.md for the full type β†’ release-impact table and the alpha channel workflow.

License

MIT β€” see the license field in package.json.

About

πŸ” The Dosu CLI Utility

Resources

Stars

14 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages