What is claw-code
claw-code is aClaude Code Clean-room Rewrite project launched after the source code leak. To avoid legal risks, the author used OpenAI Codex's OmX workflow orchestration to port the core architecture from TypeScript to a Python implementation in just a few hours. The project retains the original Agent workflow and tool orchestration capabilities as an open-source alternative, and is currently being further ported to Rust to provide a more efficient runtime. The project emphasizes "Better Harness Tools" to build a truly usable open-source Agent development framework.
Main features of claw-code
-
Agent workflow orchestration: The core architecture of the Agent system responsible for tool connection, task orchestration, and runtime context management.
-
Tool system: A modular tool framework that provides tool call chain management and tool port metadata definition.
-
Command management: A modular command system and port metadata management that encapsulates various development operations.
-
Task scheduling: A task state management and scheduling system that supports asynchronous processing and execution loops.
-
Query engine: A query processing engine that supports code understanding, context retrieval, and codebase analysis.
-
CLI interactive interface: Provides a command-line entry point for viewing migration summaries, inventories, and interactive operations.
-
Runtime context management: A persistent context management system that maintains conversation history and execution state.
-
Automated code generation: Automated development capabilities for code understanding, generation, and refactoring based on AI.
How to use claw-code
- Environment preparation: Ensure that Python 3 is installed locally, clone the project repository locally, and then enter the root directory.
- View overview: By running the main module command, you can view summary information about the current Python porting work as well as the complete workspace structure inventory.
- Explore modules: Use the corresponding command to list system submodules, available command interfaces, and supported tools.
- Run tests: Run the test discovery command to execute the verification test suite and ensure the correctness of the ported code.
- Comparison audit: When the original archive exists locally, you can run a consistency audit to check the degree of functional alignment between the ported version and the original code.
Key information and usage requirements of claw-code
-
Project nature: A Clean-room Rewrite after the Claude Code source code leak, not an official archive.
-
Tech stack: Currently a Python implementation (
src/directory), the Rust version (dev/rustbranch) is about to be merged, pursuing memory safety and high performance. -
Core positioning: An Agent development framework that provides Harness capabilities such as tool orchestration, command management, task scheduling, and query engine.
-
Development method: Uses oh-my-codex (OmX) AI workflow orchestration throughout,teammode parallel review, ralph mode persistent verification.
-
Current status: The basic Python framework is already usable, but it has not yet achieved full runtime equivalence with the original TypeScript system; the Rust version will be the final form.
-
Environment: Python 3 is required; clone the repository and run it.
Core advantages of claw-code
-
Legal safety: It adopts a clean-room rewrite approach and is independently implemented from scratch, completely avoiding the copyright infringement and legal litigation risks caused by using leaked source code.
-
Open source freedom: As a fully open source project, it is not subject to commercial software restrictions, and developers can freely modify, extend, and deeply customize the Agent workflow and toolchain.
-
Technical advancement: It is being ported to the Rust language, which provides memory safety, higher runtime performance, and system-level stability compared with the original TypeScript implementation.
-
AI-native development: The entire development process uses the oh-my-codex AI workflow for orchestration, representing the engineering paradigm and automated build capabilities of future AI-assisted programming.
-
Functional completeness: It fully preserves Claude Code's core Harness capabilities, including key functions such as Agent workflow orchestration, the tool system, command management, and task scheduling.
claw-code project address
- GitHub repository:https://github.com/instructkr/claw-code
Comparison of claw-code with similar competitors
| Comparison dimension | claw-code | Claude Code | Aider |
|---|---|---|---|
| Core positioning | A clean-room rewritten open source alternative framework to Claude Code, providing complete Agent Harness workflow orchestration capabilities | Anthropic's official closed source AI programming Agent, providing end-to-end code generation and task execution | An open source terminal AI pair programming assistant, focusing on code editing and Git integration |
| Open source license | Fully open source (public GitHub repository), supporting free modification, secondary development, and private deployment | Closed source commercial software, limited to official clients or API use, with no source code available for customization | Open source (public GitHub repository), supporting multi-model configuration and terminal integration |
| Legal compliance | Adopts a clean-room rewrite and is independently implemented from scratch, completely avoiding the copyright infringement and legal litigation risks caused by source code leaks | The source code has experienced leaks, and using leaked code carries potential legal risks and compliance disputes | An independently developed open source project with no copyright disputes, compliant and safe |
| Technical architecture | Currently implemented in Python and being ported to Rust in pursuit of memory safety and high performance, providing a modular Harness runtime | The official implementation built on TypeScript, with a closed architecture that cannot be independently optimized or deeply deployed locally | A Python-based terminal tool that implements code modification through editor integration and lacks a systematic Agent runtime |
| Workflow capabilities | Provides complete Harness workflow orchestration, tool system, command management, and task scheduling, supporting complex multi-step automation | Provides end-to-end Agent capabilities, but is limited to official preset functions and cannot customize workflow orchestration logic | Supports conversational code editing and Git commits, but lacks multi-toolchain orchestration and complex task scheduling capabilities |
| Context management | Supports persistent execution loops and long-term context maintenance, suitable for handling large project understanding and refactoring across sessions | Has powerful context window management, but is limited by the session and rate limits of the commercial service | Based on the context of the current session, it is difficult to maintain long-term execution state and complex project-level memory |
| Toolchain integration | The modular design supports deeply customized tool invocation chains, and can integrate any third-party development tools and internal systems | Closed ecosystem, only supports officially integrated tools, and cannot extend enterprise private toolchains | Mainly integrates Git and editors, with limited toolchain extensibility |
Application scenarios of claw-code
-
AI-assisted programming: As an open-source alternative to Claude Code, it provides intelligent programming assistant capabilities for automatic code generation, completion, refactoring, and error fixing.
-
Intelligent codebase analysis: Uses a query engine to deeply understand the structure of large codebases, enabling cross-file semantic retrieval, architecture analysis, and automatic documentation generation.
-
Automated workflow orchestration: Uses the Harness system to orchestrate complex multi-step development tasks, such as automated builds, deployment pipelines, and continuous integration script management.
-
Toolchain integration and extension: As a modular Agent framework, it integrates various development tools (Git, testing frameworks, Linters) to achieve unified command scheduling and tool invocation.
-
Code migration and refactoring: Supports automated refactoring of large-scale codebases, language migration (such as Python to Rust), and architectural modernization.