gitnexus-cli

用于运行 GitNexus 命令行工具以管理仓库索引或生成文档:当用户需要执行 GitNexus CLI 操作时使用,例如分析或索引仓库、检查状态、清理索引、生成 Wiki 或列出已索引的仓库。示例:“索引此仓库”、“重新分析代码库”、“生成 Wiki”

仓库最近推送
GitHub Stars
125
Forks
20
Issues / PRs
5

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "gitnexus-cli":https://skillpi.com/zh/skills/deepskill-09d5656d4d47cb31a85ce96bc1b00afd7f3faceb92f76e994fe547c27babd98a。安装前核对上游来源和版本:https://github.com/ceilf6/FrontAgent。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

用于运行 GitNexus 命令行工具以管理仓库索引或生成文档:当用户需要执行 GitNexus CLI 操作时使用,例如分析或索引仓库、检查状态、清理索引、生成 Wiki 或列出已索引的仓库。示例:“索引此仓库”、“重新分析代码库”、“生成 Wiki”

0 下载

介绍来源: third_party · ceilf6 · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: gitnexus-cli
description: "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\""

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.cjs reports Cannot find module (the gitignored runner is absent — e.g. a fresh clone or git clean)? (Re)generate it with npx gitnexus analyze from the project root, or bunx gitnexus@latest analyze on a bun-only machine. On npm 11.x, if npx crashes during install (node.target is null), install once with npm i -g gitnexus (then gitnexus analyze), or use bunx gitnexus@latest analyze, or pnpm --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, --skip-agents-md, --skip-skills, --no-stats, --self-commit, --index-only, and --skip-git. It never pulls remotes. Scheduled remote clone/pull is a different command: gitnexus auto-sync. Bare gitnexus watch is reserved and does not start either job. Running MCP and serve processes periodically check for a published replacement and reopen it without a restart. MCP checks are throttled to once every five seconds, so a tool call before the next check can briefly use the previous index.

status — Check index freshness

node .gitnexus/run.cjs status

Shows whether the current repo has a GitNexus index, when it was last updated, and symbol/relationship counts. Use this to check if re-indexing is needed.

clean — Delete the index

node .gitnexus/run.cjs clean

Deletes the .gitnexus/ directory and unregisters the repo from the global registry. Use before re-indexing if the index is corrupt or after removing GitNexus from a project.

Flag Effect
--force Skip confirmation prompt
--all Clean all indexed repos, not just the current one

wiki — Generate documentation from the graph

node .gitnexus/run.cjs wiki

Generates repository documentation from the knowledge graph using an LLM. HTTP providers require an API key (saved to ~/.gitnexus/config.json on first use). Local CLI providers (--provider cursor|claude|codex|opencode|grok) use your existing CLI login.

Flag Effect
--force Force full regeneration, also required to re-generate an existing wiki in a different language
--provider <name> LLM provider: minimax, openai, openrouter, azure, custom, cursor, claude, codex, opencode, or grok (default: minimax). Local CLIs (cursor, claude, codex, opencode, grok) use your existing CLI login and skip --api-key.
--model <model> LLM model (default: MiniMax-M3)
--base-url <url> LLM API base URL
--api-key <key> LLM API key
--concurrency <n> Parallel LLM calls (default: 3)
--timeout <seconds> LLM request timeout in seconds (default: disabled)
--retries <n> Max LLM retry attempts per request (default: 3)
--lang <lang> Output language for generated documentation (e.g. english, chinese, spanish, japanese)
--gist Publish wiki as a public GitHub Gist

list — Show all indexed repos

node .gitnexus/run.cjs list

Lists all repositories registered in ~/.gitnexus/registry.json. The MCP list_repos tool provides the same information.

After Indexing

  1. Read gitnexus://repo/{name}/context to verify the index loaded
  2. Use the other GitNexus skills (exploring, debugging, impact-analysis, refactoring) for your task

Troubleshooting

  • "Not inside a git repository": Run from a directory inside a git repo
  • Index is stale after re-analyzing: Wait for the next MCP tool call to reopen the published index; this normally takes no more than five seconds
  • Embeddings slow: Omit --embeddings (it's off by default) or set OPENAI_API_KEY for faster API-based embedding

版本历史

  1. v2.2.0 GitHub ↗
    原版更新说明

    # FrontAgent v2.2.0 FrontAgent v2.2.0 is a minor release after v2.1.1. It ships the new Electron desktop client, headless non-interactive CLI mode, session resume, lifecycle hooks, declarative permission rules, context zone budgets, the `@frontagent/mcp-web-fetch` adapter, a reproducible SDD ablation evaluation framework, and a set of correctness and security fixes across the CLI entry path, the hallucination guard, and the LLM provider layer. ## Highlights - New Electron desktop client with a typed IPC contract, Task Console + Settings UI, accessibility semantics, and multi-platform zip archives attached to GitHub Releases. - Headless non-interactive CLI mode with a validated JSON output contract exposing artifacts and security denials. - Session resume with schema-validated session records and cross-step file context hydration. - Lifecycle hooks with explicit project-hook opt-in and hardened hook plumbing. - Declarative permission rules and context zone budgets on the core execution path. - Reproducible SDD ablation benchmark: frozen 30-task set, two-arm orchestrator, machine-checkable acceptance, published negative findings with reproduction guide. - Global `fa` bin invocations work again (symlinked entry-path fix), and `hallucinationGuard.checks` is genuinely honored on the executor path without weakening the project-root security boundary. ## Added - **Desktop client**: typed IPC contract + execution reducer, Task Console and Settings renderer (React + Vite), main-process runtime bridge + settings store, IPC-failure degraded states, ARIA live regions and navigation semantics, electron-builder packaging publishing multi-platform zips to GitHub Releases, and desktop documentation. - **Headless CLI**: `--output` validation, artifacts and security denials in the JSON payload, stdout interception during JSON runs, top-level error classification. - **Session resume**: full step schema, order-independent resume unlock, cross-step file context hydration, session records validated on load. - **Lifecycle hooks**: explicit opt-in for project hooks, per-tool outcome observation in postToolUse, log-callback failure isolation. - **Permissions**: declarative permission rules; in-session derived allow rules with literal-wildcard escaping; bare tool rules never derived from always-allow approvals. - **Context**: zone budgets with guaranteed postconditions and a single compaction summary; AGENTS.md project instructions with byte-capped reads. - **MCP**: `@frontagent/mcp-web-fetch` adapter package wired into the agent registry and planner. - **Prompts**: external-knowledge, security-engineering, and code-minimalism disciplines in codegen/planner; security review dimension in the code-quality sub-agent. - **Evaluation**: frozen 30-task ablation set, typecheck-clean fixture project, two-arm orchestrator with resume, acceptance check runner, results report and reproduction guide. - **Docs**: verifiable npm downloads counter with daily refresh. ## Fixed - **CLI entry**: global bin symlinks (`fa` via npm/pnpm/homebrew) no longer exit silently; the direct-entry guard resolves the symlinked argv path. (#396) - **Hallucination guard**: `hallucinationGuard.checks` is honored by `validateFilePath` / `validateCode` on the executor path; project-root containment remains enforced when `fileExistence` is disabled. (#386) - **LLM provider**: AI SDK migrated to the v5 line (clears GHSA-rwvc-j5jr-mgvh); OpenAI provider pinned to Chat Completions for OpenAI-compatible base URLs. - **Planner**: `web_fetch` actions preserved in generated plans. - **Agent**: dependency recovery uses the project package manager. - **Desktop**: default-workspace setting takes effect; telemetry auto-scroll only at bottom; no demo content in TaskComposer; settings saves announced to assistive tech. - **Runtime**: session ids constrained to the sessions dir with atomic writes; real taskId on failed taskComplete hooks; win32 process-tree kill. - **Workflow gates**: workflow-rules test accepts the vars-based self-hosted Repo Guard runner. (#397) ## Changed - **CI**: Repo Guard on a self-hosted Claude Code engine with allowlisted fork actors under `pull_request_target`; catch-all CODEOWNERS; OpenRouter provider order passthrough. - **Dependencies**: ts-morph ^28; AI SDK v5 line. ## Known Issues - `hallucinationGuard.enabled` is still dead config on the agent path; only `checks` is consulted. Tracked in #400. ## Verification - `pnpm quality:precommit` (lint, typecheck, workspace tests, workflow rules) green at release. - CLI symlink invocation verified against the packaged bundle (`fa --version` via a bin symlink). ## Compatibility - CLI package version: `[email protected]`. - VS Code extension version: `[email protected]`. - Node.js requirement: `>=20.0.0`. - VS Code requirement: `^1.120.0`.

  2. v2.1.1 GitHub ↗
    原版更新说明

    # FrontAgent v2.1.1 FrontAgent v2.1.1 is a patch release after v2.1.0. It focuses on maintainability, security hardening, workflow reliability, and test coverage across the agent execution path, Filesense, hybrid RAG, memory persistence, runtime MCP handling, and the VS Code webview. ## Highlights - Decomposed the core agent and executor orchestration paths into smaller, focused helpers. - Split Filesense engine responsibilities for helpers, indexing, notes, query, and schema orchestration. - Extracted memory persistence writers and preload/recall helpers. - Extracted semantic search orchestration from the hybrid RAG knowledge-base path. - Hardened VS Code webview nonce generation and split webview renderers. - Restored and hardened local GitNexus contract gates and worktree bootstrap checks. - Expanded focused unit coverage across CLI, runtime MCP, executor, agent, context, Filesense, memory, RAG, and VS Code webview behavior. ## Changed - **Executor orchestration**: Tool-call handling, validation skip handling, progress enforcement, step feedback, and step trace recording now live in focused modules. This keeps execution behavior stable while reducing the size of the central executor implementation. - **Agent orchestration**: Context gathering, facts update flushing, project prescan preparation, task execution setup, and execution callback wiring were extracted from the main FrontAgent flow. - **Context management**: Fact serialization, facts merging, filesystem fact updates, and module dependency graph updates were split out of `ContextManager`. - **Planner phases**: Planner phase helper logic was split into dedicated modules with additional tests. - **Filesense engine**: Engine helper logic, index persistence, notes generation, query result handling, and schema orchestration were separated into focused modules. - **Memory store**: Memory preload/recall behavior and persistence writer behavior were extracted from `MemoryStore`. - **Hybrid RAG**: Semantic search orchestration was extracted from the knowledge-base implementation. - **Runtime MCP**: MCP task invocation setup was split from the runtime MCP server handler path. - **VS Code extension**: Webview body, script, style, and template rendering were decomposed into smaller helpers. - **Code quality subagent**: Prompt policy logic was split into a dedicated helper. - **Tooling**: The temporary GitNexus release-candidate patch was removed and the Biome schema version was aligned. ## Fixed - **VS Code security**: Hardened webview nonce generation. - **Filesense query**: Preserved relative path semantics in query results. - **Filesense notes**: Preserved notes schema path ownership. - **Workflow contracts**: Restored the local GitNexus contract gate. - **Bootstrap checks**: Resolved relative core worktree paths and guarded bootstrap against mismatched worktrees. ## Tests - Added focused CLI command router coverage. - Added runtime MCP contract tests and schema assertion coverage. - Added hybrid RAG knowledge-base coverage. - Added executor tests for validation skipping, progress enforcement, step feedback, tool-call handling, and trace recording. - Added agent tests for context gathering, facts flushing, project prescan preparation, execution callbacks, and task execution setup. - Added ContextManager tests for fact serialization, facts merging, filesystem fact updates, and module dependency graph behavior. - Added Filesense tests for engine helpers, indexing persistence writes, notes generation, query behavior, and schema orchestration. - Added memory tests for preload/recall helpers and persistence writers. - Added VS Code webview tests for body, script, style, and template renderer extraction. - Cleaned Biome warnings in executor, shared utility, and LLM service tests. ## Dependencies - Updated production dependency lockfile entries from the Dependabot production dependency group. ## Compatibility - CLI package version: `[email protected]`. - VS Code extension version: `[email protected]`. - Node.js requirement: `>=20.0.0`. - VS Code requirement: `^1.120.0`.

  3. v2.1.0 GitHub ↗
    原版更新说明

    # FrontAgent v2.1.0 FrontAgent v2.1.0 is a minor release after v2.0.0. It adds Open Memory Gateway integration, publishes the OSS Harness workflow assets, expands test coverage across core runtime paths, and tightens CI, dependency, and maintainer workflow checks. ## Highlights - Added opt-in Open Memory Gateway integration for managed long-term memory. - Added OSS Harness assets for contributions, PR review, GitNexus contracts, local hooks, and repository workflow checks. - Expanded focused unit coverage for FrontAgent, Executor, PhaseRunner, ContextManager, LLM service, planner, memory, security, SDD workflow, mcp-filesense, and workflow rules. - Upgraded the development and runtime dependency set, including Biome 2.x, TypeScript 6.x, Vitest 4.x, Playwright 1.60.x, Turbo 2.9.x, AI SDK, MCP SDK, and LangChain-related packages. - Updated CI to run the full quality gate on Node 20 and Node 22 with one aggregate status check. - Packaged the VS Code extension as `frontagent-2.1.0.vsix`. ## Added - **Open Memory Gateway**: FrontAgent can now use an opt-in Gateway adapter to write Gateway-compatible Markdown memories, keep draft and active memories separate, and recall active memories while retaining the existing `.frontagent/memory` fallback path. - **OSS Harness**: Added contributor guidance, workflow documentation, GitNexus knowledge contracts, CODEOWNERS, issue templates, PR template, git hooks, and workflow rule tests. - **Local workflow scripts**: Added `agent:bootstrap`, `quality:predev`, `quality:precommit`, `quality:ci`, `quality:local`, `contract:*`, and `test:workflows`. - **Dependency maintenance**: Added `.env.example` and Dependabot configuration. ## Changed - Extracted `PhaseRunner` from `Executor` and step callback handling from `FrontAgent`. - Split Skill Lab behavior benchmarking, trigger benchmarking, improvement, reporting, and scaffolding into focused modules. - Introduced structured logging and migrated core debug output to shared logger utilities. - Tightened source type safety with stricter `noExplicitAny` coverage. - Raised the VS Code extension engine requirement to `^1.120.0`. ## Fixed - Patched high-severity dependency vulnerabilities through dependency upgrades and pnpm overrides. - Fixed Biome formatting and stricter typing failures introduced by merged test and Skill Lab changes. - Unified Node 20 and Node 22 CI matrix results under a single aggregate CI status. ## Test And CI - Added broad focused unit coverage for core, memory, planner, security, executor, LLM, ContextManager, mcp-filesense, SDD, shared logger, and workflow rules. - Added Contract Guard for PRs targeting `develop`. - Added Repo Guard workflow support for PR, issue, and issue-comment review paths with fork and actor safeguards. - Upgraded GitHub Actions dependencies to `actions/checkout@v6`, `actions/setup-node@v6`, and `pnpm/action-setup@v6`. ## Compatibility - CLI package version: `[email protected]`. - VS Code extension version: `[email protected]`. - Node.js requirement: `>=20.0.0`. - VS Code requirement: `^1.120.0`.

  4. v2.0.0 GitHub ↗
    原版更新说明

    ## Highlights - **Architecture Refactoring**: All large monolithic source files decomposed into focused, single-responsibility modules - **565 Unit Tests**: Coverage increased from near-zero across the monorepo - **Biome**: Project-wide linter and formatter replacing ad-hoc ESLint configs - **Performance**: Lazy-load ts-morph (~400ms cold-start savings), async file I/O in RAG modules, 2MB bundle reduction - **Type Safety**: Eliminated all `as any` assertions across CLI, shared, and core packages ## Breaking Changes - Internal module paths changed due to refactoring. Public API from each package's `index.ts` remains unchanged. - Minimum Node.js version is now 18+. See [CHANGELOG.md](./CHANGELOG.md) for full details.

  5. v1.0.9 GitHub ↗
    原版更新说明

    ## Bug Fixes - **mcp-shell**: Enforced the `timeout` parameter that was previously accepted but never used, preventing runaway commands from hanging indefinitely (default 60s with SIGTERM/SIGKILL escalation) - **mcp-shell**: Added a 10MB output size cap to prevent OOM when commands produce excessive stdout/stderr - **shared**: Fixed `matchGlob` to escape regex metacharacters (`.`, `(`, `)`, `[`, `]`, `+`, `{`, `}`) before glob-to-regex conversion — previously `src/utils.ts` would incorrectly match `src/utilsXts` - **shared**: Fixed `deepMerge` to skip `undefined` source values instead of overwriting existing target values - **mcp-file**: Fixed `isRegularFile` and `isDirectory` to return `false` for non-existent paths instead of throwing `ENOENT` ## Improvements - **shared**: Extracted `DEFAULT_LLM_TEMPERATURE` (0.2) and `DEFAULT_LLM_MAX_TOKENS` (4096) as shared constants, fixing inconsistent model behavior between CLI (0.2) and runtime-node (0.7) ## Install ```bash npm install -g [email protected] ``` **Full Changelog**: https://github.com/ceilf6/FrontAgent/compare/v1.0.8...v1.0.9

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供 Git 仓库分析、索引、状态检查、清理、Wiki 生成等实用功能
  • 面向开发者高频刚需场景,功能完整且有明确使用价值
触发精准90/100

亮点

  • description 清晰定义了使用场景和示例
  • 覆盖多种命令变体,边界清晰,不易误触
结构规范85/100

待提升项

  • 文档过长 原报告严重程度:轻微

    文档内容超过500行,可能影响阅读体验

    改进建议:考虑将部分详细说明移至单独的帮助文档或示例文件

亮点

  • Phase/步骤清晰,有出口条件说明
  • 包含端到端示例,frontmatter 完整
执行可靠90/100

亮点

  • 工具来源明确,参数说明详细
  • 覆盖主要异常场景,有确认机制和环境变量配置说明
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 安装或获取外部依赖

    使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。

    主文档提及 · 第 8, 10 行
  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 78, 83, 86 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • github.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。