Resolve version conflict - use v0.1.1 for next release
Code CLI - Enhanced Terminal Coding Agent
Code 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.
Installation
npm install -g @just-every/code
Then run:
code
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
/reasoningcommand - Flexible Configuration: Uses
~/.codedirectory (or~/.codexfor compatibility)
Quick Start
1. Install and Launch
npm install -g @just-every/code
code
2. Authenticate
You can use Code CLI with:
- ChatGPT Plus/Pro subscription (recommended)
- OpenAI API key (usage-based billing)
3. Choose Autonomy Level
Read/Write Mode (default - full capabilities):
code
Read-Only Mode (safer, no file modifications):
code --read-only
Example Usage
# Start an interactive session
code
# 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
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
# Model selection
model = "gpt-5"
# Approval settings
approval_policy = "ask" # ask | automatic | never
# Feature flags
hide_agent_reasoning = false
Environment Variables
CODE_HOMEorCODEX_HOME: Override default config directoryOPENAI_API_KEY: Use OpenAI API directlyOPENAI_BASE_URL: Use alternative API endpoints
Enhanced Image Support
The fork adds comprehensive image handling:
- Drag and drop images directly into the terminal
- Paste images from clipboard
- 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
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
code [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
Advanced Features
Model Context Protocol (MCP)
Code 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:
# Project Overview
This is a React application using TypeScript...
## Key Components
- Authentication: src/auth/*
- API Client: src/api/*
Non-Interactive Mode
For CI/CD pipelines:
code --non-interactive "update all dependencies"
Troubleshooting
Common Issues
Installation fails: Ensure Node.js 20+ is installed
node --version # Should be v20.0.0 or higher
Authentication issues: Re-run the login flow
code --login
Performance problems: Adjust model or reasoning level
code --model gpt-5-turbo
# or use /reasoning low during conversation
Contributing
We welcome contributions! This fork maintains compatibility with upstream Codex while adding new features.
Development Setup
# Clone the repository
git clone https://github.com/just-every/code.git
cd code
# Install dependencies
npm install
# Build the project
npm run build
# Run locally
./codex-rs/target/release/code
Submitting Changes
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Differences from Original Codex
| Feature | Code CLI (Fork) | Original Codex |
|---|---|---|
| Command | code |
codex |
| Config Directory | ~/.code |
~/.codex |
| NPM Package | @just-every/code |
@openai/codex |
| Image Support | ✅ Enhanced | Basic |
| /reasoning Command | ✅ Available | Not available |
| Environment Variables | CODE_HOME + CODEX_HOME | CODEX_HOME only |
License
Apache 2.0 - See LICENSE file for details.
Acknowledgments
This project is a fork of OpenAI Codex CLI. We maintain compatibility while adding community-requested features.
Need help? Open an issue on GitHub or check the original Codex documentation.