query command executes a Cypher query over the knowledge graph that smolbren builds from your vault. Every indexed note becomes a graph node and every wikilink found in frontmatter fields becomes a typed relationship. This lets you traverse your vault’s structure with the full expressive power of Cypher — finding paths, filtering by property, aggregating connections, and more.
Synopsis
Arguments and flags
A Cypher query string. Quote it in your shell to prevent word-splitting.
Projection names in the
RETURN clause become the column names in the
response. Both node patterns (n:Label) and relationship patterns
()-[:TYPE]->() are supported.A query parameter as a
key=value pair. Repeatable — pass --param multiple
times to supply several parameters. Reference parameters in your Cypher using
the $key syntax. Values are parsed as JSON first (so integers, booleans, and
floats work as their native types); if JSON parsing fails the value is treated
as a plain string.Graph schema
The graph is derived entirely from your vault’s frontmatter and wikilinks. No manual schema definition is required. Node labels correspond to thetype value in each note’s frontmatter (e.g. blog, project, org). Every note is also available under the catch-all label Note, regardless of whether it has a type field. Node label matching is case-insensitive.
Relationship types correspond to the frontmatter key that contained the wikilink. For example, if a note has mentions: ["[[projects/prism]]"] in its frontmatter, an edge of type mentions is created from that note to projects/prism.
Node properties available in queries:
| Property | Type | Description |
|---|---|---|
id | string | Vault-relative note ID, e.g. blogs/context-engineering |
path | string | Vault-relative file path including .md |
type | string | The note’s frontmatter type value |
title | string | The note’s title |
smolbren types to list all node labels in your vault, and smolbren edges to list all relationship types, before writing queries.
Output format
Returns a single JSON object with two fields:| Field | Type | Description |
|---|---|---|
columns | string[] | Ordered list of projection names from the RETURN clause |
rows | array[] | Each element is an array of values in the same order as columns. An empty array means no rows matched. |
Parameters
Pass runtime values using--param to avoid string-interpolating user input into your Cypher:
--param limit=5→ integer5--param active=true→ booleantrue--param name=alice→ string"alice"(JSON parse fails, falls back to string)--param tags=["a","b"]→ JSON array["a","b"]