Syntax
Description
Execute raw Cypher queries against the knowledge graph. This is a direct CLI wrapper for thecypher MCP tool.
Use this for:
- Custom graph queries beyond what the built-in tools provide
- Advanced analysis requiring multiple hops or complex patterns
- Debugging the knowledge graph schema
- Extracting data for external tools
Arguments
Cypher query to execute.Must be a valid KuzuDB Cypher query.
Options
Target repository name. Omit if only one repository is indexed.
Usage Examples
List all functions
Find all callers of a function
Get class hierarchy
Count nodes by type
Find deeply nested call chains
Specific repository
Output Format
Results are returned as JSON on stderr:Graph Schema
Before writing Cypher queries, understand the graph schema:Node Types
File— Source filesFunction— Top-level functionsClass— ClassesInterface— InterfacesMethod— Class methodsCommunity— Functional clustersProcess— Execution flows
Relationship Types
All relationships useCodeRelation edges with a type property:
CALLS— Function/method calls another function/methodIMPORTS— File imports from another fileEXTENDS— Class extends another classIMPLEMENTS— Class implements an interfaceDEFINES— File defines a symbolMEMBER_OF— Symbol belongs to a clusterSTEP_IN_PROCESS— Symbol participates in an execution flow
Common Properties
name— Symbol namefilePath— Absolute path to fileline— Line numbercontent— Source code (optional)uid— Unique identifier
Example Queries
Find all entry points
Find circular dependencies
Get cluster members
Find unused functions
When to Use
Usegitnexus cypher when:
- Built-in tools don’t provide the exact analysis you need
- You want to experiment with custom graph queries
- You’re building external tools that consume GitNexus data
- You need to validate or debug the knowledge graph
gitnexus query— Search for execution flowsgitnexus context— Symbol contextgitnexus impact— Blast radius
Cypher Resources
GitNexus uses KuzuDB’s Cypher implementation. See:Multi-Repo Support
If you have multiple repositories indexed, specify which one:Output Destination
All output goes to stderr instead of stdout because KuzuDB’s native module captures stdout at the OS level. To redirect to a file:Related Commands
gitnexus query— Search for execution flowsgitnexus context— 360-degree symbol viewgitnexus impact— Blast radius analysis