CodeGraph ships a vendored Node runtime alongside the app. Because Node 22.5+
has a built-in real SQLite (node:sqlite, with WAL + FTS5), bundling Node means:
better-sqlite3 is gone, so there are zero native addons
to compile or rebuild.database is locked (issue #238).Built by scripts/build-bundle.sh — one archive per
platform, identical recipe (only the Node download differs):
codegraph-<target>/
node # official Node runtime for <target>
lib/
dist/ # compiled app (+ tree-sitter .wasm grammars, schema.sql)
node_modules/ # production deps only (pure JS / wasm — portable)
bin/
codegraph # launcher: exec "$DIR/node" "$DIR/lib/dist/bin/codegraph.js" "$@"
Targets: darwin-arm64, darwin-x64, linux-x64, linux-arm64 (Windows: TODO).
scripts/build-bundle.sh linux-x64 # -> release/codegraph-linux-x64.tar.gz
scripts/build-bundle.sh darwin-arm64 v24.16.0
Note: the script does not cross-compile — it downloads the official Node
binary for <target>, but to run-test a bundle you must be on that platform
(or emulate it, e.g. docker run --platform linux/amd64).
curl | sh (install.sh) — no Node required; ideal for a
fresh Linux VPS over SSH. Detects os/arch, pulls the archive from GitHub
Releases, symlinks codegraph onto PATH. Re-run to upgrade; --uninstall to
remove.scripts/npm-shim.js) — preserves
npm i -g @colbymchenry/codegraph. The main package is a tiny shim; the
bundles ship as per-platform optionalDependencies
(@colbymchenry/codegraph-<target> with os/cpu), so npm installs only the
matching one. The shim — run by the user's Node — execs the bundle, so the
real work runs on the bundled Node 24. Works even on old Node.build-bundle.sh, uploads each archive
to the GitHub Release.src/bin/codegraph.ts — the
bundle always runs Node 24, and the npm shim does no tree-sitter work, so no
version check is needed.