smolbren docs --agent emits canonical Markdown, and smolbren get <id> --format text emits a raw note body.
Success output
On success, one line of compact JSON is printed to stdout and the process exits with code0.
- List commands (
search,links,backlinks,types,edges,vault list) return a JSON array, one element per result. - Single-item commands (
get,index,vault add,vault remove) return a JSON object.
smolbren search "zettelkasten" might emit:
smolbren get 202401-zettelkasten returns a single object:
Fields that are absent or inapplicable are included as
null rather than being omitted. This keeps output shapes stable across notes so downstream code can rely on a consistent schema.Error output
When a command fails, the error is written to stderr as a single line of compact JSON with two fields —error (a human-readable message) and code (a stable machine-readable identifier):
Error codes
The
code field is guaranteed to be one of these four values. Use it (rather than the error string) for programmatic branching; the human-readable message may change between releases.
Parsing with jq
Because every command emits valid JSON on a single line,jq works with no special flags:
All JSON is compact — no indentation or line breaks. Pipe through
jq . to get human-readable formatted output when inspecting results at the terminal: