Local, offline AI coding assistant powered by Ollama + DeepSeek + Docker sandbox. No API keys, no cloud, full control on your own machine.
Hybrid mode (v1.2.0+): optionally add Google Antigravity for cloud models.
Yeah, it runs on your own PC. Your GPU is crying, but your privacy is smiling. π
- π§ Runs fully offline β no internet after setup
- π» Cross-platform β Windows, Linux, macOS, Termux (Android)
- π Multi-model support β DeepSeek, Qwen, CodeLlama (v1.2.0+)
- π Hybrid mode β add Antigravity cloud models (v1.2.0+)
- π‘οΈ Docker sandbox β safe code testing
- π Custom persona β CodeX, direct & no-nonsense
- π¨ CLI banner β figlet + lolcat (v1.2.0+)
- π Full docs β install guides, troubleshooting, FAQ
- π OpenAI-compatible β works with OpenCode, LM Studio, etc.
| Platform | RAM | Disk | Notes |
|---|---|---|---|
| Windows | 8 GB+ | 5 GB | Use setup.ps1 |
| Linux | 8 GB+ | 5 GB | Use setup.sh |
| macOS | 8 GB+ | 5 GB | Use setup.sh |
| Termux | 6 GB+ | 3 GB | Small models only, no Docker |
| Model | Size | RAM needed | Best for |
|---|---|---|---|
deepseek-coder:6.7b |
4 GB | 8 GB+ | Best quality |
qwen2.5-coder:1.5b |
1 GB | 4 GB+ | Low-RAM devices |
codellama:7b |
4 GB | 8 GB+ | Alternative |
β οΈ deepseek-coder:6.7bneeds ~4 GB disk and 8 GB RAM minimum. For low-end devices, useqwen2.5-coder:1.5b. Your toaster will thank you.
winget install Ollama.Ollama
ollama pull deepseek-coder:6.7b
git clone https://github.com/InfraSecID/CodeX.git
cd CodeX
Set-ExecutionPolicy -Scope Process Bypass
.\setup.ps1
ollama run codexDocker sandbox:
docker build -t sandbox .
docker run -it --rm --network none -v ${PWD}:/work sandboxcurl -fsSL https://ollama.com/install.sh | sh
ollama pull deepseek-coder:6.7b
git clone https://github.com/InfraSecID/CodeX.git
cd CodeX
chmod +x setup.sh
./setup.sh
ollama run codexDocker sandbox:
docker build -t sandbox .
docker run -it --rm --network none -v $(pwd):/work sandbox
β οΈ Termux cannot run Docker natively. Use the Ollama Termux fork with a small model.
pkg update && pkg upgrade -y
pkg install nodejs-lts -y
npm install -g @mmmbuto/ollama-termux@latest
ollama-termux serve &
ollama-termux pull qwen2.5-coder:1.5b
ollama-termux run qwen2.5-coder:1.5bNote: For Termux, use small models (1.3bβ1.5b). Docker sandbox is not available β test code on a PC instead.
CodeX now supports multiple models. Switch anytime:
./switch-model.sh qwen-1.5b./benchmark.sh- Create
models/your-model.Modelfile - Run
./switch-model.sh your-model - Update OpenCode config with
codex-your-model
Add Google Antigravity as cloud provider (optional, needs internet + Google account):
./setup-antigravity.sh
opencode auth loginThen in OpenCode:
/modelβ pickollama/codex(local, offline)/modelβ pickantigravity/gemini-3-pro(cloud, online)
| Provider | Models | Connection | Use when |
|---|---|---|---|
| Ollama | codex, deepseek, qwen | Offline π | Privacy, no internet |
| Antigravity | gemini, claude | Online π | Complex tasks, bigger models |
β οΈ Antigravity is unofficial plugin (opencode-antigravity-auth). Use only in trusted workspaces.
Run CodeX with a figlet banner:
./codex-cli.shOutput:
____ _ __ __
/ ___|___ __| | \ \/ /
| | / _ \ / _` | \ /
| |__| (_) | (_| | / \
\____\___/ \__,_| /_/\_\
π€ Offline AI Coding Assistant
π‘ Model: codex
π‘οΈ Sandbox: docker run ...
π Hybrid: use Antigravity for cloud models
Install dependencies:
sudo apt install figlet lolcat| Command | What it does |
|---|---|
make setup |
Full setup (Ollama + model + persona + sandbox) |
make run |
Chat with CodeX persona |
make sandbox |
Start Docker sandbox (no internet) |
make build-model |
Rebuild CodeX persona from Modelfile |
make test |
Quick sanity test |
make clean |
Remove build artifacts |
make help |
Show all commands |
Example:
make setup
make runRun Ollama as a container:
docker compose up -dRun sandbox with compose:
docker compose --profile sandbox run sandboxStop everything:
docker compose downEvery push to main triggers:
- ShellCheck lint
- YAML validation
- Makefile validation
- Executable permission check
See .github/workflows/ci.yml for details.
Install once:
pip install pre-commit
pre-commit installEvery git commit auto-checks:
- Large files
- Private keys
- Merge conflicts
- YAML validity
- Shell script lint
Full guides available in docs/:
| Guide | Description |
|---|---|
| Install on Windows | Windows setup guide |
| Install on Linux | Linux setup guide |
| Install on Termux | Android/Termux guide |
| Troubleshooting | Common issues & fixes |
| FAQ | Frequently asked questions |
codex/
βββ README.md
βββ LICENSE
βββ CHANGELOG.md
βββ CONTRIBUTING.md
βββ RELEASE_NOTES.md
βββ Makefile
βββ docker-compose.yml
βββ Dockerfile
βββ Modelfile
βββ setup.sh
βββ setup.ps1
βββ setup-antigravity.sh
βββ switch-model.sh
βββ benchmark.sh
βββ codex-cli.sh
βββ split.py
βββ models/
β βββ deepseek-6.7b.Modelfile
β βββ qwen-1.5b.Modelfile
β βββ codellama-7b.Modelfile
βββ docs/
β βββ install-windows.md
β βββ install-linux.md
β βββ install-termux.md
β βββ troubleshooting.md
β βββ FAQ.md
βββ .github/
βββ workflows/
βββ ci.yml
| Problem | Fix |
|---|---|
ollama: command not found |
Reinstall, restart terminal |
| Model very slow | RAM too low β use ./switch-model.sh qwen-1.5b |
| OpenCode not connecting | Check curl http://localhost:11434/v1/models |
| Docker permission denied (Linux) | sudo usermod -aG docker $USER, then re-login |
| Docker can't mount folder (Windows) | Enable drive sharing in Docker Desktop settings |
| Termux: model too heavy | Use qwen2.5-coder:1.5b or smaller |
switch-model.sh permission denied |
chmod +x switch-model.sh benchmark.sh codex-cli.sh setup-antigravity.sh |
figlet: command not found |
sudo apt install figlet (Linux) or brew install figlet (macOS) |
| Model not found | ollama pull deepseek-coder:6.7b |
| Out of memory | Use smaller model, close other apps, increase swap |
make help fails |
Makefile uses tabs, not spaces |
| CI fails on ShellCheck | Add severity: 'error' to action config |
YAML invalid |
python3 -c "import yaml; yaml.safe_load(open('docker-compose.yml'))" |
setup.sh not executable |
chmod +x setup.sh split.py |
| Docker image not built | docker build -t sandbox . |
| Antigravity auth fails | opencode auth login again, check Google account |
Antigravity not showing in /model |
Restart OpenCode after setup-antigravity.sh |
For more, see docs/troubleshooting.md.
This project is for educational and research purposes. Always test untrusted code inside the Docker sandbox. Antigravity plugin is unofficial β use at your own risk. The author is not responsible for misuse. Don't be that guy. Seriously.
MIT β see LICENSE for details.
Version: 1.2.0 Last updated: 2026-10-21 Made with: β + π§ + a GPU that's probably crying right now Special thanks: to everyone who reads documentation. You're the real MVP. π