src/
├─ assistant/ — assistant helpers.
├─ bootstrap/ — boot-time setup.
├─ bridge/ — IPC adapters.
├─ buddy/ — buddy features.
├─ cli/ — CLI shell code.
├─ commands/ — named command handlers.
├─ components/ — shared UI pieces.
├─ constants/ — shared constants.
├─ context/ — context stores.
├─ coordinator/ — task coordination.
├─ entrypoints/ — specialized builds.
├─ hooks/ — reusable hooks.
├─ ink/ — terminal UI.
├─ keybindings/ — key mapping rules.
├─ memdir/ — ephemeral storage.
├─ migrations/ — data migrations.
├─ moreright/ — moreright integrations.
├─ native-ts/ — native bindings.
├─ outputStyles/ — CLI styles.
├─ plugins/ — plugin registry.
├─ query/ — query helpers.
├─ remote/ — remote runtime.
├─ schemas/ — config schemas.
├─ screens/ — screen compositions.
├─ server/ — server adapters.
├─ services/ — service backends.
├─ skills/ — skill definitions.
├─ state/ — runtime state.
├─ tasks/ — task runners.
├─ tools/ — tool implementations.
├─ types/ — TypeScript types.
├─ upstreamproxy/ — upstream proxy.
├─ utils/ — utility belt.
├─ vim/ — Vim integration.
├─ voice/ — voice helpers.
├─ commands.ts — CLI registry wiring.
├─ context.ts — context helpers.
├─ cost-tracker.ts — usage tracker.
├─ costHook.ts — cost hooks.
├─ dialogLaunchers.tsx — modal helpers.
├─ history.ts — session history.
├─ ink.ts — Ink initializer.
├─ interactiveHelpers.tsx — prompt helpers.
├─ main.tsx — app bootstrap.
├─ projectOnboardingState.ts — onboarding state.
├─ query.ts — query utilities.
├─ QueryEngine.ts — planning orchestrator.
├─ replLauncher.tsx — REPL entry.
├─ setup.ts — environment prep.
├─ Task.ts — base task API.
├─ tasks.ts — task utilities.
├─ Tool.ts — tool interfaces.
└─ tools.ts — tool helpers.
src/main.tsxboots the React/Ink UI and ties together the command runner, renderer, and services for the Claude Code experience.src/bootstrap.tsprepares environment/configuration before the GUI or CLI entrypoints launch, whilesrc/entrypointscollects specialized builds such as SDK shells.src/cliandsrc/commandshost the command-line interface, transport adapters, and the hundreds of named commands (e.g.,ctx_viz,tasks,voice,agent) that users can invoke interactively or via scripts.
src/componentsand nested folders (ui,tasks,memory,teams,settings,design-system, etc.) implement the shared React/Ink components, dialogs, and orchestrated screens that compose the experience.src/screensdefines the higher-level pages that compose component combos for onboarding, context views, skills, and other flows.src/hooks,src/hooks/notifs, andsrc/hooks/toolPermissionencapsulate reusable logic tied to notifications, tool permissions, and general React state derivation.src/inkis the Ink-native console UI layer (layouts, components, hooks, events, term I/O) used for terminal-based renderers.src/keybindingsmaps keys to recognized commands for both GUI and terminal modes, whilesrc/contextandsrc/statecontain the mutable slices of context the UI consumes.
src/tasks,src/tasks/*encode task runners (local shell agents, remote agents, dream tasks, etc.) and provide a pluggable task infrastructure that coordinates tooling, workspaces, and agents.src/tools(plusshared,testing, and dozens of named tool implementations likeWebSearchTool,FileWriteTool,SkillTool) register the toolkit available to agents, including plan/skill authoring, workspace introspection, and automation helpers.src/services(e.g.,plugins,oauth,mcp,teamMemorySync,PromptSuggestion) expose long-lived back-end abstractions: API clients, telemetry, plugin orchestration, policy enforcement, and synchronization with upstream systems.src/skillsandsrc/pluginsprovide the registry/definitions for bundled and third-party intelligence tools that augment the agent’s capabilities.src/query,src/QueryEngine.ts, andsrc/queries(if present) orchestrate the planning/execution engine that dispatches tasks and interprets results.
src/serverandsrc/bridgehouse the server-side adapters and the IPC layer used by the CLI, desktop, or web clients to reach the Claude Code core.src/context.ts,src/history.ts,src/memdir, andsrc/projectOnboardingState.tscontain persistence/metadata helpers for sessions, memory states, and onboarding progress.src/utilsis a sprawling utility belt (subfolders likebackground,settings,memory,mcp,permissions,telemetry,git,sandbox, etc.) that keep the platform cohesive: storage helpers, permission checks, telemetry helpers, sandbox controls, Git helpers, CLI helpers, and more.src/constants,src/schemas,src/types, and generated type bundles define shared contracts, configuration schemas, and TypeScript types.
src/native-tshouses TypeScript bindings for native modules (yoga layout, file index, color diff) that the renderer or CLI leverage for formatting and diffing.src/vimcontains Vim integration glue.src/voice,src/bridge, andsrc/remotemanage audio/voice helpers, remote bridge connections, and remote runtime orchestration.
src/migrationscodifies data migrations for storage/backwards compatibility.src/services/autoDream,src/services/toolUseSummary, andsrc/services/tipskeep automated features, analytics, and tips in sync with the rest of the system.
src/cost-tracker.ts,src/costHook.ts, andsrc/monitoring(if present) track usage costs and integrate with telemetry/analytics.src/remote,src/coordinator,src/state, andsrc/outputStylesprepare the shared runtime for remote coordination, CLI output formatting, and shared state machines.
This layout allows the Claude Code runtime to mix React-based UI, Ink terminals, agent commands, threaded tasks, and native extensions while keeping tooling, services, and plugins modular.
- All source code contained in this repository is copyrighted by Anthropic.
- This repository is provided solely for technical research, study, and reference purposes. Commercial use is strictly prohibited.
- If any infringement is found, please contact to delete.