Skip to main content
Claw Code is a Python rewrite of Claude Code’s agent harness. It gives you a CLI-driven runtime for routing prompts to tools and commands, managing sessions, auditing parity against the original TypeScript architecture, and orchestrating multi-turn agent loops.

Quick Start

Run your first command in under a minute

Installation

Set up Claw Code in your Python environment

CLI Reference

Explore every subcommand and flag

Python API

Use PortRuntime and QueryEnginePort directly

What you can do

Route prompts

Match natural language prompts to commands and tools using the fuzzy routing engine

Manage sessions

Persist transcripts, reload sessions, and track token usage across turns

Audit parity

Compare the Python workspace against the original TypeScript archive

Remote modes

Simulate SSH, Teleport, remote-control, and deep-link runtime branching

Get started

1

Clone the repository

git clone https://github.com/instructkr/claw-code.git
cd claw-code
2

Verify your Python environment

Claw Code requires Python 3.10 or later. No additional dependencies are needed for the core runtime.
python3 --version
3

Run your first command

Render a summary of the porting workspace:
python3 -m src.main summary
4

Explore commands and tools

List the mirrored command and tool inventories:
python3 -m src.main commands --limit 10
python3 -m src.main tools --limit 10
A Rust port is in progress on the dev/rust branch, targeting a faster, memory-safe harness runtime. The Python workspace is the current stable implementation.

Build docs developers (and LLMs) love