docs: update README with enhanced fork features and clean formatting

- Remove all OpenAI references and fix typos (coderr -> coder)
- Highlight key improvements over upstream:
  - Browser integration (CDP/headless)
  - Multi-agent commands (/plan, /solve, /code)
  - Theme system (/themes)
  - Reasoning control (/reasoning)
- Add comprehensive legal section with responsible use guidelines
- Improve structure and markdown formatting
- Update branding to @just-every/coder

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
James Peter
2025-08-12 14:51:57 +10:00
co-authored by Hanzo Dev
parent 010f229931
commit ecd910c449
+201 -330
View File
@@ -1,399 +1,270 @@
# Coder CLI - Enhanced Terminal Coding Agent
# JustEvery Coder
**Coder CLI** is an enhanced fork of OpenAI's Codex CLI that brings powerful AI coding assistance directly to your terminal with additional features for improved developer experience.
**Coder** is a fast, local-first coding agent for your terminal. It's a community-driven fork focused on real developer ergonomics: Chrome DevTools automation, multi-agent flows, live theming, and on-the-fly reasoning control - all while staying compatible with upstream.
<p align="center"><strong>Codex CLI</strong> is a coding agent from OpenAI that runs locally on your computer.</br>If you are looking for the <em>cloud-based agent</em> from OpenAI, <strong>Codex Web</strong>, see <a href="https://chatgpt.com/codex">chatgpt.com/codex</a>.</p>
## Why Coder
<p align="center">
<img src="./.github/codex-cli-splash.png" alt="Codex CLI splash" width="50%" />
</p>
---
<details>
<summary><strong>Table of contents</strong></summary>
<!-- Begin ToC -->
- [Quickstart](#quickstart)
- [Installing and running Codex CLI](#installing-and-running-codex-cli)
- [Using Codex with your ChatGPT plan](#using-codex-with-your-chatgpt-plan)
- [Connecting on a "Headless" Machine](#connecting-on-a-headless-machine)
- [Authenticate locally and copy your credentials to the "headless" machine](#authenticate-locally-and-copy-your-credentials-to-the-headless-machine)
- [Connecting through VPS or remote](#connecting-through-vps-or-remote)
- [Usage-based billing alternative: Use an OpenAI API key](#usage-based-billing-alternative-use-an-openai-api-key)
- [Choosing Codex's level of autonomy](#choosing-codexs-level-of-autonomy)
- [**1. Read/write**](#1-readwrite)
- [**2. Read-only**](#2-read-only)
- [**3. Advanced configuration**](#3-advanced-configuration)
- [Can I run without ANY approvals?](#can-i-run-without-any-approvals)
- [Fine-tuning in `config.toml`](#fine-tuning-in-configtoml)
- [Example prompts](#example-prompts)
- [Running with a prompt as input](#running-with-a-prompt-as-input)
- [Using Open Source Models](#using-open-source-models)
- [Platform sandboxing details](#platform-sandboxing-details)
- [Experimental technology disclaimer](#experimental-technology-disclaimer)
- [System requirements](#system-requirements)
- [CLI reference](#cli-reference)
- [Memory & project docs](#memory--project-docs)
- [Non-interactive / CI mode](#non-interactive--ci-mode)
- [Model Context Protocol (MCP)](#model-context-protocol-mcp)
- [Tracing / verbose logging](#tracing--verbose-logging)
- [DotSlash](#dotslash)
- [Configuration](#configuration)
- [FAQ](#faq)
- [Zero data retention (ZDR) usage](#zero-data-retention-zdr-usage)
- [Codex open source fund](#codex-open-source-fund)
- [Contributing](#contributing)
- [Development workflow](#development-workflow)
- [Writing high-impact code changes](#writing-high-impact-code-changes)
- [Opening a pull request](#opening-a-pull-request)
- [Review process](#review-process)
- [Community values](#community-values)
- [Getting help](#getting-help)
- [Contributor license agreement (CLA)](#contributor-license-agreement-cla)
- [Quick fixes](#quick-fixes)
- [Releasing `codex`](#releasing-codex)
- [Security & responsible AI](#security--responsible-ai)
- [License](#license)
<!-- End ToC -->
</details>
---
- 🌐 **Browser Integration** - CDP support, headless browsing, screenshots
- 🤖 **Multi-Agent Commands** - /plan, /solve, /code with agent panels
- 🎨 **Theme System** - /themes with live preview and accessibility
- 🧠 **Reasoning Control** - /reasoning for dynamic effort adjustment
- 🔌 **MCP support** – Extend with filesystem, DBs, APIs, or your own tools.
- 🔒 **Safety modes** – Read-only, approvals, and workspace sandboxing.
- 🔁 **Backwards compatible** – Supports `~/.codex/*` or default `~/.coder/*`
## Quickstart
### Installing and running Codex CLI
### Install Coder
Install globally with your preferred package manager:
```shell
npm install -g @openai/codex # Alternatively: `brew install codex`
```
Then simply run `codex` to get started:
```shell
codex
```
<details>
<summary>You can also go to the <a href="https://github.com/openai/codex/releases/latest">latest GitHub Release</a> and download the appropriate binary for your platform.</summary>
Each GitHub Release contains many executables, but in practice, you likely want one of these:
- macOS
- Apple Silicon/arm64: `codex-aarch64-apple-darwin.tar.gz`
- x86_64 (older Mac hardware): `codex-x86_64-apple-darwin.tar.gz`
- Linux
- x86_64: `codex-x86_64-unknown-linux-musl.tar.gz`
- arm64: `codex-aarch64-unknown-linux-musl.tar.gz`
Each archive contains a single entry with the platform baked into the name (e.g., `codex-x86_64-unknown-linux-musl`), so you likely want to rename it to `codex` after extracting it.
</details>
### Using Codex with your ChatGPT plan
<p align="center">
<img src="./.github/codex-cli-login.png" alt="Codex CLI login" width="50%" />
</p>
Run `codex` and select **Sign in with ChatGPT**. You'll need a Plus, Pro, or Team ChatGPT account, and will get access to our latest models, including `gpt-5`, at no extra cost to your plan. (Enterprise is coming soon.)
> Important: If you've used the Codex CLI before, follow these steps to migrate from usage-based billing with your API key:
>
> 1. Update the CLI and ensure `codex --version` is `0.20.0` or later
> 2. Delete `~/.codex/auth.json` (this should be `C:\Users\USERNAME\.codex\auth.json` on Windows)
> 3. Run `codex login` again
If you encounter problems with the login flow, please comment on [this issue](https://github.com/openai/codex/issues/1243).
### Connecting on a "Headless" Machine
Today, the login process entails running a server on `localhost:1455`. If you are on a "headless" server, such as a Docker container or are `ssh`'d into a remote machine, loading `localhost:1455` in the browser on your local machine will not automatically connect to the webserver running on the _headless_ machine, so you must use one of the following workarounds:
#### Authenticate locally and copy your credentials to the "headless" machine
The easiest solution is likely to run through the `codex login` process on your local machine such that `localhost:1455` _is_ accessible in your web browser. When you complete the authentication process, an `auth.json` file should be available at `$CODEX_HOME/auth.json` (on Mac/Linux, `$CODEX_HOME` defaults to `~/.codex` whereas on Windows, it defaults to `%USERPROFILE%\.codex`).
Because the `auth.json` file is not tied to a specific host, once you complete the authentication flow locally, you can copy the `$CODEX_HOME/auth.json` file to the headless machine and then `codex` should "just work" on that machine. Note to copy a file to a Docker container, you can do:
```shell
# substitute MY_CONTAINER with the name or id of your Docker container:
CONTAINER_HOME=$(docker exec MY_CONTAINER printenv HOME)
docker exec MY_CONTAINER mkdir -p "$CONTAINER_HOME/.codex"
docker cp auth.json MY_CONTAINER:"$CONTAINER_HOME/.codex/auth.json"
```
whereas if you are `ssh`'d into a remote machine, you likely want to use [`scp`](https://en.wikipedia.org/wiki/Secure_copy_protocol):
```shell
ssh user@remote 'mkdir -p ~/.codex'
scp ~/.codex/auth.json user@remote:~/.codex/auth.json
```
or try this one-liner:
```shell
ssh user@remote 'mkdir -p ~/.codex && cat > ~/.codex/auth.json' < ~/.codex/auth.json
```
#### Connecting through VPS or remote
If you run Codex on a remote machine (VPS/server) without a local browser, the login helper starts a server on `localhost:1455` on the remote host. To complete login in your local browser, forward that port to your machine before starting the login flow:
## Installation
```bash
npm install -g @just-every/coder
```
Then run:
```bash
coderr
```
## Key Features
### 🎯 Core Capabilities
- **AI-powered coding agent** that runs locally in your terminal
- **File operations**: Read, write, and modify files with AI assistance
- **Command execution**: Run shell commands with intelligent context
- **Project understanding**: Analyzes your codebase to provide relevant suggestions
### ✨ Enhanced Features (Fork Additions)
- **Image Support**: Drag-and-drop, paste, or reference images directly in the terminal
- **Dynamic Reasoning**: Adjust AI reasoning effort mid-conversation with `/reasoning` command
- **Flexible Configuration**: Uses `~/.coder` directory (or `~/.codex` for compatibility)
## Quick Start
### 1. Install and Launch
```bash
npm install -g @just-every/coder
coder
```
### 2. Authenticate
You can use Coder CLI with:
- **ChatGPT Plus/Pro subscription** (recommended)
- **OpenAI API key** (usage-based billing)
**Authenticate** (one of the following):
- **Sign in with ChatGPT** (Plus/Pro/Team; uses models available to your plan)
- Run `coder` and pick "Sign in with ChatGPT"
- Stores creds locally at `~/.coder/auth.json` (also reads legacy `~/.codex/auth.json`)
- **API key** (usage-based)
- Set `export OPENAI_API_KEY=xyz` and run `coder`
### 3. Choose Autonomy Level
### Install Claude & Gemini (optional)
**Read/Write Mode** (default - full capabilities):
```bash
coderr
```
**Read-Only Mode** (safer, no file modifications):
```bash
coder --read-only
```
## Example Usage
Coder supports orchestrating other AI CLI tools. Install these and config to use alongside coder.
```bash
# Start an interactive session
code
npm install -g @anthropic-ai/claude-code
claude
# Run with a specific prompt
code "refactor this function to use async/await"
# Analyze code without making changes
code --read-only "explain the authentication flow"
# Adjust reasoning effort
/reasoning high # More thorough analysis
/reasoning low # Faster responses
npm install -g @google/gemini-cli
gemini
```
## Common Tasks
- **Debug code**: "Why is this function returning null?"
- **Add features**: "Add error handling to all API calls"
- **Refactor**: "Convert this class to use TypeScript"
- **Explain**: "How does the authentication system work?"
- **Generate tests**: "Write unit tests for the user service"
## Configuration
Configuration file location: `~/.code/config.toml` (or set `CODE_HOME` environment variable)
### Basic Configuration
```toml
# Model selection
model = "gpt-5"
# Approval settings
approval_policy = "ask" # ask | automatic | never
# Feature flags
hide_agent_reasoning = false
```
### Environment Variables
- `CODE_HOME` or `CODEX_HOME`: Override default config directory
- `OPENAI_API_KEY`: Use OpenAI API directly
- `OPENAI_BASE_URL`: Use alternative API endpoints
## Enhanced Image Support
The fork adds comprehensive image handling:
1. **Drag and drop** images directly into the terminal
2. **Paste** images from clipboard
3. **Reference** image files by path: "analyze screenshot.png"
## Using the /reasoning Command
Dynamically adjust the AI's reasoning effort:
```
/reasoning high # Detailed analysis, slower
/reasoning medium # Balanced (default)
/reasoning low # Quick responses
```
## Terminal Interface Tips
### Text Selection
- **Press Ctrl+M** to toggle between mouse modes:
- **Scrolling mode** (default): Mouse wheel scrolls chat history
- **Selection mode**: Allows text selection and copying
- The status bar shows current mouse mode
### Keyboard Shortcuts
- **Enter**: Submit your message
- **Up/Down arrows**: Navigate command history
- **Ctrl+M**: Toggle mouse capture (scrolling vs text selection)
- **Ctrl+C**: Cancel current operation
- **Ctrl+D**: Exit the application
## System Requirements
- **Operating Systems**: macOS, Linux, Windows (WSL recommended)
- **Node.js**: Version 20 or higher
- **Terminal**: Modern terminal with UTF-8 support
- **Memory**: 4GB RAM minimum, 8GB recommended
## Command Line Options
## Commands
### Browser
```bash
# Connect coder to your Chrome browser (running CDP)
/browser local
# Use a headless browser (Agent can also enable)
/browser https://example.com
```
### Agents
```bash
# Plan code changes (Claude, Gemini and GPT-5 consensus)
# All agents review task and create a consolidated plan
/plan "Stop the AI from ordering pizza at 3AM"
# Solve complex problems (Claude, Gemini and GPT-5 race)
# Fastest preferred (see https://arxiv.org/abs/2505.17813)
/solve "Why does deleting one user drop the whole database?"
# Write code! (Claude, Gemini and GPT-5 consensus)
# Creates multiple worktrees then implements the optimal solution
/code "Show dark mode when I feel cranky"
```
### General
```bash
# Try a new theme
/themes
# Change reasoning level
/reasoning low|medium|high
# Change model
/model gpt-5-mini
# Start new conversation
/new
```
## CLI reference
```shell
coder [options] [prompt]
Options:
--model <name> Override the model (e.g., gpt-5, claude-opus)
--read-only Prevent file modifications
--no-approval Skip approval prompts (use with caution)
--config <key=val> Override config values
--help Show help information
--version Show version number
--model <name> Override the model (gpt-5, claude-opus, etc.)
--read-only Prevent file modifications
--no-approval Skip approval prompts (use with caution)
--config <key=val> Override config values
--oss Use local open source models
--sandbox <mode> Set sandbox level (read-only, workspace-write, etc.)
--help Show help information
--version Show version number
```
## Advanced Features
## Memory & project docs
### Model Context Protocol (MCP)
Coder CLI supports MCP for extended capabilities:
- File system operations
- Web browsing
- Database connections
- Custom tool integrations
### Project Documentation
Create a `CODEX.md` file in your project root to provide context:
Coder can remember context across sessions:
1. **Create an `AGENTS.md` or `CLAUDE.md` file** in your project root:
```markdown
# Project Overview
This is a React application using TypeScript...
# Project Context
This is a React TypeScript application with:
- Authentication via JWT
- PostgreSQL database
- Express.js backend
## Key Components
- Authentication: src/auth/*
- API Client: src/api/*
## Key files:
- `/src/auth/` - Authentication logic
- `/src/api/` - API client code
- `/server/` - Backend services
```
### Non-Interactive Mode
2. **Session memory**: Coder maintains conversation history
3. **Codebase analysis**: Automatically understands project structure
For CI/CD pipelines:
## Non-interactive / CI mode
```bash
coder --non-interactive "update all dependencies"
For automation and CI/CD:
```shell
# Run a specific task
coder --no-approval "run tests and fix any failures"
# Generate reports
coder --read-only "analyze code quality and generate report"
# Batch processing
coder --config output_format=json "list all TODO comments"
```
## Troubleshooting
## Model Context Protocol (MCP)
### Common Issues
Coder supports MCP for extended capabilities:
**Installation fails**: Ensure Node.js 20+ is installed
```bash
node --version # Should be v20.0.0 or higher
- **File operations**: Advanced file system access
- **Database connections**: Query and modify databases
- **API integrations**: Connect to external services
- **Custom tools**: Build your own extensions
Configure MCP in `~/.codex/config.toml`:
```toml
[[mcp_servers]]
name = "filesystem"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
```
**Authentication issues**: Re-run the login flow
```bash
coder --login
## Configuration
Main config file: `~/.codex/config.toml`
```toml
# Model settings
model = "gpt-5"
model_provider = "openai"
# Behavior
approval_policy = "on_request" # untrusted | on-failure | on-request | never
model_reasoning_effort = "medium" # low | medium | high
sandbox_mode = "workspace_write"
# UI preferences see THEME_CONFIG.md
[tui.theme]
name = "light-photon"
# Add config for specific models
[profiles.o3]
model = "o3"
model_provider = "openai"
approval_policy = "never"
model_reasoning_effort = "high"
model_reasoning_summary = "detailed"
```
**Performance problems**: Adjust model or reasoning level
```bash
coder --model gpt-5-turbo
# or use /reasoning low during conversation
```
### Environment variables
- `CODEX_HOME`: Override config directory location
- `OPENAI_API_KEY`: Use API key instead of ChatGPT auth
- `OPENAI_BASE_URL`: Use alternative API endpoints
## FAQ
**Q: How is this different from the original?**
A: This fork adds browser integration, multi-agent commands (`/plan`, `/solve`, `/code`), theme system, and enhanced reasoning controls while maintaining full compatibility.
**Q: Can I use my existing Codex configuration?**
A: Yes! This fork is fully backward compatible with existing `~/.codex/` configurations.
**Q: Does this work with ChatGPT Plus?**
A: Absolutely. Use the same "Sign in with ChatGPT" flow as the original.
**Q: Is my data secure?**
A: Yes. Authentication stays on your machine, and we don't proxy your credentials or conversations.
## Contributing
We welcome contributions! This fork maintains compatibility with upstream Codex while adding new features.
We welcome contributions! This fork maintains compatibility with upstream while adding community-requested features.
### Development Setup
### Development workflow
```bash
# Clone the repository
git clone https://github.com/just-every/code.git
cd code
# Install dependencies
# Clone and setup
git clone https://github.com/just-every/coder.git
cd coder
npm install
# Build the project
npm run build
# Build (use fast build for development)
./build-fast.sh
# Run locally
./codex-rs/target/release/coder
./codex-rs/target/dev-fast/coder
```
### Submitting Changes
### Opening a pull request
1. Fork the repository
2. Create a feature branch
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Make your changes
4. Submit a pull request
4. Run tests: `cargo test`
5. Build successfully: `./build-fast.sh`
6. Submit a pull request
## Differences from Original Codex
## Security & responsible AI
| Feature | Coder CLI (Fork) | Original Codex |
|---------|----------------|----------------|
| Command | `code` | `codex` |
| Config Directory | `~/.code` | `~/.codex` |
| NPM Package | `@just-every/coder` | `@openai/codex` |
| Image Support | ✅ Enhanced | Basic |
| /reasoning Command | ✅ Available | Not available |
| Environment Variables | CODE_HOME + CODEX_HOME | CODEX_HOME only |
- **Sandbox protection**: Commands run in restricted environments
- **Approval prompts**: Review before execution of significant changes
- **No credential access**: Coder can't access your passwords or API keys
- **Local processing**: No data sent to third parties beyond chosen AI provider
## Legal & Use
### License & attribution
- This project is a community fork of [`openai/codex`] under **Apache-2.0**. We preserve upstream LICENSE and NOTICE files.
- **Coder** is **not** affiliated with, sponsored by, or endorsed by OpenAI.
### Your responsibilities
Using AI services through Coder means you agree to **their Terms and policies**. In particular:
- **Don't** programmatically scrape/extract content outside intended flows.
- **Don't** bypass or interfere with rate limits, quotas, or safety mitigations.
- Use your **own** account; don't share or rotate accounts to evade limits.
- If you configure other model providers, you're responsible for their terms.
### Branding
- Third-party model names and trademarks belong to their respective owners. Don't use model names in your app/product name, domain, or logo.
- It's fine to **describe compatibility** truthfully (e.g., "Sign in with ChatGPT" or "uses the API"). Avoid implying partnership or endorsement.
### Privacy
- Your auth file lives at `~/.codex/auth.json`.
- Inputs/outputs you send to AI providers are handled under their Terms and Privacy Policy; consult those documents (and any org-level data-sharing settings).
### Subject to change
AI providers can change eligibility, limits, models, or authentication flows. Coder supports **both** ChatGPT sign-in and API-key modes so you can pick what fits (local/hobby vs CI/automation).
## License
Apache 2.0 - See [LICENSE](LICENSE) file for details.
## Acknowledgments
This project is a fork of [OpenAI Codex CLI](https://github.com/openai/codex). We maintain compatibility while adding community-requested features.
This project is a community fork of the original Codex CLI. We maintain compatibility while adding enhanced features requested by the developer community.
---
**Need help?** Open an issue on [GitHub](https://github.com/just-every/code/issues) or check the [original Codex documentation](https://github.com/openai/codex).
**Need help?** Open an issue on [GitHub](https://github.com/just-every/coder/issues) or check our documentation.