Querying with JSON output
Use the query
command to query your Zettelkasten and return the matches in JSON format.
Querying all zettels
To retrieve the metadata (sans content) of all zettels in your Zettelkasten:
neuron query --zettels
You can use jq
to further process the JSON result. For eg., to print a list of zettel titles:
neuron query --zettels | jq ".[].Title"
Querying a single zettel
To retrieve the metadata for a zettel by its Zettel ID:
neuron query --id=index
Querying entire Zettelkasten graph
neuron query --graph
Other queries
neuron query --backlinks-of ID
neuron query --uplinks-of ID
neuron query --tags
neuron query --tag=mytag
Fast querying
Pass the --cached
argument if you want the query to run instantly, by reading from the local cache. To make sure that the cache remains up-to-date, you must be running neuron gen
as a daemon.