Skip to main content

Syntax

Description

Searches the knowledge graph for execution flows related to a concept. This is a direct CLI wrapper for the query MCP tool, bypassing MCP overhead for use in scripts, CI, and evaluation. Results are grouped by execution flows (processes), showing how the matched symbols participate in call chains.

Arguments

string
required
The concept to search for (e.g., “authentication flow”, “database connection”, “error handling”).

Options

string
Target repository name. Omit if only one repository is indexed.Example: --repo my-app
string
Task context to improve ranking (e.g., “debugging login failures”).
string
What you want to find (e.g., “find where auth tokens are validated”).
number
Maximum number of processes to return.Default: 5
boolean
Include full symbol source code in results.Default: false

Usage Examples

Search with context

Search with goal

Search specific repository

Include source code

Limit results

Output Format

Results are returned as JSON on stderr (because KuzuDB captures stdout at the OS level):

When to Use

Use gitnexus query instead of the MCP tool when:
  • Writing shell scripts
  • Running in CI/CD pipelines
  • Performing batch analysis
  • Evaluating GitNexus (e.g., SWE-bench)
  • You need machine-readable output
For interactive use in AI editors, the MCP tool is preferred (better integration with agent workflows).

Multi-Repo Support

If you have multiple repositories indexed, specify which one to query:
If you omit --repo with multiple repos indexed, you’ll get an error:

Output Destination

All output goes to stderr instead of stdout because KuzuDB’s native module captures stdout at the OS level during initialization. To redirect to a file: