Claw Code : Run the Leaked Claude Code Locally (Legally)
Anthropic's AI Code Leak: The Rise of Open-Source Alternatives
Introduction to the Incident
- Anthropic's multi-billion dollar coding agent, Claude, had its source code leaked, comprising 500,000 lines.
- The speaker warns against downloading malicious repositories or using leaked code due to legal and security risks.
The Open-Source Response
- A group of elite developers created Claw Code, an open-source alternative that gained 100,000 stars on GitHub rapidly.
- Instead of copying the leaked code directly, developers utilized AI to rewrite the architecture in Rust and Python legally.
Clean Room Design Explained
- The concept of clean room design is introduced; it allows for copyrighting logic but not source code under US law.
- Developers studied how Claude manages memory and orchestrates tools without copying any illegal files.
Building Claw Code
- Two paths emerged from the project:
- Path A offers a fast native Rust build.
- Path B utilizes a community wrapper called OpenClaude for local models.
Setting Up Claw Code Locally
- Instructions are provided for setting up the official Rust build which requires an anthropic API key.
- Steps include installing Rust via terminal commands and cloning the Claw Code repository.
Compiling and Running the Application
- After navigating into the directory, users compile the application with
cargo build-release, creating a highly optimized executable.
- Once built, users export their anthropic key and launch Claw Code successfully.
Future Directions in Open Source AI
- Discussion on leveraging custom APIs or free local models through wrappers like OpenClaude to avoid costs associated with Anthropic’s services.