Quickstart: Linux / macOS
The cleanest local path: macOS or Linux, Ollama on the host, codehamr in your terminal.
On Windows? See the Windows quickstart or WSL2 sandbox.
Hardware floor
Local code generation works best with a capable model, and bigger models need more memory. Here's a rough floor; smaller models run on less:
| Setup | Floor |
|---|---|
| Apple Silicon | modern M chip, 32 GB+ unified memory |
| Discrete GPU | 24 GB+ VRAM |
| CPU only | 64 GB+ system RAM, expect 3 to 8 tok/s |
Tight on memory? Pick a smaller model — agentic coding just gets better as the model gets more capable. Grab a HamrPass when local isn't enough.
1. Install Ollama
macOS: download from ollama.com/download, run it. In the app, open Settings and set Context length to 64k or more (depending on your machine). The 4k default silently breaks coding agents.
Linux:
curl -fsSL https://ollama.com/install.sh | sh
On Linux without the desktop app there is no Context length setting. The context_size you set in step 4 wins.
2. Pull a model
Pick a model from ollama.com/library that fits your machine, then use its tag in place of your-model below.
ollama pull your-model
Sizes range from a couple GB to tens of GB — bigger needs more memory. Ctrl+C and resume works.
3. Install codehamr
curl -fsSL https://codehamr.com/install.sh | bash
codehamr runs shell commands written by an LLM. Sandbox it in a devcontainer when it touches code you care about.
4. Point codehamr at Ollama
In your project:
.codehamr/config.yaml
active: local
models:
local:
llm: your-model
url: http://localhost:11434
key: ""
context_size: 256000
On macOS, context_size here must be ≤ the Context length you set in the Ollama app — larger silently truncates server-side.
Running codehamr in a devcontainer or WSL2 while Ollama stays on the host? The address may change and Ollama needs OLLAMA_HOST=0.0.0.0 — those guides cover it.
5. Run
codehamr
First prompt is slow while the model loads. Every prompt after is fast.
If something doesn't work
curl -sS http://127.0.0.1:11434/v1/models
- JSON with your tag → Ollama is fine, recheck
url:andllm:in your config. - Connection refused → start the Ollama app, or
systemctl start ollama. - Empty model list → re-run
ollama pull your-model.
That's the whole setup. Next: keys and commands inside a session.