Crewd Documentation
Crewd is the package manager for prompt-defined AI agents, skills, and teams. It compiles reusable, prompt-based subagents and skills directly into native configurations across Claude Code, Cursor, and Gemini CLI.
Installation
Install the standalone crewd binary via Homebrew or the curl installer:
Option 1: Homebrew (macOS / Linux)
Option 2: Standalone Shell Installer (macOS / Linux)
Option 3: Go Install
Uninstalling Crewd CLI
Depending on how you installed the CLI, use the matching command below to remove the binary and optional config/cache directories:
If you installed using the Homebrew tap:
If you installed via curl https://crewd.dev/install.sh | sh, find and delete the binary (typically in /usr/local/bin or ~/.local/bin):
If you installed via Go:
To completely remove stored authentication tokens, registry configuration, and downloaded package tarballs:
3-Minute Quickstart
Hire your first agent into an existing Git repository:
1. Initialize your workspace
Detects whether you use Claude Code, Cursor, or Gemini CLI, creates crewd.json, and appends gitignore rules.
2. Hire an agent
Downloads the verified package, generates .claude/agents/reviewer.md or Cursor rules, and locks dependencies in crewd.lock.
3. Invoke your new subagent
Start your coding host as usual. In Claude Code, say:
CLI Command Reference
Comprehensive syntax, flags, and usage patterns for all CLI commands.
crewd init [--hosts=<list>]
Scans the current repository to auto-detect installed AI tools (.claude/, .cursor/, GEMINI.md) and generates crewd.json.
crewd hire <package[@range]> / crewd hire team <package>
Resolves transitive dependencies, downloads immutable tarballs, validates SHA-256 hashes, and renders compiled adapter files.
crewd fire <package> / crewd fire team <package>
Removes an agent, skill, or team from crewd.json and deletes its generated host adapter files. Note: Memory files in .crewd/memory/ are deliberately preserved so repository learnings are never lost.
crewd promote [package[@version]]
Upgrades installed packages to the latest matching release while preserving repository-local taught skills and persistent agent memories.
crewd teach <agent> <skill[@range]> / crewd forget <agent> <skill>
Attaches an additional repo-local skill to an installed agent without modifying the upstream package. Taught skills are saved in crewd.json under teach and re-applied on subsequent compiles and upgrades.
crewd install [--frozen]
Installs all packages strictly from crewd.lock. Use --frozen in CI/CD pipelines to fail with exit code 4 if the lockfile is stale versus crewd.json.
crewd search <query> & crewd interview <package>
Discover and inspect packages before installing: search queries the public registry, while interview fetches the package dossier, displaying its role prompt, host compatibility, dependencies, and README.
crewd roster [--json] & crewd doctor
Inspect your workspace: roster lists all active agents, squad members, and taught skills. doctor validates lockfile synchronization, detects manual file edits, and verifies host CLI readiness.
crewd mcp
Starts the local Model Context Protocol (MCP) server over stdio. Allows AI coding agents in Claude Code, Cursor, and Gemini CLI to discover, inspect, plan, and hire agents directly within an active session.
crewd completion [bash|zsh|fish|powershell]
Generate auto-completion scripts for your active shell to enable fast tab completion across all commands and flags.
Crewd MCP Server
stdio TransportThe Crewd MCP server enables coding agents (Claude Code, Cursor, Gemini CLI) to discover, inspect, and hire agents, teams, and skills from inside an active coding session without requiring the user to leave and run the terminal CLI. It is shipped as crewd mcp and is also runnable via npx @crewdhq/crewd-mcp.
Client Setup & Configuration
Configure the server in your preferred AI assistant using either npx @crewdhq/crewd-mcp or your local crewd mcp binary:
Exposed MCP Tools
| Tool Name | Input Parameters | Description |
|---|---|---|
| search_packages | query, kind?, limit? | Search registry for packages, returning version, description, publisher, agent/skill counts, and script tags. |
| inspect_package | name, version? | Read-only inspection of prompts, role when-conditions, tool permissions, skills, and script previews. Never executes anything. |
| plan_hire | name, version?, targets? | Dry run. Computes resolved versions, SHA-256 hashes, exact files to create/update, and returns a single-use confirm_token. Writes nothing. |
| hire | name, version?, targets?, confirm_token | Installs package into the repo using a valid confirm_token after explicit user approval. Installs scripts as files only. |
| list_installed | {} | Reads crewd.json and crewd.lock to return all active crews, agents, skills, and versions. |
| check_updates | {} | Compares lockfile against registry to identify available upgrades with summaries of new/removed skills and scripts. |
Safety Model & Trust Boundaries
Because calling AI agents can be prompt-injected by untrusted code they read, installing new agents into your repository represents a sensitive trust boundary. Crewd enforces strict defensive safeguards:
hire cannot run without a prior plan_hire. Calling agents must show the plan to the human user and obtain explicit approval before submitting the single-use, 5-minute confirm_token.
Executable scripts (.sh, scripts/) are prominently flagged during planning. The MCP server installs them strictly as inert files and never executes package scripts.
All registry content (descriptions, READMEs, prompts) is treated as untrusted data. Long text fields are truncated and sanitized to prevent instruction override attacks on calling agents.
Tarball entries are checked against path traversal (.., absolute paths) and strictly restricted to the workspace root. Archives are verified against registry SHA-256 integrity hashes before extraction.
Using Hired Agents in AI Coding Tools
Crewd packages are not background daemons or closed plugins. When you run crewd hire, Crewd natively adapts prompts, tools, skills, and memory into the exact files your AI coding tools already read. Here is how to activate and work with your hired crew in each environment:
Crewd renders agents into .claude/agents/<name>.md and skills into .claude/skills/<skill>/SKILL.md. Claude Code automatically recognizes these as specialized subagents with isolated tool permissions.
How to Invoke in Claude Code
- Safe Tool Enforcement: If an agent defines
tools.deny: ["edit", "write"], Claude Code blocks the agent from modifying files. - Automatic Skills: Claude loads attached skills (e.g.
review-checklist,owasp-top10) on demand. - Memory Persistence: Claude reads and updates
.crewd/memory/<agent>.mdafter completing review cycles.
Crewd compiles agents to .cursor/rules/crewd-<name>.mdc and skills to .cursor/rules/crewd-skill-<skill>.mdc. Cursor reads these rules automatically based on file globs or explicit user mentions.
How to Invoke in Cursor Chat & Composer
- Context-Aware Globs: Cursor automatically injects the rule whenever you open files matching the package's specified paths.
- Symbol & Skill Referencing: Use
@crewd-skill-owasp-top10alongside any prompt to enforce strict security checks.
Crewd cleanly injects agents into GEMINI.md between safe, atomic comment delimiters:<!-- crewd:begin <name> --> ... <!-- crewd:end <name> -->. Skills are placed in .gemini/skills/<skill>/SKILL.md.
How to Invoke with Gemini
- Non-Destructive Compilation: Any custom instructions or rules in your
AGENTS.mdorGEMINI.mdoutside the crewd markers remain untouched. - Skill Discovery: Gemini loads instructions from
.agents/skills/and.gemini/skills/whenever relevant procedures are mentioned.
Crewd natively adapts agents for OpenAI Codex CLI by injecting marker-delimited instructions into CODEX.md or AGENTS.md:<!-- crewd:begin <name> --> ... <!-- crewd:end <name> -->. Skills are compiled into .codex/skills/<skill>/SKILL.md.
How to Invoke with Codex CLI
- Universal Instruction Standard: Codex reads
AGENTS.mdandCODEX.mdhierarchically at session start. - Skill Integration: Skills registered under
.codex/skills/are loaded on demand whenever matching workflows are prompted.
Traditional prompt files are stateless; every new session starts from scratch. Crewd equips each hired agent with an isolated, append-only memory file in.crewd/memory/<agent>.md.
Before taking actions, agents read their memory file to honor previous decisions, architecture patterns, and bug history.
When you run crewd promote to pull new agent versions, memory files are never overwritten or deleted.
When you hire a team with crewd hire team <team> (such as @m0agh/pr-review-squad), all squad members are installed together with specialized roles:
Each agent remains focused on its designated specialty (reviewing vs. writing tests vs. updating docs), preventing prompt dilution and hallucination.
Package Specifications
Crewd packages are declared via YAML manifests and compiled deterministically:
Host Integrations
Crewd natively adapts agents and skills to your AI coding environment without vendor lock-in:
Compiled to .claude/agents/<name>.md with frontmatter tools and subagent triggers. Associated skills are placed into .claude/skills/<skill>/SKILL.md.
Injects the Durable Memory instruction linking to .crewd/memory/<name>.md.
Security & Architecture
Content-Addressable Blobs: Packages are distributed as deterministic ustar tarballs with SHA-256 integrity hashes (/blobs/sha256-...). Archives are immutable and cached with zero invalidation risk.
Memory Isolation: Agent memory files in .crewd/memory/ store project-specific learnings and are never overwritten or deleted by fire or promote.
Script Safety Policy: Packages containing lifecycle scripts trigger warnings and require explicit confirmation with --yes to prevent arbitrary code execution in CI environments.