A local source snapshot of an assistant-style CLI that supports interactive coding sessions, local tools, custom agents, skills, plugins, and MCP integrations.
This repository appears to be a source snapshot, not an official release package.
- It currently has no root package.json in this workspace snapshot.
- Some feature flags and internal-only commands are compiled behind build-time gates.
- You can still use this README as a practical local guide, but treat source-run instructions as best effort.
At a high level, this codebase provides:
- A CLI (currently invoked as
claudefor compatibility) with interactive mode by default. - A non-interactive print mode (
-por--print) for scripting. - A slash-command system (
/help,/review,/mcp,/plugin, etc.). - A local tool runtime (Bash, file read/edit/write, web fetch/search, notebook editing, MCP resources).
- A custom agent system loaded from markdown definitions.
- A skill system loaded from project and user skill directories.
Use this path if the claude command is already available on your machine.
claude --version
claude --help
claudeInside interactive mode, run:
/help
Useful non-interactive examples:
claude -p "summarize this repository"
claude --print --output-format json "list risky files"
claude --continue
claude --resume
claude --model sonnet
claude --agent <agent-name>Use this if you want to experiment directly from source.
Prerequisites:
- Node.js 18+
- Bun runtime
Example attempt:
bun entrypoints/cli.tsx --help
bun entrypoints/cli.tsxIf this fails, use Track A with an installed binary and keep this repository for study/customization.
Depending on your environment and provider setup, you will typically use one of:
/logininside interactive mode for web OAuth flows.ANTHROPIC_API_KEYenvironment variable for API key flows.
Session controls:
--continuecontinues the latest conversation in the current directory.--resume [id]resumes by session id or opens a picker.--fork-sessionforks a resumed session into a new session id.
This is the core workflow most users care about.
claudeThen use:
/help
Agent markdown files are loaded from agents config directories (project/user/policy sources).
Common locations:
- Project:
.claude/agents/ - User/global:
~/.claude/agents/
Minimal example (.claude/agents/reviewer.md):
---
name: reviewer
description: Reviews code changes for bugs and regressions
tools: Read,Edit,Bash
model: inherit
---
You are a careful code reviewer. Prioritize correctness, edge cases, and regression risk.Use it:
claude --agent reviewerOr inspect configured agents in session:
/agents
Skills are loaded from skill directories and can be invoked as slash commands.
Common locations:
- Project:
.claude/skills/ - User/global:
~/.claude/skills/
Directory format is widely used:
.claude/skills/my-skill/SKILL.md
Minimal example (.claude/skills/my-skill/SKILL.md):
---
name: my-skill
description: Run a focused refactor checklist
---
When invoked, do the following:
1. Identify code smells
2. Propose smallest safe refactor
3. Apply edits
4. Run quick verificationThen in chat:
/my-skill
Start with these command groups:
- Setup and diagnostics:
/init,/doctor,/status - Coding workflow:
/review,/diff,/commit - Extensibility:
/agents,/skills,/plugin,/mcp - Session/context:
/memory,/context,/resume,/clear
Tip: use /help as the canonical source of what your current build enables.
Use print mode for scripts, CI glue, and deterministic output handling.
claude --print "generate a release summary from git log"
claude --print --output-format stream-json "review the staged changes"Useful related flags:
--input-format text|stream-json--output-format text|json|stream-json--max-turns <n>--max-budget-usd <amount>--allowedToolsand--disallowedTools
The codebase includes bridge/remote-control paths (aliases include remote-control, rc, remote, sync, bridge).
Use this only after auth is configured and policy allows remote control:
claude remote-controlNotes:
- Bridge paths only allow safe command subsets.
- UI-heavy local commands are intentionally restricted in remote contexts.
If something does not work, check in this order:
- Verify runtime prerequisites (Node 18+, Bun if source-running).
- Run
claude --help, then start interactive mode and run/help. - Run
/doctorinside interactive mode. - If source-run fails, prefer installed binary flow and use this repo as reference.
- If a skill/agent is not visible, verify path and frontmatter syntax first.
If you want to extend this project, start here:
- CLI entry and global flags:
main.tsx - Bootstrap entrypoint:
entrypoints/cli.tsx - Command registry and safety filtering:
commands.ts - Tool inventory and gating:
tools.ts - Query execution core:
QueryEngine.ts - Agent loading and precedence:
tools/AgentTool/loadAgentsDir.ts - Skill loading and parsing:
skills/loadSkillsDir.ts - Remote/bridge subsystem:
bridge/
- Run
claudeand confirm/helpworks. - Add one local agent in
.claude/agents/. - Add one skill in
.claude/skills/<name>/SKILL.md. - Test both interactive and
--printworkflows. - Add MCP servers and plugins once base flow is stable.
