Sync slash commands across AI coding tools. Define once in ~/.zrobi/commands/, run zrobi build, and they appear in Claude Code, Gemini CLI, Codex CLI, OpenCode, and Cline.
Each tool has its own command format and location:
| Tool | Location | Format |
|---|---|---|
| Claude Code | ~/.claude/commands/ |
Markdown + YAML |
| Codex CLI | ~/.codex/prompts/ |
Markdown + YAML |
| Gemini CLI | ~/.gemini/commands/ |
TOML |
| OpenCode | ~/.config/opencode/command/ |
Markdown + YAML |
| Cline | ~/Documents/Cline/Workflows/ |
Markdown |
Maintaining the same commands across all of them by hand is tedious. zrobi handles the conversion and copying.
npm install -g zrobi
# Or use without installing
npx zrobi statusOn first run, zrobi creates ~/.zrobi/commands/ automatically. Add your commands there.
# Check which tools are detected
zrobi status
# Build commands for all enabled tools
zrobi build
# Build for one tool only
zrobi build --tool gemini
# Preview without writing anything
zrobi build --dry-runBy default, zrobi build only adds and updates files. Deleted commands stay in tool directories until you remove them manually.
Use --sync to also clean up stale files:
zrobi build --sync --dry-run # Preview what would be deleted
zrobi build --sync # Do itWarning: --sync deletes any files in tool directories not managed by zrobi, including manual customizations. Always run with --dry-run first.
Commands use Claude Code's format (Markdown + YAML frontmatter). Create a file in ~/.zrobi/commands/:
---
description: Short description shown in command list
argument-hint: '[optional-arg]'
---
Your prompt content here.
Use $ARGUMENTS for user input.
Use $1, $2 for positional arguments.zrobi automatically converts placeholders per tool (e.g., $ARGUMENTS → {{args}} for Gemini).
Then run zrobi build.
Organize commands in folders:
~/.zrobi/commands/
├── git/
│ ├── commit.md → /git:commit
│ └── review-pr.md → /git:review-pr
└── deploy.md → /deploy
Note: Codex CLI doesn't support subdirectories, so git/commit.md becomes git-commit.md. Avoid naming collisions like having both git-commit.md and git/commit.md.
Copy config.example.yaml to ~/.zrobi/config.yaml and edit:
tools:
claude:
enabled: true
global_path: ~/.claude/commands
gemini:
enabled: true
global_path: ~/.gemini/commands
# Skip specific commands for specific tools
exclude:
gemini:
- some-claude-only-commandPer-tool overrides in frontmatter:
---
description: Default description
gemini:
description: Gemini-specific description
---README.md files in ~/.zrobi/commands/ are copied verbatim (not parsed as commands). This lets you include documentation alongside your commands.
~/.zrobi/commands/
├── README.md # Copied to all tool directories
├── git/
│ ├── README.md # Copied to git/ subdirectory
│ └── commit.md
└── deploy.md
Configure patterns in ~/.zrobi/config.yaml:
auxiliary:
patterns:
- "**/README.md" # Default
- "**/NOTES.md" # Additional patternNote: Cline skips auxiliary files because it would parse README.md as a command.
- Global commands only - No project-level command support yet
- One-way sync - Edits made directly in tool directories get overwritten on next build
- Cursor/Windsurf - Not implemented (project-only commands complicate things)
pnpm install
pnpm dev
pnpm test
pnpm lint
pnpm typecheck
pnpm buildAdding a new tool: create an adapter in src/adapters/ following the existing pattern.
MIT