Skip to content

CLI

Terminal window
dotagents [--user] <command> [options]
  • --user operates on user scope (~/.agents/) instead of the current project.
  • --help, -h shows help.
  • --version, -V shows version.
Terminal window
dotagents init [--agents claude,cursor] [--force]

Initialize a new project with agents.toml and .agents/skills/. Interactive mode prompts for agent targets and trust policy. Sets up gitignore entries automatically.

By default, init declares the dotagents skill from getsentry/dotagents so agents can discover CLI guidance. It then runs install best-effort.

Options:

  • --agents <list> comma-separated agent targets (claude, cursor, codex, vscode, opencode).
  • --force overwrites existing agents.toml.

Examples:

Terminal window
dotagents init
dotagents init --agents claude,cursor
dotagents --user init
Terminal window
dotagents install

Install and refresh skill dependencies from agents.toml. Resolves sources, copies skills, writes the lockfile, creates symlinks, and generates MCP and hook configs. There is no separate update command.

Example:

Terminal window
dotagents install
Terminal window
dotagents add <specifier> [<skill>...] [--skill <name>...] [--ref <ref>] [--all]

Add one or more skill dependencies and install them. dotagents auto-discovers skills in the source. When a source has one skill, it is added automatically. When multiple skills are found, interactive mode shows a picker. In non-interactive mode, pass skill names as positional arguments, use --skill, or use --all.

Shorthand owner/repo resolves through defaultRepositorySource in agents.toml.

Options:

  • --skill <name> specifies which skill to add. Repeatable. Alias: --name.
  • --ref <ref> pins to a specific tag, branch, or commit.
  • --all adds all skills from the source as a wildcard entry (name = "*").

Do not mix positional skill names and --skill or --name flags in the same command.

Examples:

Terminal window
# Single skill from GitHub
dotagents add getsentry/skills find-bugs
# All skills from a repo
dotagents add getsentry/skills --all
# Pinned to a ref
dotagents add getsentry/warden@v1.0.0
# Explicit GitLab URL
dotagents add https://gitlab.com/group/repo find-bugs
# Non-GitHub git server
dotagents add git:https://git.corp.dev/team/skills review
# Well-known HTTPS source
dotagents add https://cli.sentry.dev error-tracking
# Local directory
dotagents add path:./my-skills/custom
Terminal window
dotagents remove <name|source> [-y]

Remove a skill from agents.toml, delete it from disk, and update the lockfile. You can also pass a source to remove all skills from that source. When removing a skill provided by a wildcard source, dotagents can add that skill to the wildcard exclude list.

Options:

  • -y, --yes skips confirmation when removing by source or excluding a wildcard-provided skill.

Example:

Terminal window
dotagents remove find-bugs
dotagents remove getsentry/skills -y
Terminal window
dotagents sync

Reconcile project state without network access. Adopts local orphaned skills, prunes stale managed skills removed from config, regenerates gitignore, and repairs symlinks plus MCP/hook configs. Reports issues as warnings or errors.

Terminal window
dotagents mcp add <name> --command "<cmd> [args...]" [--env <VAR>...]
dotagents mcp add <name> --url <url> [--header <Key:Value>...] [--env <VAR>...]

Add an MCP server declaration to agents.toml and run install to generate agent configs. Specify exactly one transport: --command for stdio or --url for HTTP.

Options:

  • --command "<cmd> [args...]" is the command string to execute for stdio transport.
  • --url <url> is the server URL for HTTP transport.
  • --header <Key:Value> adds an HTTP header. Repeatable. URL servers only.
  • --env <VAR> passes through an environment variable. Repeatable.

Examples:

Terminal window
# Stdio server
dotagents mcp add github --command "npx -y @modelcontextprotocol/server-github" --env GITHUB_TOKEN
# HTTP server with auth header
dotagents mcp add remote --url https://mcp.example.com/sse --header "Authorization:Bearer tok"
Terminal window
dotagents mcp remove <name>

Remove an MCP server declaration from agents.toml and run install to regenerate agent configs.

Example:

Terminal window
dotagents mcp remove github
Terminal window
dotagents mcp list [--json]

Show declared MCP servers. Use --json for machine-readable output.

Examples:

Terminal window
dotagents mcp list
dotagents mcp list --json
Terminal window
dotagents trust add <source>

Add a trusted source to [trust] in agents.toml. The type is inferred automatically: owner/repo for repos, names with . for domains, and bare names for GitHub orgs.

When defaultRepositorySource = "gitlab", shorthand trust sources are stored as GitLab domain rules.

Examples:

Terminal window
dotagents trust add getsentry
dotagents trust add external-org/specific-repo
dotagents trust add git.corp.example.com
Terminal window
dotagents trust remove <source>

Remove a trusted source from [trust] in agents.toml. Matching is case-insensitive.

Example:

Terminal window
dotagents trust remove getsentry
Terminal window
dotagents trust list [--json]

Show trusted sources with their type. Use --json for machine-readable output.

Examples:

Terminal window
dotagents trust list
dotagents trust list --json
Terminal window
dotagents doctor [--fix]

Check project health and fix issues. Verifies gitignore setup, installed skills, symlinks, and detects legacy config fields. Useful for migrating to a new version of dotagents.

Options:

  • --fix auto-fixes issues where possible.

Examples:

Terminal window
dotagents doctor # check for issues
dotagents doctor --fix # fix what it can
Terminal window
dotagents list [--json]

Show installed skills and status. Use --json for machine-readable output.

Status output:

  • means installed and present in the lockfile. JSON status: ok.
  • means declared but not installed. JSON status: missing.
  • ? means installed but not in the lockfile. JSON status: unlocked.
FormatExampleDescription
GitHubgetsentry/skillsAuto-discovers skills by name
GitHub URLhttps://github.com/getsentry/skillsExplicit GitHub source
GitHub SSHgit@github.com:getsentry/skills.gitGitHub over SSH
Pinnedgetsentry/skills@v1.0.0Locked to a specific ref
Git URLgit:https://git.corp.dev/repoNon-GitHub git servers
GitLab URLhttps://gitlab.com/group/repoExplicit GitLab source
GitLab SSHgit@gitlab.com:group/repo.gitGitLab over SSH
Well-known HTTPShttps://cli.sentry.devHTTP source using .well-known skill discovery
Localpath:./my-skills/customLocal directory, relative to project root
FieldTypeDefaultDescription
versionintegerSchema version. Always 1.
agentsstring[][]Agent targets: claude, cursor, codex, vscode, opencode
minimum_release_ageintegerMinimum commit age, in minutes, before a git skill can install.
minimum_release_age_excludestring[][]Sources that bypass the minimum release age gate. Supports org names, org/repo, and org/*.
defaultRepositorySourcestringgithubHost used for shorthand owner/repo sources. Valid values: github or gitlab.
FieldTypeRequiredDescription
namestringYesSkill identifier. Use "*" for wildcard.
sourcestringYesowner/repo, owner/repo@ref, GitHub/GitLab URL, git:url, or path:relative
refstringNoTag, branch, or commit SHA to pin
pathstringNoSubdirectory within repo, when auto-discovery fails
excludestring[]NoSkills to skip. Wildcard entries only.
FieldTypeRequiredDescription
namestringYesUnique server identifier
commandstringStdioCommand to execute
argsstring[]NoCommand arguments
urlstringHTTPServer URL
headerstableNoHTTP headers for URL servers, not needed with OAuth
envstring[]NoEnvironment variable names to pass through
FieldTypeRequiredDescription
eventstringYesPreToolUse, PostToolUse, UserPromptSubmit, Stop
matcherstringNoTool name filter
commandstringYesShell command to execute

Operates on the current project. Requires agents.toml at the project root. Skills go to .agents/skills/ and the lockfile goes to agents.lock.

Manages skills shared across all projects. Files live in ~/.agents/, and you can override that with DOTAGENTS_HOME. Symlinks go to ~/.claude/skills/ and ~/.cursor/skills/.

Terminal window
dotagents --user init
dotagents --user add getsentry/skills --all
dotagents --user install

When no agents.toml exists and you are not inside a git repo, dotagents falls back to user scope automatically.

VariableDescription
DOTAGENTS_STATE_DIROverride cache location. Default: ~/.local/dotagents.
DOTAGENTS_HOMEOverride user-scope location. Default: ~/.agents.