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
string
required
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.string
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 include the physical fields below and
every scalar frontmatter key whose name is a valid identifier. Property names are
case-insensitive and normalized to prevent duplicate Cypher fields. Strings,
numbers, and booleans retain their types. Lists and maps are intentionally omitted.
Dates written in canonical ISO form (
YYYY-MM-DD) remain strings whose lexical
ordering is chronological. This makes weekly and recency queries straightforward:
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: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"]