Skip to main content
The get command fetches a single note from the index by its ID and returns its metadata as a JSON object. By default it returns everything except the body text, keeping the response compact. Add --body when you need the full Markdown content. Use --format text when a shell pipeline needs the raw Markdown without JSON decoding.

Synopsis

Arguments and flags

string
required
The note’s vault-relative ID. This is the path to the .md file relative to the vault root, with the .md extension removed and directory separators preserved. See Note ID format below.
string
default:"json"
Choose json for the normal structured response or text for the raw Markdown body. Text mode fetches the body even if --body is omitted.
boolean
Include the note’s full Markdown body text in the response under the body field. The body is the raw Markdown content of the file, with frontmatter stripped. Omitting --body keeps the response small when you only need metadata.

Note ID format

A note’s ID is its vault-relative path without the .md extension. Given a vault rooted at /Users/alice/notes: IDs are case-sensitive and preserve the original directory casing from your vault. You can discover IDs from search, query, links, and backlinks output — they all use the same id field.

Output fields

Without --body — returns metadata only: With --body — all of the above, plus:

Examples

Fetch metadata only (default)
Stream the raw Markdown body
Fetch with full body text
get automatically parses the frontmatter and returns it as a plain JSON object under the key frontmatter — you never need to double-parse it. If a note has no frontmatter block, frontmatter is null.