PrismicalPrismical

Command-Line Interface

Read and write your notes from the terminal and your scripts with the Prismical CLI.

The prismical CLI puts your notes on the command line. It's the same API the rest of the world uses, wrapped in a tool you can pipe, script, and drop into a cron job.

Install

npm install -g prismical
curl -fsSL https://prismical.ai/install.sh | sh
irm https://prismical.ai/install.ps1 | iex

Check it's working:

prismical --version

Sign In

The CLI authenticates with a personal API key. Create one at Settings → API & MCP, then:

prismical auth login

Paste the key when prompted. It's saved for next time, so you only do this once per machine. prismical auth status shows who you're signed in as, and prismical auth logout clears the key.

In a script or CI, skip the login and set PRISMICAL_API_KEY in the environment instead — the CLI picks it up automatically.

Using It

Commands are grouped by what they act on — notes, folders, tags, search, and so on. A few to get the shape of it:

# Who am I signed in as?
prismical whoami

# Search your notes
prismical search "acme pricing"

# List recent notes
prismical notes list

# Read one note, body included
prismical notes get nt_abc123 --include-body

# Write a note's body from a file (or stdin)
prismical notes-write nt_abc123 --file notes.md

Ids are the same prefixed ids the API uses — nt_ for a note, fld_ for a folder, and so on.

Output You Can Pipe

Every command prints a readable table by default. For scripting, switch the format:

FlagGives you
--jsonJSON, for piping into jq
--format csvCSV
--format yamlYAML
--output <file>Write to a file instead of the terminal

Two more worth knowing:

  • --page-all follows pagination and returns everything, not just the first page.
  • --dry-run shows what a command would do without doing it — handy before a bulk change.

A Real Example

Export every note's text to a folder of markdown files:

for id in $(prismical notes list --page-all --json | jq -r '.results[].id'); do
  prismical notes get "$id" --include-body --json \
    | jq -r '.body' > "export/$id.md"
done

That's the same bulk-export path described in Data & export, without writing a client of your own.

Shell Completion

# bash / zsh / fish / powershell
prismical completion zsh > ~/.prismical-completion.zsh

prismical man prints the full manual.

Questions

On this page