Socket
Book a DemoInstallSign in
Socket

zrobi

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zrobi

Sync slash commands across AI coding tools (Claude Code, Gemini CLI, Codex CLI, etc.)

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

zrobi

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.

Why

Each tool has its own command format and location:

ToolLocationFormat
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.

Installation

npm install -g zrobi

# Or use without installing
npx zrobi status

On first run, zrobi creates ~/.zrobi/commands/ automatically. Add your commands there.

Usage

# 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-run

Sync mode

By 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 it

Warning: --sync deletes any files in tool directories not managed by zrobi, including manual customizations. Always run with --dry-run first.

Writing commands

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.

Subdirectories

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.

Configuration

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-command

Per-tool overrides in frontmatter:

---
description: Default description
gemini:
  description: Gemini-specific description
---

Auxiliary files

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 pattern

Note: Cline skips auxiliary files because it would parse README.md as a command.

Limitations

  • 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)

Development

pnpm install
pnpm dev
pnpm test
pnpm lint
pnpm typecheck
pnpm build

Adding a new tool: create an adapter in src/adapters/ following the existing pattern.

License

MIT

Keywords

cli

FAQs

Package last updated on 17 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts