Skip to content

CLI (pnote)

Manage your PromptNote prompts from the terminal. Search, copy, pipe, and script.

pnote is the PromptNote CLI. Search notes, copy snippets to clipboard, create content from stdin, and pipe output to other tools.

Requires Node.js 18 or later.

Terminal window
npm install -g pnote

Generate an API token from the web app, then:

Terminal window
pnote auth token pn_your_token_here
# Verify
pnote auth whoami

Or set the environment variable:

Terminal window
export PNOTE_TOKEN=pn_your_token_here
Terminal window
pnote notes # List all notes
pnote notes --tag "AI/art" # Filter by tag
pnote notes --archived # Show archived
pnote notes --pinned # Show pinned only
pnote notes --protected # Show only PIN-protected notes
pnote notes get <id> # Get note details
pnote notes get <id> --latest # Get note with latest snippet only
pnote notes create "Title" # Create new note
pnote notes update <id> --title "New Title"
pnote notes update <id> --tags a b c
pnote notes archive <id> # Archive note
pnote notes pin <id> # Toggle pin
pnote notes delete <id> # Soft delete
Terminal window
pnote notes snippet <note-id> # Show latest snippet (pipe-friendly)
pnote notes snippet list <note-id> # List all versions
pnote notes snippet copy <note-id> # Copy to clipboard
echo "content" | pnote notes snippet add <note-id> # Add version from stdin
echo "updated" | pnote notes snippet update <snippet-id> # Update existing
pnote notes snippet favorite <snippet-id> # Toggle favorite
Terminal window
pnote tags # List all tags with counts
pnote tags rename "old" "new" # Rename tag (includes children)
pnote tags merge "a" "b" --into "c" # Merge tags
Terminal window
pnote share tags # List shared tags
pnote share tags <id> # View notes in shared tag
pnote share notes # List public share links
pnote share notes --include-revoked # Include revoked links
Terminal window
pnote search "query" # Full-text search
pnote search "query" --notes-only # Notes only
pnote search "query" --limit 50 # Limit results

Notes can be PIN-protected (encrypted server-side). The PIN is set in the PromptNote web app under Settings.

Terminal window
pnote pin status # Check PIN configuration and cache status
pnote pin list # List protected notes (metadata only)
# Access protected notes
PNOTE_PIN=1234 pnote notes --protected
PNOTE_PIN=1234 pnote notes get <protected-note-id>
echo "1234" | pnote notes get <id> --pin-stdin

PIN resolution order: -p flag → --pin-stdinPNOTE_PIN env var (recommended for automation) → 5-min session cache → interactive prompt (TTY only).

Sync agent skill files between PromptNote cloud and your local agent directories.

Terminal window
pnote skills # List skills in cloud
pnote skills pull # Pull all globally (~/.agents/skills/ + symlinks)
pnote skills pull <name> # Pull a specific skill globally
pnote skills pull --project # Pull project-level (.agents/skills/ + symlinks)
pnote skills pull --dry-run # Preview without writing files
pnote skills push <dir> # Upload local skill directory to cloud

Skills are written to .agents/skills/<name>/ (canonical) and symlinked into .claude/skills/, .windsurf/skills/, and other installed agent directories automatically.

Pipe search results through jq to extract titles:

Terminal window
pnote search "system prompt" --json | jq '.[].title'

Create a note from a file:

Terminal window
cat my-prompt.txt | pnote notes snippet add <note-id>

Back up all notes as JSON:

Terminal window
pnote notes --json > my-notes-backup.json
OptionDescription
--jsonOutput as JSON (machine-readable)
--no-colorDisable colors
--plainPlain text output (no formatting)
-p, --pin <pin>PIN for accessing protected notes
--pin-stdinRead PIN from stdin (first line)
-h, --helpShow help
-V, --versionShow version
VariableDescription
PNOTE_TOKENAPI token (overrides stored credentials)
PNOTE_PINPIN for accessing protected notes (recommended for automation)
NO_COLORDisable colors (standard convention)

pnote follows Unix philosophy:

  • stdout for data, stderr for status messages
  • Exit codes: 0 success, 1 general error, 2 auth error, 3 not found, 4 network error
  • Supports piping: pnote search "x" --json | jq '.[] | .title'
  • --json for programmatic consumption

Credentials stored in ~/.config/pnote/credentials.json (XDG-compliant).