Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

subagent-cli

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

subagent-cli

sa — Morph Code CLI (Claude Code fork with multi-provider LLM, WarpGrep, and subagent support)

npmnpm
Version
0.3.1
Version published
Weekly downloads
34
1600%
Maintainers
1
Weekly downloads
 
Created
Source

sa — Morph Code

A fork of Claude Code with multi-provider LLM support, WarpGrep semantic code search, and subagent orchestration. Runs from source with Bun.

Install

curl -fsSL subagents.com/install | bash

Or with npm:

npm install -g subagent-cli

Requires Bun runtime.

Usage

# Interactive mode
sa

# Single prompt
sa -p "refactor the auth module"

# Print mode (non-interactive, for scripts)
sa -p "explain this codebase" --print

# Specify model
sa --model claude-sonnet-4-6
sa --model opus

# List available agents
sa agents

What's different from Claude Code

Multi-provider LLM — Uses pi-ai under the hood. Set PI_ENGINE=on to route through OpenAI, Google, Mistral, or any supported provider instead of Anthropic.

WarpGrep agent — Semantic code search powered by Morph. When MORPH_API_KEY is set, a warpgrep subagent becomes available that understands code structure, not just text patterns.

Explore & Plan agents — Always enabled. The Explore agent prefers WarpGrep over regex grep when available.

Subagent tools — WarpGrep and FastApply (smart code editing) are registered as first-class tools, available to all agents.

Agents

$ sa agents

9 active agents

Built-in agents:
  Explore    · haiku    — Fast codebase exploration (uses WarpGrep when available)
  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 line

Environment variables

VariableRequiredPurpose
ANTHROPIC_API_KEYYes (or OAuth)Anthropic API access
MORPH_API_KEYNoEnables WarpGrep, FastApply, and warpgrep agent
OPENAI_API_KEYNoFor PI_ENGINE multi-provider mode
GOOGLE_API_KEYNoFor PI_ENGINE multi-provider mode
PI_ENGINENoSet to on to route LLM calls through pi-ai

Development

# Run from source
cd packages/subagentscccli
bun run --preload ./stubs/globals.ts ./src/entrypoints/cli.tsx

# Run tests (88 tests)
npx vitest --run

# Check agents
bun run --preload ./stubs/globals.ts ./src/entrypoints/cli.tsx agents

# Verify version
bun run --preload ./stubs/globals.ts ./src/entrypoints/cli.tsx --version

Architecture

Built on the Claude Code v2.1.88 source with these modifications:

  • src/engine/ — Pi-mono integration layer (PiAgentAdapter, MessageMapper, ToolAdapter, ModelResolver, CostMapper, PermissionBridge, SubagentTools)
  • src/query/deps.ts — LLM call routing (Anthropic SDK default, pi-ai when PI_ENGINE=on)
  • src/tools/AgentTool/built-in/warpGrepAgent.ts — WarpGrep subagent definition
  • src/tools/WarpGrepTool/WarpGrepTool.ts — WarpGrep as a Claude Code Tool
  • src/tools/AgentTool/builtInAgents.ts — Explore/Plan always enabled, warpgrep registered
  • stubs/ — Runtime stubs for unavailable Anthropic-internal packages
  • bin/sa.js — Bun launcher entry point

License

Claude Code source is property of Anthropic. This fork is for internal use.

FAQs

Package last updated on 02 Apr 2026

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