odek

odek

One ~11 MB Go binary: verified install, a provider key, then odek run.

deepseek openai anthropic gemini zai kimi any OpenAI-compatible

macOS and Linux, amd64 and arm64. Windows: build from source with Go. Zero frameworks — no Python, no Node, no venv.

  1. 01 install
  2. 02 configure
  3. 03 sandbox
  4. 04 first run
  5. bodek
  6. 05 if it breaks

What you need

RequirementNotes
macOS or Linux Prebuilt binaries, amd64 and arm64. Windows: Go from source.
A provider API key This walkthrough uses z.ai (GLM Coding Plan or pay-as-you-go). Same binary for DeepSeek, OpenAI, Anthropic, Gemini, Kimi, or any OpenAI-compatible endpoint — PROVIDERS.md.
Go ≥ 1.25.13 Only if you build from source. Not needed for the prebuilt binary.
Docker Optional. The sandbox is on by default — opt out in step 03.

01 · install

Prebuilt binary, SHA-256 checked, then ~/.local/bin. If odek version is not found, add that directory to PATH.

▸ bash · prebuilt
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
ASSET="odek-${OS}-${ARCH}"
TMP=$(mktemp -d)
curl -fsSL -o "${TMP}/${ASSET}" \
  "https://github.com/BackendStack21/odek/releases/latest/download/${ASSET}"
curl -fsSL -o "${TMP}/checksums.txt" \
  "https://github.com/BackendStack21/odek/releases/latest/download/checksums.txt"
if command -v sha256sum >/dev/null; then
  (cd "${TMP}" && grep "  ${ASSET}$" checksums.txt | sha256sum -c -)
else
  (cd "${TMP}" && grep "  ${ASSET}$" checksums.txt | shasum -a 256 -c -)
fi
mkdir -p "${HOME}/.local/bin"
install -m 755 "${TMP}/${ASSET}" "${HOME}/.local/bin/odek"
rm -rf "${TMP}"
export PATH="${HOME}/.local/bin:${PATH}"
odek version

Later, odek upgrade self-updates from GitHub Releases the same way (SHA-256 verified).

Have Go? Install from the latest tag — never go install …@latest

Go ignores v2 tags for this repository’s historical v1 module path and would install an older v1 release.

▸ bash · source
TAG=$(git ls-remote --tags --sort=-v:refname \
  https://github.com/BackendStack21/odek.git \
  | awk '!/\^\{\}$/ {sub("refs/tags/", "", $2); print $2; exit}')
TMP=$(mktemp -d)
git clone --depth 1 --branch "${TAG}" \
  https://github.com/BackendStack21/odek.git "${TMP}/odek"
(cd "${TMP}/odek" && go install -ldflags "-X main.version=${TAG}" ./cmd/odek)
rm -rf "${TMP}"
export PATH="$(go env GOPATH)/bin:$PATH"
odek version

02 · configure

odek init --global writes ~/.odek/config.json (mode 0600) and refuses to overwrite without --force. Built-in ids: deepseek (what init scaffolds), openai, anthropic, gemini, zai, kimi — plus any OpenAI-compatible gateway. This walkthrough edits the scaffold for z.ai:

▸ bash · init
odek init --global
▸ json · ~/.odek/config.json
{
  "provider": "zai",
  "model": "glm-5.3-flash",
  "providers": {
    "zai": {
      "api_key": "${ZAI_API_KEY}",
      "base_url": "https://api.z.ai/api/coding/paas/v4"
    }
  },
  "llm": {
    "request_timeout_seconds": 300,
    "stream_idle_timeout_seconds": 300
  }
}

That base_url is the GLM Coding Plan. Pay-as-you-go uses https://api.z.ai/api/paas/v4. Model ids for your plan are on the z.ai dashboard.

Store the key in ~/.odek/secrets.env so it never lands in shell history.

▸ bash · secrets.env
cat > ~/.odek/secrets.env <<'EOF'
ZAI_API_KEY=sk-your-zai-key-here
EOF
chmod 600 ~/.odek/secrets.env

Priority: ~/.odek/secrets.env~/.odek/config.json./odek.jsonODEK_* env → CLI flags. A project ./odek.json cannot set provider, providers, llm, or keys. Env keys follow the provider (DEEPSEEK_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, …). Full table: PROVIDERS.md.

03 · sandbox

Tool execution runs inside an isolated Docker container by default for odek run, odek continue, odek repl, and odek serve. No Docker? Opt out before the first run:

▸ bash · opt-out
export ODEK_NO_SANDBOX=1     # add to ~/.zshrc / ~/.bashrc
# or per-run:
odek run --no-sandbox "..."

Unsandboxed runs warn loudly. ODEK_REQUIRE_SANDBOX=1 makes them fatal instead. Full model: SANDBOXING.md.

04 · first run

You should see glm-5.3-flash in the run header and a short ReAct trace: think → act → answer.

▸ bash · run
odek run "List the Go files in this directory and count their total lines"

illustration glm-5.3-flash · think → act → answer

▸ bash · repl
odek repl

Web UI — streams tokens, tools, and approvals. It binds 127.0.0.1:8080 and prints a token URL. Open that URL; a bare http://127.0.0.1:8080 loads the chrome but cannot connect.

▸ bash · serve
odek serve
# → http://127.0.0.1:8080/?token=…

optional · bodek

bodek is a Bubble Tea TUI over odek serve — live reasoning, tool steps, approvals, and sub-agent chips. The engine stays odek; bodek only renders the stream. For operators who want a terminal UI and can accept that extra dependency.

▸ bash · bodek
bodek
# spawns odek serve, or attach: bodek --url 'http://127.0.0.1:8080/?token=…'

Install and themes: bodek.21no.de. Prebuilt binaries on GitHub Releases (Linux, macOS, Windows).

05 · if it breaks

SymptomFix
odek: command not found ~/.local/bin (or $(go env GOPATH)/bin) is not on PATH.
failed to create sandbox container No Docker. Use --no-sandbox or export ODEK_NO_SANDBOX=1.
Auth errors / empty key ZAI_API_KEY in ~/.odek/secrets.env (mode 0600), and provider is zai — not the DeepSeek scaffold. ./odek.json cannot carry keys.
429 on sub-agent runs z.ai throttles around 5 concurrent streams. Set top-level max_concurrency to 2 in ~/.odek/config.json, or ODEK_MAX_CONCURRENCY.
Slow first byte / timeout GLM 5.3 reasoning is always on. Defaults are 300s; raise llm.request_timeout_seconds and llm.stream_idle_timeout_seconds if it is still silent.

next

The page is the short path. Depth lives in the docs.