kimcli is Kim's rebranded, version-pinned build of the codex CLI
(0.144.3), used as the backend engine for Kim's Code tab / kim tui. It is
built from a fork at AdamMagued/codex,
branch kim-brand-0.144.3 — 7 branding-only commits on top of upstream
codex-cli 0.144.3 (name/binary/version-string changes; no behavioral
changes to the agent loop or protocol). Apache-2.0 licensed, same as upstream.
Version string: kimcli 0.144.3 (rebranded codex-cli 0.144.3).
Kim ships a consistent "Kim" brand end-to-end (desktop app, kim CLI,
kim tui). Shelling out to a binary that prints codex in its own --help,
version string, and update-nagging would leak the wrong product name into a
user-facing surface. The fork changes only branding/naming; it tracks
upstream codex-cli's actual agent behavior and wire protocol exactly at
0.144.3.
Kim's Codex bridge (codex_engine/engine.py _CodexProxy, orchestrator/codex_bridge_service.py) picks a wire mode per provider:
browser-contract(default) — forbrowser:*providers (and bare"browser"). Codex's model traffic is translated to/from Kim's browser-JSON contract on both/v1/responsesand (legacy)/v1/chat/completions. This is kimcli's primary path:BrowserProvider.complete()speaks the/v1/responsesJSON contract rather than native tool-calling.responses-passthrough— for API providers (Claude, Gemini, DeepSeek, and, as of thekim tuilauncher's default, Ollama-behind-proxy). codex-cli 0.144.3 removed the chat-completions wire API entirely (WireApiincodex-rs/model-provider-info/src/lib.rsonly has theResponsesvariant now), so codex 0.144.3 is Responses-wire-only — these providers are served natively on/v1/responseswith no chat-completions fallback. Seecodex_engine/responses_passthrough.py. For Ollama specifically, the proxy wrapsorchestrator/providers/ollama.py(OllamaProvider), which speaks Ollama's native/api/chattool-calling wire format and re-emits proper Responses-APIfunction_callitems.ollama direct—kim tui --provider ollamacan instead be driven straight at Ollama's own/v1/responsesendpoint with no proxy hop, but this is opt-in only (KIM_TUI_OLLAMA_DIRECT=1), not the default — see the caveat below.
codex_engine/standalone_proxy.py is the standalone kimcli entry point (used
by kim tui and the standalone kimcli binary path): it auto-selects
browser-contract vs responses-passthrough per the rules above ("auto"
mode).
./scripts/install_kimcli.shMirrors scripts/install-kim.sh's conventions: platform/arch detection
(aarch64-apple-darwin, x86_64-apple-darwin, x86_64-unknown-linux-musl,
x86_64-pc-windows-msvc), hard-fail .sha256 checksum verification (escape
hatch: KIM_SKIP_CHECKSUM=1, not recommended), extraction to
~/.kim/bin/kimcli, quarantine-strip on macOS, chmod +x.
Env overrides:
| Var | Default | Notes |
|---|---|---|
KIMCLI_RELEASE_REPO |
AdamMagued/codex |
Fork to install from |
KIMCLI_VERSION |
kimcli-v0.144.3 |
Pinned tag — never latest. kimcli tracks an exact upstream version deliberately; a rolling install would silently drift Kim's Code tab onto an unvalidated protocol version. |
After install, either add ~/.kim/bin to PATH, or point Kim explicitly at
the binary:
export CODEX_BIN="$HOME/.kim/bin/kimcli"Binary resolution order (both the Python orchestrator and the Rust desktop
shell implement the same chain): CODEX_BIN env → ~/.kim/bin/kimcli →
kimcli on PATH → codex on PATH → bare "codex" last resort. See
codex_engine/binary_resolver.py and desktop/src-tauri/src/binary_resolver.rs.
kim tui— Kim CLI's launcher for the full Codex-style TUI, routed through Kim's providers.kimcli— the standalone binary directly (once installed and onPATH, or via$CODEX_BIN).
When upstream codex-cli ships a new pinned version (rust-vNEW):
- Rebase the
kim-brand-0.144.3-style branding branch ontorust-vNEWin theAdamMagued/codexfork. - Re-grep for branding strings (
codex-cli,codex, version literals, update-check URLs) to make sure the rebase didn't reintroduce upstream naming in a new file. - Verify the updater-kill patch still applies (kimcli must never self-update or nag about updates — Kim owns the version pin).
- Tag the fork
kimcli-vNEW; the fork's release workflow publisheskimcli-<target>.tar.gz/.zip+.sha256archives per target. - Regenerate the app-server schema snapshot:
kimcli app-server generate-json-schema --out codex_engine/appserver_schema, diff, bumpcodex_engine/appserver_schema/VERSION. - Bump the pins:
.github/workflows/nightly-contract.yml'sreal-kimcli-appserverjob (release tag + version-string assertion) andscripts/install_kimcli.sh'sKIMCLI_VERSIONdefault. - Re-run the full feature matrix (
python -m pytest tests/ -q, desktop Rust/TS suites, a livekim tuismoke) before merging.
kim-pro itself is MIT licensed. kimcli is a separately-licensed
Apache-2.0 binary that kim-pro downloads (via scripts/install_kimcli.sh
or the release CI job) rather than vendors — no Apache-2.0 source lives in
this repository. Each release archive includes upstream's NOTICE file per
Apache-2.0 §4(d).
kimcli app-server daemonmanaged-install path: this subcommand retains upstream codex's managed-install behavior for its remote-control/IDE-extension feature, which can download a separate upstreamcodexbinary under its own management directory. This does not overwrite or affect thekimclibinary Kim installed — it's a distinct, upstream-owned artifact. Kim does not currently invokeapp-server daemon; tracked as a policy question for phase 2 (see the follow-up issue).- TUI
FREE_GO_TOOLTIPstill shows upstream's "included in your plan" wording in some flows — this string wasn't caught by the branding grep pass. Pending an owner decision on rewording vs. suppressing it. - Unsigned binaries: kimcli release binaries are not code-signed: macOS needs the quarantine-strip step in the installer (already handled); Windows may show a SmartScreen prompt on first run.
- Windows release leg: the fork's release workflow builds
x86_64-pc-windows-msvcon a best-effort, continue-on-error basis — don't treat a red Windows leg alone as blocking. - Approvals: Kim's MCP tool-approval tiers (risk-gated tool calls) have
no broker wired into the app-server transport under kimcli today — approval
requests default-deny without one. Phase 2 tracks wiring these through as
MCP elicitations (
mcpServer/elicitation/request); see the follow-up issue for the design pointer. ollama-directis opt-in/experimental, not the default:kim tui --provider ollamaroutes through the standalone proxy by default (same asclaude/gemini/deepseek), because live testing on Ollama 0.32.0 withqwen3-codershowed the DIRECT/v1/responsesroute is broken for agentic use — the model's tool calls come back in a shape codex 0.144.3's tool router rejects (ERROR codex_core::tools::router: error=unsupported call), looping every tool-call turn until the relay budget dies; text-only replies work fine direct, tool calls don't. SetKIM_TUI_OLLAMA_DIRECT=1to opt back into the legacy direct route (e.g. to test a future Ollama release that fixes the tool-call shape); seecli/src/commands/tui/ routing.rsfor the routing table.