Kodx
Codex-inspired background agent that runs on your machine
Installation
uv pip install kodx
Quick Start: kodx code
# Fix a bug or implement a feature - kodx creates a git branch automatically
kodx code "fix the failing authentication tests"
# Work from a specific branch
kodx code "add rate limiting to the API" --base-ref feature/api-v2
# Debug with uncommitted changes included
kodx code "help me fix this error" --dirty
What happens:
- AI works in isolation - Code is written and tested in a Docker container
- AI decides what to commit - The AI makes explicit decisions about when and what to commit
- Git fetches committed changes - Only changes the AI commits are retrieved
- Branch created if needed - A new branch appears in your repo only if the AI made commits
How Kodx Works
Kodx is built on a simple but powerful architecture:
The Core: kodx
At its heart, Kodx provides a flexible command (kodx) that runs AI coding assistants in Docker containers. The AI interacts with code through a shell interface, keeping your system safe while enabling powerful automation.
# The core command gives you full control
kodx --prompt "Create a web server" --export-dir ./output
See docs/kodx-core.md for advanced usage.
Specialized Commands
Built on top of the core, Kodx provides two specialized commands:
kodx code- Git-integrated workflow that automatically creates branches and commitskodx ask- Read-only code analysis that never modifies files
Key Architecture
- Container Isolation: Each session runs in a fresh Docker container
- Minimal Interface: AI uses just 2 tools - shell interaction and session reset
- Git Integration:
kodx codemanages branches, commits, and exports automatically - Safety First: Your working directory is never touched directly
Additional Command: kodx ask
For code analysis without modifications, use kodx ask:
kodx ask "What does this project do?"
kodx ask "Find potential security issues" --cost-limit 5.0
Like kodx code, it's a thin wrapper around the core kodx command but configured for read-only analysis.
Configuration and Customization
kodx init - Project Setup
Initialize project-specific configurations:
kodx init
This creates default .kodx/ask.yaml and .kodx/code.yaml files that customize the behavior of the specialized commands while leveraging the core kodx infrastructure.
# .kodx/code.yaml
model:
name: claude-sonnet-4-20250514
provider: anthropic
max_iterations: 100
docker:
image: node:18
setup_script: |
npm install -g typescript
apt-get update && apt-get install -y git
disable_network_after_setup: false
prompts:
system: |
You are a TypeScript development assistant.
Use the provided tools to analyze and modify code.
Documentation
- Getting Started Guide
kodxCore Documentationkodx codeDocumentationkodx askDocumentation- Architecture & Internals
- GitHub Actions Examples
License
Apache License 2.0
Acknowledgements
Kodx is directly inspired by ChatGPT Codex. The tool design and pty-shell server design is copied from ChatGPT Codex.
Related Projects
Metadata
Release files for kodx 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| kodx-0.2.0.tar.gz | 187.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kodx-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 228.6 kB
Release files / kodx-0.2.0.tar.gz
| Download URL | kodx-0.2.0.tar.gz |
|---|---|
| Size | 187.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9552f992c2c6639b0b6bbc6215b67822630e8a04385bcc732cb2131cc85dae2
|
|
BLAKE2b-256 checksum How to use checksums |
3066a762ea02fca0267b529aea1fec77192bd4f9b8bd9b324848304435cd12dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.9
|
Release files / kodx-0.2.0-py3-none-any.whl
| Download URL | kodx-0.2.0-py3-none-any.whl |
|---|---|
| Size | 41.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5d6d7f52ff161d4dfa758199f0eb4314f241a765cb7afdfef34e6d040a0e5e8
|
|
BLAKE2b-256 checksum How to use checksums |
32640f47d08e29e9906796264bd9cf3e751574d14679e20111af42b36c1c6533
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.9
|
Security for kodx 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.