Skip to content

Installation

Phi Trần tuấn edited this page Jun 30, 2026 · 1 revision
# Installation

## Requirements

- Python 3.10+
- No third-party packages required for the core (stdlib-only)
- An API key for at least one supported provider
- Optional: install [`rich`](https://github.com/Textualize/rich) for the full terminal UI (gradient banners, braille spinners...). Without it, the app falls back to plain ANSI (`HAS_RICH` guard).

## Install via pip (recommended)

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

Then run from anywhere:

opencli

Run directly (no install)

export FIREWORKS_API_KEY="your_key_here"
python fw.py

Termux / Android

This project is developed and tested mainly on Termux. Notes:

  • pip install always needs --break-system-packages:
    pip install . --break-system-packages
  • No sudo on Termux — don't use apt, systemctl, or anything requiring root, including when the agent's bash tool runs in this environment.

Setting your API key

Two ways:

  1. Environment variable before running — see the provider table on the Providers page for the matching variable name (e.g. FIREWORKS_API_KEY, COHERE_API_KEY...).
  2. Inside the app — use /setkey after entering the REPL to save/change a key (empty Enter clears the saved key). See Slash Commands.

Expected install layout

fw.py
.fw_data/
├── AGENTS.md          # project rules for the agent (see [[Configuration]])
├── src/                # 12 modules exec()'d into one shared namespace
└── commands/           # your custom slash commands (*.md)

fw.py auto-detects .fw_data/src/ from 3 candidate locations (same directory, sys.prefix, or two parent levels up) — if none is found it raises a FileNotFoundError telling you to check the install layout.

➡️ See how these modules load and why order matters in Architecture.

Clone this wiki locally