Skip to content

CLI Reference

Initialize an .ai/ directory in your project.

Terminal window
dotai init [options]
OptionDescription
-t, --target <tools...>Target tools (claude, cursor, codex, copilot)
--skip-importSkip auto-detection of existing configs
--syncRun sync after init
--with-helpersInclude dotai helper skills

Creates a starter config.yaml with a conventions rule and common ignore patterns.

Generate tool-specific configuration files from .ai/ sources.

Terminal window
dotai sync [options]
OptionDescription
-t, --target <tool>Target tool (claude, cursor, codex, copilot, all). Defaults to all.
--dry-runShow what would be generated without writing files
-s, --scope <scope>Config scope (user or project). Defaults to project.
--forceOverwrite files even if manually edited (conflicts detected)
-y, --yesSkip confirmation prompt

Reads .ai/ config, applies scope precedence, and writes output files for each target tool. Tracks content hashes in .ai/.state.json for conflict detection.

Validate your .ai/ configuration.

Terminal window
dotai check [options]
OptionDescription
-s, --scope <scope>Config scope (user or project). Defaults to project.

Checks for:

  • Valid YAML syntax in config.yaml
  • Valid frontmatter in rules and agents
  • Required fields present on all entities
  • Scope values within allowed range
  • No conflicting permission rules

Show the current state of dotai configuration and generated files.

Terminal window
dotai status

Displays:

  • Which targets are configured
  • Number of entities by type
  • Sync status (up-to-date, needs sync, conflicts)
  • Files that have been manually modified since last sync

Import existing tool configurations into .ai/ format.

Terminal window
dotai import [options]
OptionDescription
--source <tool>Import from a specific tool (claude, cursor, codex)

Auto-detects existing configurations and converts them to .ai/ entities. See Importing Existing Configs for details.

Scaffold a rule, agent, skill, or MCP server.

Terminal window
dotai add [type] [name]
ArgumentDescription
typeEntity type: rule, agent, skill, or mcp
nameName of the entity to create
OptionDescription
--command <cmd>MCP server command (stdio transport)
--url <url>MCP server URL (http/sse transport)

If type and name are omitted, the command runs interactively. For MCP servers, use --command for stdio-based servers or --url for HTTP/SSE servers.