Skip to content
Phi Trần tuấn edited this page Jun 30, 2026 · 2 revisions

open-cli-codex


**`fw.py`** is a stdlib-only Python CLI coding agent supporting 12 AI providers, an agentic tool-calling loop, SQLite sessions, MCP, and per-session sandboxing. The project is owned by **Trần Tuấn Phi**.

> ⚠️ This is not a standard open-source license — see the License section in the README before using or redistributing.

---

## Quick Start

```bash
git clone https://github.com/phiiggfdg/Open-cli-codex.git
cd Open-cli-codex
pip install .
opencli

Or run directly without installing:

export FIREWORKS_API_KEY="your_key_here"
python fw.py

➡️ Details: Installation


Navigation

Page Content
Installation System requirements, pip install, running directly, Termux/Android
Architecture Module map, why a shared exec() namespace, mandatory load order
Providers 12 built-in providers + how to add a custom provider
Agent Tools 20 built-in tools: file I/O, search, web, planning, orchestration
Slash Commands All / commands in the REPL
Custom Commands Build your own slash commands via .fw_data/commands/*.md
Permissions & Sandbox Agent mode, per-tool permissions, sandboxed project_dir
MCP Integration Model Context Protocol support
Configuration config.json, API keys, AGENTS.md, checkpoints, cache
FAQ & Troubleshooting Common issues and fixes

Core Features

  • Multi-format provider engine — internally speaks only OpenAI chat-completions format; two adapters translate to/from Anthropic Messages API and AWS Bedrock Converse.
  • Agentic loop — parallel tool calls, prompt-cache–aware history pruning, auto-continue on truncated output.
  • SQLite sessions — automatic context compaction at ~80k tokens.
  • MCP client integration (via the commandcode provider).
  • Per-session sandbox — each session runs in its own isolated working directory.
  • Undo/redo for every file edit.
  • Extended thinking / reasoning support — Claude extended thinking and DeepSeek-style reasoning with correct round-trip replay.
  • Modern terminal UI — gradient banners, braille spinners, ANSI fallback when rich isn't installed.

Contact & License

Author: Trần Tuấn Phi · Email: phihhhhhhhhhh@gmail.com · All source code, system prompts, and prompt engineering patterns are the author's exclusive intellectual property. See the License section in the README for full terms.

Clone this wiki locally