Index a codebase with GitNexus and serve an interactive knowledge graph via web UI + Cloudflare tunnel.
Index any codebase into a knowledge graph and serve an interactive web UI for exploring symbols, call chains, clusters, and execution flows. Tunneled via Cloudflare for remote access.
.git directoryThe web UI renders all nodes in the browser. Repos under ~5,000 files work well. Large repos (30k+ nodes) will be sluggish or crash the browser tab. The CLI/MCP tools work at any scale — only the web visualization has this limit.
GITNEXUS_DIR="${GITNEXUS_DIR:-$HOME/.local/share/gitnexus}"
if [ ! -d "$GITNEXUS_DIR/gitnexus-web/dist" ]; then
git clone https://github.com/abhigyanpatwari/GitNexus.git "$GITNEXUS_DIR"
cd "$GITNEXUS_DIR/gitnexus-shared" && npm install && npm run build
cd "$GITNEXUS_DIR/gitnexus-web" && npm install
fi
The web UI defaults to localhost:4747 for API calls. Patch it to use same-origin
so it works through a tunnel/proxy:
File: $GITNEXUS_DIR/gitnexus-web/src/config/ui-constants.ts
Change:
export const DEFAULT_BACKEND_URL = 'http://localhost:4747';
To:
export const DEFAULT_BACKEND_URL = typeof window !== 'undefined' && window.location.hostname !== 'localhost' ? window.location.origin : 'http://localhost:4747';
File: $GITNEXUS_DIR/gitnexus-web/vite.config.ts
Add allowedHosts: true inside the server: { } block (only needed if running dev
mode instead of production build):