gitnexus-cli

Runs GitNexus CLI commands to index, analyze, and document code repositories.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/gmolike/Claude-Template --skill gitnexus-cli-gmolike
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitnexus-cli
Source: https://github.com/gmolike/Claude-Template/tree/main/.claude/skills/gitnexus-cli
Command: npx skills add https://github.com/gmolike/Claude-Template --skill gitnexus-cli-gmolike

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping a codebase knowledge graph fresh and usable is manual and error-prone: developers forget to re-index after refactors, trust stale graph output, or hit cryptic failures like duplicated primary key errors. This Skill provides the exact GitNexus CLI commands, flags, and troubleshooting steps to manage the index lifecycle correctly. ## Core Features & Use Cases - Index Management: Build or refresh the repository knowledge graph with npx gitnexus analyze, including embedding generation and forced re-indexing options. - Freshness Verification: Check index status and compare the indexed commit against HEAD to detect stale graphs before trusting any output. - Documentation Generation: Generate a wiki from the knowledge graph using an LLM, with configurable model, concurrency, and optional GitHub Gist publishing. - Use Case: After merging a large feature branch, run npx gitnexus status, notice the indexed commit differs from HEAD, then run npx gitnexus analyze to rebuild the graph before using exploration or impact-analysis tools. ## Quick Start Ask the assistant to index this repository with GitNexus and verify the index is fresh before running any graph-based analysis.

Frequently Asked Questions about gitnexus-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I index a repository with GitNexus?

Run npx gitnexus analyze from the project root. It parses all source files, builds the knowledge graph into .gitnexus/, and generates CLAUDE.md and AGENTS.md context files. No global install is required since everything runs via npx.

How do I check if my GitNexus index is stale?

Run npx gitnexus status and compare the reported indexed commit against git rev-parse HEAD. If they differ, the graph is stale. Note that status always exits 0, so parse the stdout text rather than relying on the exit code.

Does GitNexus re-index automatically after code changes?

No, the index does not self-maintain. There is no hook, watcher, or automatic refresh on commit or merge. You must manually run npx gitnexus analyze after significant changes like new files, renames, refactors, or merges.

Why does gitnexus analyze fail with a duplicated primary key error?

This happens when preserved embeddings collide with freshly parsed symbols during rebuild. Fix it by running npx gitnexus analyze --drop-embeddings, then re-add embeddings afterwards with npx gitnexus analyze --embeddings if you need semantic search.

Can GitNexus generate documentation from my codebase?

Yes, npx gitnexus wiki generates repository documentation from the knowledge graph using an LLM. It requires an API key saved to ~/.gitnexus/config.json, and supports flags for model selection, concurrency, and publishing as a GitHub Gist.