MCPcopy Index your code
hub / github.com/codingmoh/open-codex

github.com/codingmoh/open-codex @0.1.19

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.1.19 ↗ · + Follow
16 symbols 61 edges 7 files 1 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Open Codex

Open Codex CLI

Lightweight coding agent that runs in your terminal

brew tap codingmoh/open-codex && brew install open-codex

Codex demo GIF using: codex "explain this codebase to me"


Open Codex is a fully open-source command-line AI assistant inspired by OpenAI Codex, supporting local language models like phi-4-mini.

No API key is required. Everything runs locally.

Supports: - One-shot mode: open-codex "list all folders" -> returns shell command - 🧠 Local-only execution using supported OS models (currently phi-4-mini)


✨ Features

  • Natural Language to Shell Command (via local models)
  • Works on macOS, Linux, and Windows (Python-based)
  • Confirmation before execution
  • Add to clipboard / abort / execute prompt
  • One-shot interaction mode (interactive and function-calling coming soon)
  • Colored terminal output for better readability

🧱 Future Plans

  • Interactive, context aware mode
  • Fancy TUI with textual or rich
  • Add support for additional OSS Models
  • Full interactive chat mode
  • Function-calling support
  • Voice input via Whisper
  • Command history and undo
  • Plugin system for workflows

📦 Installation

🔹 Option 1: Install via Homebrew (Recommended for MacOS)

brew tap codingmoh/open-codex
brew install open-codex

🔹 Option 2: Install via pipx (cross-platform)

pipx install open-codex

🔹 Option 3: Clone & Install locally

git clone https://github.com/codingmoh/open-codex.git
cd open_codex
pip install .

Once installed, you can use the open-codex CLI globally.


🚀 Usage

One-shot mode

open-codex "untar file abc.tar"

✅ Codex suggests a shell command
✅ Asks for confirmation / add to clipboard / abort
✅ Executes if approved


🛡️ Security Notice

All models run locally. Commands are only executed after explicit approval.


🧑‍💻 Contributing

PRs welcome! Ideas, issues, improvements — all appreciated.


📝 License

MIT


❤️ Built with love and caffeine by codingmoh.

Core symbols most depended-on inside this repo

suppress_native_stderr
called by 2
src/open_codex/agents/phi_4_mini.py
get_agent
called by 1
src/open_codex/agent_builder.py
get_keypress
called by 1
src/open_codex/main.py
print_response
called by 1
src/open_codex/main.py
one_shot_mode
called by 1
src/open_codex/main.py
print_help_message
called by 1
src/open_codex/main.py
main
called by 1
src/open_codex/main.py
one_shot_mode
called by 1
src/open_codex/interfaces/llm_agent.py

Shape

Method 8
Function 5
Class 3

Languages

Python100%

Modules by API surface

src/open_codex/agents/phi_4_mini.py6 symbols
src/open_codex/main.py5 symbols
src/open_codex/agent_builder.py3 symbols
src/open_codex/interfaces/llm_agent.py2 symbols

For agents

$ claude mcp add open-codex \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact