# ClawCodex — Python Rebuild of Claude Code > ClawCodex is a Python rebuild of Claude Code with a working CLI agent, streaming REPL, optional TUI, and provider/model overrides for scripted runs. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash git clone https://github.com/agentforce314/clawcodex.git cd clawcodex python3 -m venv .venv && source .venv/bin/activate pip install -r requirements.txt python -m src.cli login python -m src.cli ``` ## Intro ClawCodex is a Python rebuild of Claude Code with a working CLI agent, streaming REPL, optional TUI, and provider/model overrides for scripted runs. **Best for:** teams who want a hackable Claude Code-like loop in Python **Works with:** Python 3.10+, local repos, multiple LLM providers (per README), terminals (REPL/TUI) **Setup time:** 10-20 minutes ### Key facts (verified) - GitHub: 228 stars · 17 forks · pushed 2026-05-13. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-verified entrypoint: `pip install -r requirements.txt`. ## Main - Follow the README quick install to bootstrap a venv, run `login` (writes `~/.clawcodex/config.json`), then start the REPL. - Use the CLI modes as building blocks: interactive REPL by default, `--tui` for a Textual UI, and `-p` for non-interactive scripting. - Treat provider/model overrides as a reproducibility tool in CI (README shows `--provider` and `--model` flags). ### Source-backed notes - README quick install shows `python -m src.cli login` and `python -m src.cli` to start the REPL. - README lists a complete CLI including `--tui`, `--stream`, `config`, and `-p` scripting examples. - README documents permission-mode flags like `--permission-mode plan` and `--dangerously-skip-permissions` (with safety notes). ### FAQ - **Is it a runnable CLI or just a port?**: README positions it as a working CLI agent, not just a source dump. - **Where does it store config?**: README says login writes to `~/.clawcodex/config.json`. - **Can I use it in scripts?**: Yes — README shows `clawcodex -p "..."` with JSON outputs. ## Source & Thanks > Source: https://github.com/agentforce314/clawcodex > License: MIT > GitHub stars: 228 · forks: 17 --- ## Quick Use ```bash git clone https://github.com/agentforce314/clawcodex.git cd clawcodex python3 -m venv .venv && source .venv/bin/activate pip install -r requirements.txt python -m src.cli login python -m src.cli ``` ## Intro ClawCodex 是 Claude Code 的 Python 重构版,提供可用的 CLI agent、流式 REPL 与可选 TUI,并支持以 provider/model 覆盖参数进行脚本化运行。 **Best for:** 想在 Python 里复现 Claude Code 式循环并便于二开的团队 **Works with:** Python 3.10+;本地仓库;多模型提供方(README 说明);终端 REPL/TUI **Setup time:** 10-20 minutes ### Key facts (verified) - GitHub:228 stars · 17 forks;最近更新 2026-05-13。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中核对过的入口命令:`pip install -r requirements.txt`。 ## Main - 按 README 的快速安装流程创建 venv,执行 `login`(写入 `~/.clawcodex/config.json`),然后启动 REPL。 - 把不同运行模式当积木:默认交互式 REPL;`--tui` 启动 Textual UI;`-p` 用于非交互脚本化调用。 - 在 CI 中用 provider/model 覆盖参数保证可复现(README 给了 `--provider/--model` 示例)。 ### Source-backed notes - README 快速安装部分包含 `python -m src.cli login` 与 `python -m src.cli` 启动 REPL 的示例。 - README 的 CLI 列表包含 `--tui/--stream/config` 与 `-p` 脚本示例。 - README 说明了 `--permission-mode plan`、`--dangerously-skip-permissions` 等权限参数及安全提示。 ### FAQ - **它是可运行 CLI 还是仅代码搬运?**:README 强调它是可用 CLI agent,而不是仅源码移植。 - **配置文件存在哪里?**:README 说明 login 会写入 `~/.clawcodex/config.json`。 - **能脚本化使用吗?**:可以。README 给出 `clawcodex -p "..."` 与 JSON 输出示例。 ## Source & Thanks > Source: https://github.com/agentforce314/clawcodex > License: MIT > GitHub stars: 228 · forks: 17 --- Source: https://tokrepo.com/en/workflows/clawcodex-python-rebuild-of-claude-code Author: Agent Toolkit