subagent-cli
v0.3.3
Published
sa — Morph Code CLI (Claude Code fork with multi-provider LLM, WarpGrep, and subagent support)
Readme
mc — Morph Code
A compiled fork of Claude Code with WarpGrep semantic code search, multi-provider LLM support, and subagent orchestration. Ships as a single native binary per platform.
Install
curl -fsSL subagents.com/install | bashOr with npm:
npm install -g @morphllm/morphcodeUsage
# Interactive mode
mc
# Single prompt
mc -p "refactor the auth module"
# Print mode (non-interactive, for scripts)
mc -p "explain this codebase" --print
# Specify model
mc --model claude-sonnet-4-6
mc --model opus
# List available agents
mc agentsWhat's different from Claude Code
WarpGrep agent — Semantic code search powered by Morph. The warpgrep subagent understands code structure, not just text patterns. Always registered alongside Explore and Plan.
Compiled binary — Ships as a native Mach-O / ELF binary (like Claude Code itself). Starts instantly, no runtime dependencies.
Multi-provider LLM — Set PI_ENGINE=on to route through OpenAI, Google, Mistral, or any provider supported by pi-ai.
Explore & Plan agents — Always enabled. The Explore agent prefers WarpGrep over regex grep when available.
Agents
$ mc agents
6 active agents
Built-in agents:
Explore · haiku — Fast codebase exploration
Plan · inherit — Architecture and implementation planning
warpgrep · haiku — Semantic code search via Morph
general-purpose · inherit — Research, code search, multi-step tasks
claude-code-guide · haiku — Questions about features and usage
statusline-setup · sonnet — Configure status lineEnvironment variables
| Variable | Required | Purpose |
|----------|----------|---------|
| ANTHROPIC_API_KEY | Yes (or OAuth via mc auth login) | Anthropic API access |
| MORPH_API_KEY | No | Enables WarpGrep and FastApply tools |
| OPENAI_API_KEY | No | For PI_ENGINE multi-provider mode |
| GOOGLE_API_KEY | No | For PI_ENGINE multi-provider mode |
| PI_ENGINE | No | Set to on to route LLM calls through pi-ai |
Platform binaries
Published to npm as platform-specific packages:
| Platform | Package |
|----------|---------|
| macOS Apple Silicon | @morphllm/morphcode-darwin-arm64 |
| macOS Intel | @morphllm/morphcode-darwin-x64 |
| Linux x64 | @morphllm/morphcode-linux-x64 |
| Linux arm64 | @morphllm/morphcode-linux-arm64 |
| Windows x64 | @morphllm/morphcode-windows-x64 |
Development
# Run from source (requires Bun)
cd packages/subagent-cli
bun run --preload ./stubs/globals.ts ./src/entrypoints/cli.tsx
# Build native binary
bun build --compile _entry.ts --outfile dist/mc --target bun
# Run tests
npx vitest --run
# List agents
bun run --preload ./stubs/globals.ts ./src/entrypoints/cli.tsx agentsArchitecture
Built on Claude Code v2.1.88 source, compiled to a native binary via bun build --compile.
Key modifications:
src/tools/AgentTool/built-in/warpGrepAgent.ts— WarpGrep subagentsrc/tools/WarpGrepTool/WarpGrepTool.ts— WarpGrep as a Claude Code Toolsrc/tools/AgentTool/builtInAgents.ts— Explore/Plan always enabled, warpgrep registeredsrc/engine/— Pi-mono integration layer for multi-provider LLMsrc/query/deps.ts— LLM call routing (Anthropic default, pi-ai whenPI_ENGINE=on)stubs/— Build-time stubs for unavailable Anthropic-internal packages.github/workflows/publish-morphcode.yml— Multi-platform binary build and npm publish
