similar command embeds your query with the same local model used by embed and returns the notes whose chunks are nearest in embedding space (cosine similarity, exact KNN). Unlike search, which matches keywords with BM25, similar finds notes that are about the same thing even when they share no words with the query.
Requires smolbren embed to have run first (exit code 6 otherwise).
Synopsis
Arguments and flags
A natural-language query. Full questions and descriptions work better than
single keywords — the model embeds meaning, not terms.
Restrict results to notes whose frontmatter
type exactly matches this
value. Case-sensitive; discover values with smolbren types.Maximum number of notes to return, best match first.
Output
A JSON array of note objects, sorted by descendingscore. Chunk hits are deduplicated: each note appears once, represented by its best-matching chunk.
| Field | Type | Description |
|---|---|---|
id | string | Vault-relative note ID, e.g. blogs/context-engineering |
path | string | Vault-relative file path including .md |
type | string | null | The note’s frontmatter type, or null |
title | string | The note’s title |
score | number | Cosine similarity of the best-matching chunk, in [-1, 1]; higher is more similar |
chunk_seq | integer | Which chunk of the note matched best (0-based) |
snippet | string | The matching chunk’s text, truncated to ~280 characters |
Examples
Find notes by meaningsimilar needs both an index and embeddings. Exit code 5 means run
smolbren index first; exit code 6 means run smolbren embed first.
For a search that combines keyword precision with semantic recall, see
search --hybrid.