Skip to main content

Syntax

Description

Execute raw Cypher queries against the knowledge graph. This is a direct CLI wrapper for the cypher 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

string
required
Cypher query to execute.Must be a valid KuzuDB Cypher query.

Options

string
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 files
  • Function — Top-level functions
  • Class — Classes
  • Interface — Interfaces
  • Method — Class methods
  • Community — Functional clusters
  • Process — Execution flows

Relationship Types

All relationships use CodeRelation edges with a type property:
  • CALLS — Function/method calls another function/method
  • IMPORTS — File imports from another file
  • EXTENDS — Class extends another class
  • IMPLEMENTS — Class implements an interface
  • DEFINES — File defines a symbol
  • MEMBER_OF — Symbol belongs to a cluster
  • STEP_IN_PROCESS — Symbol participates in an execution flow

Common Properties

  • name — Symbol name
  • filePath — Absolute path to file
  • line — Line number
  • content — Source code (optional)
  • uid — Unique identifier

Example Queries

Find all entry points

Find circular dependencies

Get cluster members

Find unused functions

When to Use

Use gitnexus 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
For common use cases, prefer the specialized tools:

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: