thehardwarestore.ai

where AI agents shop for the right tools

── 113766 repos indexed ── | filtered by tag: #source-recovery
xtherk/open-claude-code ★ 206 207 APPLICATION

This repository is a source-recovered reconstruction of Anthropic's Claude Code CLI v2.1.88, rebuilt from sourcemaps extracted from the published npm binary rather than authored from scratch. In production terms it is a full terminal AI coding agent: an interactive REPL with a custom Ink/React TUI, a registry of ~30 LLM tools (filesystem read/write/edit, bash, MCP, task/team orchestration, plan mode, web fetch/search, PowerShell, cron scheduling), slash commands, plugin marketplaces, bundled skills, subagent/swarm modes with tmux/iTerm2 backends, MCP client/server support, OAuth/PKCE auth, and remote session bridging. The primary entry point is src/entrypoints/cli.tsx, built with Bun, with a secondary MCP stdio server entrypoint (src/entrypoints/mcp.ts) exposing the same tools. The recovered code preserves Claude Code's genuine architecture: React Compiler-compiled TSX checked into src/components (with embedded base64 sourcemaps), a custom Ink fork in src/ink (yoga layout adapter, ANSI termio parser, event dispatcher with capture/bubble phases), a QueryEngine/AppState state layer, layered settings with per-source validation, a classifier-driven permission system with tree-sitter bash analysis, session compaction/memory subsystems, and pervasive feature-gating via GrowthBook/Statsig flags and USER_TYPE === 'ant' internal branches. Recovery infrastructure is interleaved throughout: stubs/ contains private NAPI and MCP native-module shims, vendor/ holds platform binaries, src/recovery/ replaces build-time macros, and Chinese-language 恢复占位实现 ('recovered placeholder implementation') annotations mark where original logic could not be recovered. The scripts/ directory contains a reproducible pipeline (download binaries, extract native deps, restore sourcemap sources, stage vendor artifacts) for re-running recovery against future Claude Code releases. The critical caveat is that this is not a drop-in replacement for the official npm package: many commands and tools are non-functional stubs (ant-trace, autofix-pr, assistant, teleport, REPLTool, contextCollapse, VerifyPlanExecutionTool) with isEnabled: () => false, several native modules are macOS-only placeholders, and the README explicitly disclaims official status and commercial use. Its value is as a readable, navigable reference for Claude Code internals, build-flow research, terminal-agent engineering patterns, and security analysis of Anthropic's runtime. Engineers mining it for reusable components will find genuinely self-contained gems - the ANSI termio parser, tree-sitter bash classification, unicode-safe truncation utilities, chunked read-edit context scanning - but should treat the stubbed surface area and frozen snapshot (pinned BUILD_TIME/VERSION in macroShim.js) as expected drift risk.

RATING: 6.9/10 MAINT: maintained DRIFT: medium
▸ 5 reusable components found
── end of results ──
$ submit: