### Setup Dependencies and API Keys Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/eval/README.md Installs the project dependencies and sets up API keys by copying an example file and editing it. ```bash cd eval # Install dependencies pip install -e . # Set up API keys — copy the template and fill in your keys cp .env.example .env # Then edit .env and paste your key(s) ``` -------------------------------- ### Example: Tracing Payment Processing with GitNexus Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-exploring.md Illustrates a practical example of using GitNexus to understand the payment processing flow, starting from repository context to specific function details. ```shell 1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes 2. query({search_query: "payment processing"}) → CheckoutFlow: processPayment → validateCard → chargeStripe → RefundFlow: initiateRefund → calculateRefund → processRefund 3. context({name: "processPayment"}) → Incoming: checkoutHandler, webhookHandler → Outgoing: validateCard, chargeStripe, saveTransaction 4. Read src/payments/processor.ts for implementation details ``` -------------------------------- ### Get PR Diff and Analyze Changes Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-pr-review.md This example demonstrates a full review workflow starting with fetching the PR diff, detecting changes, and assessing impact. ```bash 1. gh pr diff 42 > /tmp/pr42.diff ``` ```javascript 2. detect_changes({scope: "compare", base_ref: "main"}) → Changed symbols: validatePayment, PaymentInput, formatAmount → Affected processes: CheckoutFlow, RefundFlow → Risk: MEDIUM ``` ```javascript 3. impact({target: "validatePayment", direction: "upstream"}) → d=1: processCheckout, webhookHandler (WILL BREAK) → webhookHandler is NOT in the PR diff — potential breakage! ``` ```javascript 4. impact({target: "PaymentInput", direction: "upstream"}) → d=1: validatePayment (in PR), createPayment (NOT in PR) → createPayment uses the old PaymentInput shape — breaking change! ``` ```javascript 5. context({name: "formatAmount"}) → Called by 12 functions — but change is backwards-compatible (added optional param) ``` -------------------------------- ### Installation and Build Commands Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/vendor/tree-sitter-dart/README.md Commands to install dependencies, build the grammar, and run tests. ```bash npm install npm run build_init npm run build npm run test ``` -------------------------------- ### Example: Full Rename Workflow Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-refactoring.md A step-by-step example of renaming `validateUser` to `authenticateUser`, including preview, review, application, and verification. ```plaintext 1. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true}) → 12 edits: 10 graph (safe), 2 ast_search (review) → Files: validator.ts, login.ts, middleware.ts, config.json... 2. Review ast_search edits (config.json: dynamic reference!) 3. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false}) → Applied 12 edits across 8 files 4. detect_changes({scope: "all"}) → Affected: LoginFlow, TokenRefresh → Risk: MEDIUM — run tests for these flows ``` -------------------------------- ### Install Web UI Dependencies Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/CONTRIBUTING.md Installs dependencies for the Web UI. Navigate to the 'gitnexus-web/' directory before running. ```bash cd gitnexus-web && npm install ``` -------------------------------- ### Configure GitNexus with Environment File Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md Copy the example environment file and modify it to override image tags, container names, ports, or workspace directory before starting with Docker Compose. ```bash cp .env.example .env docker compose --env-file .env up -d ``` -------------------------------- ### Clone and Run GitNexus Web UI Locally Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md Clone the GitNexus repository, build shared components, install dependencies for the web UI, and start the development server. Ensure the backend is running separately. ```bash git clone https://github.com/abhigyanpatwari/gitnexus.git cd gitnexus/gitnexus-shared && npm install && npm run build cd ../gitnexus-web && npm install npm run dev # Then in another terminal, start the backend the frontend connects to: npx gitnexus@latest serve ``` -------------------------------- ### Example: Full PR Review Workflow Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus-claude-plugin/skills/gitnexus-pr-review/SKILL.md This example demonstrates a complete PR review process using GitNexus tools, from fetching the diff to summarizing findings. ```bash 1. gh pr diff 42 > /tmp/pr42.diff → 4 files changed: payments.ts, checkout.ts, types.ts, utils.ts 2. detect_changes({scope: "compare", base_ref: "main"}) → Changed symbols: validatePayment, PaymentInput, formatAmount → Affected processes: CheckoutFlow, RefundFlow → Risk: MEDIUM 3. impact({target: "validatePayment", direction: "upstream"}) → d=1: processCheckout, webhookHandler (WILL BREAK) → webhookHandler is NOT in the PR diff — potential breakage! 4. impact({target: "PaymentInput", direction: "upstream"}) → d=1: validatePayment (in PR), createPayment (NOT in PR) → createPayment uses the old PaymentInput shape — breaking change! 5. context({name: "formatAmount"}) → Called by 12 functions — but change is backwards-compatible (added optional param) 6. Review summary: - MEDIUM risk — 3 changed symbols affect 2 execution flows - BUG: webhookHandler calls validatePayment but isn't updated for new signature - BUG: createPayment depends on PaymentInput type which changed - OK: formatAmount change is backwards-compatible - Tests: checkout.test.ts covers processCheckout path, but no webhook test ``` -------------------------------- ### Install and Build CLI / MCP Package Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/CONTRIBUTING.md Installs dependencies and builds the CLI/MCP package. Ensure you are in the 'gitnexus/' directory. ```bash cd gitnexus && npm install && npm run build ``` -------------------------------- ### Docker Compose Setup for GitNexus Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md Use Docker Compose for a one-command setup to start the GitNexus server and web UI. This command also sets up a named volume for data persistence. ```bash docker compose up -d ``` -------------------------------- ### Context Tool Output Example Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus-claude-plugin/skills/gitnexus-pr-review/SKILL.md Example output from the `context` tool, showing incoming and outgoing calls for a symbol, and its involvement in different processes. ```text context({name: "validatePayment"}) → Incoming calls: processCheckout, webhookHandler → Outgoing calls: verifyCard, fetchRates → Processes: CheckoutFlow (step 3/7), RefundFlow (step 1/5) ``` -------------------------------- ### Detect Changes Output Example Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus-claude-plugin/skills/gitnexus-pr-review/SKILL.md Example output from the `detect_changes` tool, showing the number of changed symbols, affected files, and identified processes. ```text detect_changes({scope: "compare", base_ref: "main"}) → Changed: 8 symbols in 4 files → Affected processes: CheckoutFlow, RefundFlow, WebhookHandler → Risk: MEDIUM ``` -------------------------------- ### Install GitNexus CLI Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/CLAUDE.md Install the GitNexus CLI globally if you encounter issues with npm. ```shell npx gitnexus analyze ``` -------------------------------- ### Install GitNexus with pnpm dlx and Build Permissions Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md This command installs and runs GitNexus using pnpm dlx, explicitly allowing builds for required packages. This is useful for one-off executions without a global installation. ```bash pnpm --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter \ dlx gitnexus@latest serve ``` -------------------------------- ### GitNexus Context Tool Example Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus-cursor-integration/skills/gitnexus-debugging/SKILL.md Use the 'context' tool to get full information about a suspect function or symbol. It shows incoming and outgoing calls, and associated processes. ```javascript context({name: "validatePayment"}) → Incoming calls: processCheckout, webhookHandler → Outgoing calls: verifyCard, fetchRates (external API!) → Processes: CheckoutFlow (step 3/7) ``` -------------------------------- ### Install pi-gitnexus Community Integration Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Install the pi-gitnexus integration for the pi agent using the provided npm command. ```bash pi install npm:pi-gitnexus ``` -------------------------------- ### Skip Optional Grammars for Faster GitNexus Install Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md Set this environment variable before global installation to skip building optional grammars for tree-sitter, significantly speeding up the install process without requiring a C++ toolchain. ```bash GITNEXUS_SKIP_OPTIONAL_GRAMMARS=1 npm install -g gitnexus ``` -------------------------------- ### Configure Specific Editor Integrations with GitNexus Setup Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md Use the `--coding-agent` or `-c` flag with a comma-separated list of editors, or repeat the option, to configure only selected integrations during setup. ```bash gitnexus setup -c cursor,codex ``` -------------------------------- ### GitNexus CLI Setup and Management Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Commands for configuring, uninstalling, and managing GitNexus MCP and its associated skills and hooks. ```bash gitnexus setup # Configure MCP for detected editors (one-time; use -c to select) ``` ```bash gitnexus uninstall # Preview removal of GitNexus MCP/skills/hooks (add --force to apply) ``` -------------------------------- ### Configure Extension Install Timeout Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Adjust the timeout for out-of-process extension installations. Increase this value for environments with slow network connections. ```bash GITNEXUS_LBUG_EXTENSION_INSTALL_TIMEOUT_MS=30000 npx gitnexus analyze ``` -------------------------------- ### Reproduce PDG Benchmarking Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/bench/impact-pdg/README.md Run these commands to reproduce the benchmarking results described in the document. Ensure you have Node.js and tsx installed. ```sh node --import tsx bench/impact-pdg/measure.mjs # correctness (F1 / FPIS / FNIS vs AIS) ``` ```sh node --import tsx bench/impact-pdg/blast-radius.mjs # localization magnitude (downstream) ``` ```sh node --import tsx bench/impact-pdg/blast-radius.mjs --direction upstream ``` ```sh node --import tsx bench/impact-pdg/real-code.mjs # symbol-reach preservation + latency ``` -------------------------------- ### Global Installation of GitNexus with npm Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Install GitNexus globally using npm. This is the recommended approach on npm 11+ to avoid potential issues with npx re-evaluation. ```bash npm install -g gitnexus@latest ``` ```bash gitnexus serve ``` -------------------------------- ### Install Sigstore Policy Controller with Helm Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md Install the Sigstore policy-controller in a Kubernetes cluster using Helm. This controller is required to enforce image signing policies at admission. ```bash # 1. Install the controller (one-time, cluster-wide) helm repo add sigstore https://sigstore.github.io/helm-charts && helm repo update helm install policy-controller -n cosign-system --create-namespace \ sigstore/policy-controller # 2. Opt your namespace in kubectl label namespace policy.sigstore.dev/include=true # 3. Apply the policy kubectl apply -f deploy/kubernetes/cluster-image-policy.yaml ``` -------------------------------- ### Project Configuration with .gitnexusrc Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md Example of a .gitnexusrc file to preconfigure recurring analyze options per project. CLI flags will override these settings. ```jsonc { // Default branch used in the generated regression-compare example (base_ref). // Use this so a project on `develop`/`master` doesn't get "main" rewritten // over its fix on every analyze. (Alias: "branch".) "defaultBranch": "develop", "skipContextFiles": true, // alias of skipAgentsMd: keep your own AGENTS.md/CLAUDE.md "skipSkills": true, // don't install .claude/skills/gitnexus/ "embeddings": true, // generate embeddings by default "workerTimeout": 60 } ``` -------------------------------- ### Global Installation of GitNexus with pnpm Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Install GitNexus globally using pnpm, allowing build scripts. This is recommended for pnpm 10.2+ and ensures native modules are built correctly. ```bash pnpm add -g --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter gitnexus ``` ```bash gitnexus serve ``` -------------------------------- ### Run GitNexus Development Services Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/AGENTS.md Commands to start the development servers for the CLI and Web UI, and to run the HTTP API. ```bash cd gitnexus && npm run dev # CLI: tsx watch mode ``` ```bash cd gitnexus-web && npm run dev # Web UI: Vite on port 5173 ``` ```bash npx gitnexus serve # HTTP API on port 4747 (from any indexed repo) ``` -------------------------------- ### GitNexus Server and Status Commands Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md Commands to manage GitNexus services and check repository status. `mcp` starts the MCP server for all indexed repos, `serve` starts a local HTTP server for the web UI, `list` shows indexed repositories, and `status` checks the index status for the current repository. ```bash gitnexus mcp # Start MCP server (stdio) — serves all indexed repos ``` ```bash gitnexus serve # Start local HTTP server (multi-repo) for web UI connection ``` ```bash gitnexus list # List all indexed repositories ``` ```bash gitnexus status # Show index status for current repo ``` -------------------------------- ### GitNexus Server and Index Management Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Commands for starting the MCP server, local HTTP server, and managing repository indexes. ```bash gitnexus mcp # Start MCP server (stdio) — serves all indexed repos ``` ```bash gitnexus serve # Start local HTTP server (multi-repo) for web UI ``` ```bash gitnexus index # Register an existing .gitnexus/ folder into the global registry ``` ```bash gitnexus list # List all indexed repositories ``` ```bash gitnexus status # Show index status for current repo ``` ```bash gitnexus clean # Delete index for current repo ``` ```bash gitnexus clean --all --force # Delete all indexes ``` -------------------------------- ### Example Debugging Workflow Step 1: Query Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-debugging.md Begin debugging by using the `query` tool to find relevant code related to the observed error or symptom. ```javascript query({search_query: "payment error handling"}) ``` -------------------------------- ### Example Debugging Scenario: Intermittent Payment Endpoint Error Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus-claude-plugin/skills/gitnexus-debugging/SKILL.md Demonstrates a practical debugging scenario using GitNexus tools. It involves querying for errors, getting context on suspect functions, reading execution flows, and identifying the root cause. ```bash 1. query({search_query: "payment error handling"}) → Processes: CheckoutFlow, ErrorHandling → Symbols: validatePayment, handlePaymentError 2. context({name: "validatePayment"}) → Outgoing calls: verifyCard, fetchRates (external API!) 3. READ gitnexus://repo/my-app/process/CheckoutFlow → Step 3: validatePayment → calls fetchRates (external) 4. Root cause: fetchRates calls external API without proper timeout ``` -------------------------------- ### Example Model Configuration Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/eval/README.md This YAML snippet shows how to configure a model, including its name, cost tracking, and model-specific arguments. ```yaml model: model_name: "openrouter/provider/model-name" cost_tracking: "ignore_errors" # if not in litellm's cost DB model_kwargs: max_tokens: 8192 temperature: 0 ``` -------------------------------- ### GitNexus list_repos Paging Example Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus-claude-plugin/skills/gitnexus-guide/SKILL.md Demonstrates how to enumerate all repositories by repeatedly calling `list_repos` with increasing `offset` values until `hasMore` is false. It also notes the behavior for out-of-range or malformed `limit`/`offset` parameters. ```text list_repos {} list_repos { offset: 50 } list_repos { offset: 400 } ``` -------------------------------- ### Install Build Tools for Native Modules Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Ensure necessary build tools like Python, make, and a C++ compiler are installed on your system (Linux/macOS) before attempting to install GitNexus if native module compilation fails. ```bash # Ensure build tools are available (Linux/macOS) # Ubuntu/Debian: sudo apt install python3 make g++ # macOS: xcode-select --install ``` ```bash # Retry installation npm install -g gitnexus ``` -------------------------------- ### Using GitNexus Query Tool Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-exploring.md Demonstrates how to use the 'query' tool to find execution flows related to a specific concept, such as payment processing. ```shell query({search_query: "payment processing"}) → Processes: CheckoutFlow, RefundFlow, WebhookHandler → Symbols grouped by flow with file locations ``` -------------------------------- ### Example Debugging Workflow Step 3: Read Process Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-debugging.md Use the `READ` command with the process resource to trace the execution flow and pinpoint the step where an issue occurs. ```gitnexus READ gitnexus://repo/my-app/process/CheckoutFlow ``` -------------------------------- ### Paginating list_repos Command Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-guide.md Demonstrates how to enumerate all repositories by repeatedly calling `list_repos` with increasing offsets until all items are retrieved. Handles pagination parameters and error conditions. ```text list_repos {} → repos 1–50, nextOffset 50, hasMore true list_repos { offset: 50 } → repos 51–100, nextOffset 100, hasMore true ... list_repos { offset: 400 } → repos 401–437, hasMore false (done) ``` -------------------------------- ### Install and build CLI package Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/RUNBOOK.md Commands to install and build the CLI package from the repository root. ```bash cd gitnexus npm install npm run build ``` -------------------------------- ### Create GitHub Release Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/CONTRIBUTING.md Commands to create a GitHub Release. Use `--prerelease` for release candidates and `--notes-file` for stable releases. ```bash gh release create v --prerelease --generate-notes # RC ``` ```bash gh release create v --notes-file gitnexus/CHANGELOG.md # stable ``` -------------------------------- ### Initializer Inference Examples Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/type-resolution-system.md Examples of inferring types from initializers in various languages when no explicit annotation is present. ```typescript const user = new User() ``` ```csharp var user = new User() ``` ```kotlin val user = User() ``` ```go user := User{} ptr := &User{} user2 := new(User) ``` ```ruby user = User.new ``` -------------------------------- ### GitNexus CLI Commands Overview Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/README.md This diagram illustrates the primary CLI commands for GitNexus: setup, analyze, clean, and list. These commands interact with the global registry and project repositories. ```mermaid flowchart TD subgraph CLI [CLI Commands] Setup["gitnexus setup"] Analyze["gitnexus analyze"] Clean["gitnexus clean"] List["gitnexus list"] end subgraph Registry ["~/.gitnexus/"] RegFile["registry.json"] end subgraph Repos [Project Repos] RepoA[".gitnexus/ in repo A"] RepoB[".gitnexus/ in repo B"] end subgraph MCP [MCP Server] Server["server.ts"] Backend["LocalBackend"] Pool["Connection Pool"] ConnA["LadybugDB conn A"] ConnB["LadybugDB conn B"] end Setup -->|"writes global MCP config"| CursorConfig["~/.cursor/mcp.json"] Analyze -->|"registers repo"| RegFile Analyze -->|"stores index"| RepoA Clean -->|"unregisters repo"| RegFile List -->|"reads"| RegFile Server -->|"reads registry"| RegFile Server --> Backend Backend --> Pool Pool -->|"lazy open"| ConnA Pool -->|"lazy open"| ConnB ConnA -->|"queries"| RepoA ConnB -->|"queries"| RepoB ``` -------------------------------- ### Impact Analysis with Test Coverage Example Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus-claude-plugin/skills/gitnexus-pr-review/SKILL.md Example output from `impact` when checking test coverage, listing tests that cover the specified symbol. ```text impact({target: "validatePayment", direction: "upstream", includeTests: true}) → Tests that cover this symbol: - validatePayment.test.ts [direct] - checkout.integration.test.ts [via processCheckout] ``` -------------------------------- ### Impact Analysis Output Example Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus-claude-plugin/skills/gitnexus-pr-review/SKILL.md Example output from the `impact` tool, detailing direct (d=1) and indirect (d=2) dependents, and potential breakage. ```text impact({target: "validatePayment", direction: "upstream"}) → d=1 (WILL BREAK): - processCheckout (src/checkout.ts:42) [CALLS, 100%] - webhookHandler (src/webhooks.ts:15) [CALLS, 100%] → d=2 (LIKELY AFFECTED): - checkoutRouter (src/routes/checkout.ts:22) [CALLS, 95%] ``` -------------------------------- ### Analyze and Index a Repository Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-cli.md Build or refresh the knowledge graph index for a repository. Run from the project root. This command parses source files, builds the graph, and generates context files. It's essential for first-time use, after major code changes, or when the index is stale. ```bash node .gitnexus/run.cjs analyze ``` -------------------------------- ### Using GitNexus Context Tool Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-exploring.md Shows how to use the 'context' tool to get a 360-degree view of a symbol, including its incoming and outgoing calls and related processes. ```shell context({name: "validateUser"}) → Incoming calls: loginHandler, apiMiddleware → Outgoing calls: checkToken, getUserById → Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3) ``` -------------------------------- ### Publish Wiki as GitHub Gist Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-cli.md Use the --gist flag with the wiki command to publish the generated documentation as a public GitHub Gist. ```bash node .gitnexus/run.cjs wiki --gist ``` -------------------------------- ### Get full context for a suspect with context Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/skills/gitnexus-debugging.md Use the `context` tool to get detailed information about a suspect function, including its callers, callees, and associated processes. ```javascript context({name: "validatePayment"}) ``` -------------------------------- ### GitNexus Wiki with Custom Model Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Generates a wiki using a specified LLM model, defaulting to `gpt-4o-mini` if none is provided. ```bash gitnexus wiki --model ``` -------------------------------- ### Install GitNexus with pnpm for npm 11.x Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Use this command with pnpm if you encounter crashes during installation with npx on npm 11.x. It allows specific builds for GitNexus and its dependencies. ```bash pnpm --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter dlx gitnexus@latest analyze ``` -------------------------------- ### Initialize and use tree-sitter WASM with Swift Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/vendor/tree-sitter-swift/README.md Initialize the web-tree-sitter, load the Swift language WASM bundle, and parse Swift code. ```javascript const Parser = require('web-tree-sitter'); async function run() { //needs to happen first await Parser.init(); //wait for the load of swift const Swift = await Parser.Language.load('./tree-sitter-swift.wasm'); const parser = new Parser(); parser.setLanguage(Swift); //Parse your swift code here. const tree = parser.parse('print("Hello, World!")'); } //if you want to run this run().then(console.log, console.error); ``` -------------------------------- ### GitNexus Uninstall Preview Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Demonstrates the preview functionality of the `gitnexus uninstall` command, showing paths that would be removed. ```bash gitnexus uninstall ``` -------------------------------- ### Configure Extension Installation Behavior Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Control how GitNexus handles optional DuckDB extensions (BM25, vector search). Use 'load-only' for offline/airgapped environments to prevent network access for installations. ```bash GITNEXUS_LBUG_EXTENSION_INSTALL=load-only npx gitnexus analyze ``` -------------------------------- ### Unified Capture Tags Example Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/ARCHITECTURE.md This example shows common unified capture tags used across different languages by Tree-sitter queries, enabling downstream extraction without language-specific branching. ```text Per-language tree-sitter queries use different AST node names but produce the **same semantic capture tags**: `@definition.class`, `@definition.function`, `@call.name`, `@import.source`, `@reference.inherits`. Downstream extraction needs no language branching. Defined in `tree-sitter-queries.ts`. ``` -------------------------------- ### Install GitNexus Release Candidate Source: https://github.com/abhigyanpatwari/gitnexus/blob/main/gitnexus/README.md Install the latest release candidate of GitNexus to try in-flight fixes before the next stable release. This is useful for early adopters who want to test new features or bug fixes. ```bash npm install -g gitnexus@rc ``` ```bash npx gitnexus@rc analyze ```