Codewith is a command-line coding agent from Hasna that runs locally on your computer.
Codewith is a modified derivative of OpenAI Codex. Codewith is not affiliated with, sponsored by, or endorsed by OpenAI.
Run the following on Mac, Linux, or Windows to install Codewith:
bun install -g @hasna/codewithCodewith can also be installed through npm:
npm install -g @hasna/codewithThen run codewith to get started. Codewith stores its local state in ~/.codewith by default.
For building from source and all install options, see Installing & building.
Download a prebuilt binary instead
Each GitHub Release contains many executables, but in practice, you likely want one of these:
- macOS
- Apple Silicon/arm64:
codewith-aarch64-apple-darwin.tar.gz - x86_64 (older Mac hardware):
codewith-x86_64-apple-darwin.tar.gz
- Apple Silicon/arm64:
- Linux
- x86_64:
codewith-x86_64-unknown-linux-musl.tar.gz - arm64:
codewith-aarch64-unknown-linux-musl.tar.gz
- x86_64:
Each archive contains a single entry with the platform baked into the name (e.g., codewith-x86_64-unknown-linux-musl), so you likely want to rename it to codewith after extracting it.
Run codewith and select Sign in with ChatGPT. We recommend signing into your ChatGPT account to use Codewith as part of your Plus, Pro, Business, Edu, or Enterprise plan. Learn more about what's included in your ChatGPT plan.
You can also use Codewith with an API key.
Codewith provides a rich terminal-based interface with:
- Slash commands: Use
/to access commands like/model,/profile,/config,/review, and/diff - Session management: Resume, fork, and archive previous conversations
- Markdown rendering: Display code, diffs, tables, and model responses in the terminal
- Vim mode: Optional Vim-style editing for the composer
- Custom keybindings: Remap TUI shortcuts to your preference
- Theme selection: Choose from multiple syntax highlighting themes
Save and switch between multiple local authentication profiles:
codewith login --auth-profile work
codewith login --auth-profile personal
codewith profile list
codewith --auth-profile work- Interactive mode: Run
codewithfor the full TUI experience - Exec mode: Run
codewith exec "your prompt"for non-interactive tasks - Review mode: Run
codewith reviewfor code review assistance - Apply mode: Run
codewith applyto apply diffs from previous sessions
Codewith can run commands under platform-specific sandboxing:
- macOS: Uses Seatbelt sandboxing
- Linux: Uses Landlock and bubblewrap (bwrap) sandboxing
- Windows: Uses Windows sandbox with private desktop
Extend Codewith with external tools via MCP servers:
codewith mcp list
codewith mcp add <server-name>Enhance Codewith's capabilities with reusable skill definitions:
- Create
.codewith/CODEWITH.mdfor project-specific instructions - Install and manage skills through configured skill sources
- Use
/skillsto browse and manage available skills
Use built-in session tools while working:
/planswitches to planning mode/goaltracks long-running objectives/loop,/schedule, and/monitormanage recurring work and lightweight monitors/agentand/sideorganize parallel or side conversations
- Changelog - Release notes for Codewith product versions
- Authentication - Auth profiles, login methods, and credential management
- Configuration - Config files, settings, and customization
- Contributing - Development setup and contribution guidelines
- Getting started - First-run workflow and common commands
- Slash Commands - TUI command reference
- Sandbox & Security - Security model and sandbox configuration
- Installing & building - Installation methods and building from source
- Skills - Creating and using Codewith skills
- Open source fund - Open source licensing and attribution
This repository is licensed under the Apache-2.0 License. See NOTICE, MODIFICATIONS.md, and THIRD_PARTY_NOTICES.md for attribution, modification, and bundled third-party notices. The Apache-2.0 license covers this codebase; it does not grant rights to OpenAI trademarks, services, accounts, subscriptions, models, or APIs.