Install
Requirements
Section titled “Requirements”- OS: macOS, Linux, or Windows. WSL is recommended on Windows for parity with the Linux dev path, but native Windows now works without the MSVC build chain because OpenCodeHub does no native compilation at install time.
- Node.js: Node ≥24.15. The store is Node’s built-in
node:sqlite(DatabaseSync, enabled by default at that version) and the parse runtime isweb-tree-sitter(WASM) — there is no native opt-in (ADR 0015).
Supported platforms
Section titled “Supported platforms”OpenCodeHub installs with zero native compilation and zero native
storage bindings — the store is Node’s built-in node:sqlite and the
parse runtime is WASM (ADR 0019). There is no per-platform prebuilt to
match, so every platform is supported:
| Platform | Supported |
|---|---|
| macOS arm64 (Apple Silicon) | ✅ |
| macOS x64 (Intel) | ✅ |
| Linux x64 (glibc — Debian/Ubuntu/RHEL) | ✅ |
| Linux arm64 (glibc) | ✅ |
| Windows x64 | ✅ |
| Windows arm64 | ✅ |
| Linux musl (Alpine) | ✅ |
There is no unsupported-platform failure mode: npm install -g @opencodehub/cli plus Node ≥24.15 is the whole install. Any base
image works, including Alpine/musl (node:24-alpine) and Windows-on-ARM,
because nothing compiles and no native binding has to load.
- pnpm:
>=11.0.0(the workspace lockfile is generated with 11.1.0). - Python 3.12: optional, only used by auxiliary tooling (the harness packages do not ship as runtime dependencies). Not required for the CLI or MCP server.
- mise: recommended. It pins Node, pnpm, and Python from the committed
mise.tomlin one command.
Install paths
Section titled “Install paths”Recommended: mise-managed toolchain
Section titled “Recommended: mise-managed toolchain”git clone https://github.com/theagenticguy/opencodehubcd opencodehubmise installpnpm install --frozen-lockfilepnpm -r buildmise run cli:link # puts `codehub` on your PATHmise install activates the Node 24, pnpm 11.1.0, and Python 3.12 pins
from mise.toml. pnpm install --frozen-lockfile installs exactly the
lockfile-pinned dependencies. pnpm -r build compiles every TypeScript
package so the CLI entrypoint at packages/cli/dist/index.js is
runnable. mise run cli:link wraps pnpm link --global inside
packages/cli/ so codehub resolves from any directory; remove with
mise run cli:unlink.
If you would rather install a packed tarball instead of a pnpm symlink
(useful in CI images, devcontainers, or when pnpm’s global link
conflicts with another tool), run mise run cli:install-global
instead — it builds the CLI, runs pnpm pack, and installs the
tarball globally.
Without mise: manual toolchain
Section titled “Without mise: manual toolchain”If you already manage Node and pnpm another way:
-
Install Node ≥24.15 (
nvm install 24,fnm install 24, or from nodejs.org). The store uses the built-innode:sqliteand parsing usesweb-tree-sitter(WASM) — there is no native parser and no opt-in (ADR 0015). -
Install pnpm
>=11.0.0(corepack enable pnpm, ornpm install -g pnpm@11). -
Clone, build, and link:
Terminal window git clone https://github.com/theagenticguy/opencodehubcd opencodehubpnpm install --frozen-lockfilepnpm -r buildpnpm --filter @opencodehub/cli link --global
From npm
Section titled “From npm”Global npm distribution of codehub is not yet published. For now,
link (or install the packed tarball) from a cloned checkout as shown
above. A published @opencodehub/cli package is planned.
Verify the install
Section titled “Verify the install”After mise run cli:link (or pnpm --filter @opencodehub/cli link --global) finishes, codehub should be on your PATH:
codehub --helpThen probe your environment:
codehub doctorcodehub doctor checks your Node version, pnpm version, the built-in
node:sqlite module (an import plus a WAL round-trip — there is no
native storage binding to probe, and parsing is WASM-only), and writable
paths in ~/.codehub/ and .codehub/. It exits non-zero if anything
looks off.
Optional environment toggles
Section titled “Optional environment toggles”Storage has no toggle: the whole index lands in one
.codehub/store.sqlite file (WAL mode) via the built-in node:sqlite,
written on every analyze, with no backend-selection env var and no
native binding (ADR 0019). Parsing has no toggle either:
web-tree-sitter (WASM) is the only runtime (ADR 0015).
| Variable | Default | Effect |
|---|---|---|
OCH_VERBOSE | unset | Set to 1 to surface the one-shot advisory the CLI emits when a removed legacy parser env var is still set, in non-TTY environments. |
See Configuration for the full inventory.
- Quick start — index this repository and run your first MCP call in 5 steps.
- Your first query — walk
through
query,context, andimpact.