Skip to main content
This page covers gavai get, which fetches a page document from the active workspace and prints it to stdout as pretty-printed JSON. You can pipe the output through jq, save it to disk for editing, or diff it against a previously stored snapshot.

Synopsis

gavai get <id>

Arguments

Flags

Run gavai get --help for the authoritative flag list. The CLI is the source of truth.

Behavior

The command calls GET /v1/workspaces/{slug}/pages/{id}, where {slug} is the active_workspace from ~/.config/gavai/credentials.json and {id} is the positional argument you passed. The full page document — version string, metadata, and block tree — is written to stdout as pretty-printed JSON. Redirect or pipe it.

Examples

Save a page document to disk:
gavai get page_01HXR8K2M4 > page.json
Inspect a specific block tree path with jq:
gavai get page_01HXR8K2M4 | jq '.tree.children[0].props'
Diff against a previously saved version:
gavai get page_01HXR8K2M4 > current.json
diff current.json page.json

Exit codes

See CLI overview — exit codes for the full table.