Menu Documentation
Install
One binary on macOS, Linux or Windows — or Docker, or Ollama.
Ogcode ships as a single static binary. Pick your platform below; every path ends with the same thing — an ogcode command on your PATH.
The install script downloads the latest release for your architecture and drops the binary in /usr/local/bin:
curl -fsSL https://ogcode.xyz/install.sh | shOr use Homebrew:
brew tap prasenjeet-symon/tap
brew install ogcodeThe same script handles Linux — it detects amd64 or arm64 and installs to /usr/local/bin:
curl -fsSL https://ogcode.xyz/install.sh | shHomebrew on Linux works too if you already have it. If /usr/local/bin needs root, the script will say so; run it with the privileges it asks for rather than piping sudo into sh.
In PowerShell:
irm https://ogcode.xyz/install.ps1 | iexOr with winget:
winget install prasenjeet-symon.ogcodeBoth put ogcode.exe on your PATH. Open a new terminal afterwards so the updated PATH is picked up.
The image mounts two volumes: your global config and the workspace the agent works in.
docker run -p 9595:9595 \
-v ~/.ogcode:/root/.ogcode \
-v "$(pwd):/workspace" -w /workspace \
ghcr.io/prasenjeet-symon/ogcode:latestThe image is also on Docker Hub as prasenjeetsimon/ogcode:latest. The container binds all interfaces, so -p 9595:9595 publishes it on your host — keep that port off the public internet. See Remote deployment before exposing it.
Point it at a model
Ogcode needs one LLM credential. It reads these from the environment, and you need at least one:
| Variable | Provider |
|---|---|
ANTHROPIC_API_KEY | Anthropic / Claude |
OPENAI_API_KEY | OpenAI / GPT |
OPENROUTER_API_KEY | OpenRouter |
OLLAMA_BASE_URL | Ollama or any OpenAI-compatible local endpoint |
export ANTHROPIC_API_KEY=sk-ant-...
You can also keep keys in ~/.config/ogcode/config.json for global settings, or ogcode.json at a project root for project settings. Environment variables win over both.
For a local model with no API key at all:
ollama serve
ogcode
Verify it
ogcode version # prints the version and commit
ogcode check-updates
check-updates exits with a non-zero status when a newer release is available, which makes it usable in a script.
Building from source
If you would rather build it yourself, a source build needs the web UI compiled first. The Makefile does both:
make build # builds web/dist, then the Go binary with CGO_ENABLED=1
make install # copies to ~/.local/bin and re-signs on macOS
CGO_ENABLED=1 is required because the binary links native libraries for PDF rendering and syntax parsing.
Next: Quick start.
From side project to enterprise codebase.
One Go binary, any model, your keys. Ogcode builds the context each task needs, so you get the job done without burning through your wallet.
Or install from a terminal: curl -fsSL https://ogcode.xyz/install.sh | sh