gitnexus-cli
하는 일
GitNexus 명령줄 도구로 코드베이스의 색인을 만들고 관리하는 방법을 에이전트에 가르칩니다. 에이전트가 프로젝트 구조를 이해하기를 원하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓에이전트가 탐색할 수 있도록 코드 프로젝트를 색인하고 싶을 때.
- ✓색인이 오래된 것 같아 새로 고쳐야 할 때.
- ✓색인된 코드베이스로 위키를 만들고 싶은 경우.
스킬 링크
https://github.com/abhigyanpatwari/GitNexus/blob/main/.claude/skills/gitnexus-cli/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 프로젝트 폴더를 GitNexus로 색인해서 동작 방식에 대해 질문에 답할 수 있게 해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 프로젝트의 GitNexus 실행 도구를 실행해 소스 파일을 분석하고 지식 그래프를 만들어 숨김 폴더에 저장합니다. 상태를 확인하거나 색인을 지울 수도 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
GitNexus CLI Commands
Commands below use node .gitnexus/run.cjs <command> — the project-local runner gitnexus analyze drops next to the index. It auto-selects an available runner at call time (global gitnexus, else pnpm dlx, else bunx, else npx), so no package-manager assumption and no global install is required — including on a bun-only machine, which has no npm, npx or pnpm at all.
Not analyzed yet, or
node .gitnexus/run.cjsreportsCannot find module(the gitignored runner is absent — e.g. a fresh clone orgit clean)? (Re)generate it withnpx gitnexus analyzefrom the project root, orbunx gitnexus@latest analyzeon a bun-only machine. On npm 11.x, ifnpxcrashes during install (node.target is null), install once withnpm i -g gitnexus(thengitnexus analyze), or usebunx gitnexus@latest analyze, orpnpm --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter dlx gitnexus@latest analyze. See #1939.
Commands
analyze — Build or refresh the index
node .gitnexus/run.cjs analyze
Run from the project root. This parses all source files, builds the knowledge graph, writes it to .gitnexus/, and generates CLAUDE.md / AGENTS.md context files.
| Flag | Effect |
|---|---|
--watch |
Keep a Git repository index current with serialized refreshes |
--debounce <ms> |
Watch quiet period before refresh (default: 300 ms) |
--force |
Force full re-index even if up to date |
--embeddings |
Enable embedding generation for semantic search (off by default) |
--drop-embeddings |
Drop existing embeddings on rebuild. By default, an analyze without --embeddings preserves them. |
--pdg |
Build the program-dependence layers used by explain and pdg_query (taint, CDG, and REACHING_DEF). |
--spring-actuator <path> |
Import opt-in Spring Boot Actuator mappings, beans, conditions, configprops, and env snapshots. Forces a full rebuild; unsupported with --watch. |
--asyncapi-spec <path> |
Read opt-in AsyncAPI 3.x documents (directory or single file) and mint Destination nodes from their operations. 2.x is refused, not mapped. Unsupported with --watch. |
When to run: First time in a project, after major code changes, or when gitnexus://repo/{name}/context reports the index is stale. In Claude Code, a PostToolUse hook detects staleness after git commit and git merge and notifies the agent to run analyze — the hook does not run analyze itself, to avoid blocking the agent for up to 120s and risking KuzuDB corruption on timeout.
For Spring runtime enrichment, pass a JSON bundle, one endpoint JSON file, or a directory containing endpoint files. Route evidence is authoritative only when runtimeConfirmed === true; runtimeSource records provenance and may also accompany handler-conflict. Env/configprops values are never persisted.
Index storage and retention
Default location is <repo>/.gitnexus/. Override with environment variables (also documented in README):
| Env | Effect |
|---|---|
GITNEXUS_STORAGE_PATH |
One complete external index directory. Wins if both storage vars are set. |
GITNEXUS_STORAGE_ROOT |
Absolute root; GitNexus creates an isolated <repo-basename>-<12-hex>/ slot per repository. |
GITNEXUS_CONTENT_RETENTION |
full (default) keeps file text; symbol keeps snippets; none keeps the graph only. |
list_repos, gitnexus://repo/{name}/context, and HTTP GET /api/repos / GET /api/repo expose storagePath, contentRetention, and sourceAvailable. HTTP /api/file and /api/grep return 410 unless retention is full. MCP include_content may still return symbol spans when retention is symbol.
Use node .gitnexus/run.cjs analyze --watch for a long-lived local Git repository. It performs an initial analysis, queues scanner-admitted file changes, and retries intact failed batches with bounded backoff. Watch refreshes update only the graph: they skip AGENTS.md / CLAUDE.md injection and standard skill installation, so run a one-shot analyze when those generated files need updating. Watch rejects one-shot or context-output flags including --force, embedding flags, --skills, --default-branch, `
자주 묻는 질문
전역 설치가 필요한가요?
아니요. 스킬에 따르면 실행 도구가 실행 시 사용할 수 있는 도구를 골라 쓰므로 전역 설치가 필요하지 않습니다.
색인을 만들면 무엇이 생기나요?
지식 그래프가 .gitnexus 폴더에 저장되고, CLAUDE.md, AGENTS.md 같은 컨텍스트 파일이 생성됩니다.
실행 도구가 없으면 어떻게 하나요?
프로젝트 루트에서 npx gitnexus analyze를 실행해 다시 만들라고 스킬에 적혀 있습니다.
상세 정보
작성자의 원본 설명
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos. Examples: \"Index this repo\", \"Reanalyze the codebase\", \"Generate a wiki\"
repo: abhigyanpatwari/GitNexus
인기도
- GitHub 스타
- 48k
- 순위
- #3605
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
gitnexus-debugging
48k코드베이스에서 버그를 추적해 오류가 시작된 곳과 실패한 부분을 호출하는 코드를 찾도록 돕습니다.
gitnexus-exploring
48k에이전트가 낯선 코드베이스를 탐색하도록 돕습니다. 주요 부분이 어떻게 연결되는지, 로그인 같은 기능이 어떻게 동작하는지 설명합니다.
gitnexus-guide
48kGitNexus 도구, 리소스, 지식 그래프에 대한 빠른 참고 자료를 제공하고 알맞은 안내서를 알려 줍니다.
gitnexus-impact-analysis
48k함수를 바꾸기 전에 무엇이 깨질지 확인하도록 돕습니다. 어떤 코드가 그 함수에 의존하는지 알 수 있습니다.