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.
Installation
Section titled “Installation”Requires Node.js 18 or later.
npm install -g pnoteAuthentication
Section titled “Authentication”Generate an API token from the web app, then:
pnote auth token pn_your_token_here
# Verifypnote auth whoamiOr set the environment variable:
export PNOTE_TOKEN=pn_your_token_hereCommands
Section titled “Commands”pnote notes # List all notespnote notes --tag "AI/art" # Filter by tagpnote notes --archived # Show archivedpnote notes --pinned # Show pinned onlypnote notes --protected # Show only PIN-protected notespnote notes get <id> # Get note detailspnote notes get <id> --latest # Get note with latest snippet onlypnote notes create "Title" # Create new notepnote notes update <id> --title "New Title"pnote notes update <id> --tags a b cpnote notes archive <id> # Archive notepnote notes pin <id> # Toggle pinpnote notes delete <id> # Soft deleteSnippets
Section titled “Snippets”pnote notes snippet <note-id> # Show latest snippet (pipe-friendly)pnote notes snippet list <note-id> # List all versionspnote notes snippet copy <note-id> # Copy to clipboardecho "content" | pnote notes snippet add <note-id> # Add version from stdinecho "updated" | pnote notes snippet update <snippet-id> # Update existingpnote notes snippet favorite <snippet-id> # Toggle favoritepnote tags # List all tags with countspnote tags rename "old" "new" # Rename tag (includes children)pnote tags merge "a" "b" --into "c" # Merge tagsSharing
Section titled “Sharing”pnote share tags # List shared tagspnote share tags <id> # View notes in shared tagpnote share notes # List public share linkspnote share notes --include-revoked # Include revoked linksSearch
Section titled “Search”pnote search "query" # Full-text searchpnote search "query" --notes-only # Notes onlypnote search "query" --limit 50 # Limit resultsPIN protection
Section titled “PIN protection”Notes can be PIN-protected (encrypted server-side). The PIN is set in the PromptNote web app under Settings.
pnote pin status # Check PIN configuration and cache statuspnote pin list # List protected notes (metadata only)
# Access protected notesPNOTE_PIN=1234 pnote notes --protectedPNOTE_PIN=1234 pnote notes get <protected-note-id>echo "1234" | pnote notes get <id> --pin-stdinPIN resolution order: -p flag → --pin-stdin → PNOTE_PIN env var (recommended for automation) → 5-min session cache → interactive prompt (TTY only).
Agent skills sync
Section titled “Agent skills sync”Sync agent skill files between PromptNote cloud and your local agent directories.
pnote skills # List skills in cloudpnote skills pull # Pull all globally (~/.agents/skills/ + symlinks)pnote skills pull <name> # Pull a specific skill globallypnote skills pull --project # Pull project-level (.agents/skills/ + symlinks)pnote skills pull --dry-run # Preview without writing filespnote skills push <dir> # Upload local skill directory to cloudSkills are written to .agents/skills/<name>/ (canonical) and symlinked into .claude/skills/, .windsurf/skills/, and other installed agent directories automatically.
Workflow examples
Section titled “Workflow examples”Pipe search results through jq to extract titles:
pnote search "system prompt" --json | jq '.[].title'Create a note from a file:
cat my-prompt.txt | pnote notes snippet add <note-id>Back up all notes as JSON:
pnote notes --json > my-notes-backup.jsonGlobal options
Section titled “Global options”| Option | Description |
|---|---|
--json | Output as JSON (machine-readable) |
--no-color | Disable colors |
--plain | Plain text output (no formatting) |
-p, --pin <pin> | PIN for accessing protected notes |
--pin-stdin | Read PIN from stdin (first line) |
-h, --help | Show help |
-V, --version | Show version |
Environment variables
Section titled “Environment variables”| Variable | Description |
|---|---|
PNOTE_TOKEN | API token (overrides stored credentials) |
PNOTE_PIN | PIN for accessing protected notes (recommended for automation) |
NO_COLOR | Disable colors (standard convention) |
Unix conventions
Section titled “Unix conventions”pnote follows Unix philosophy:
- stdout for data, stderr for status messages
- Exit codes:
0success,1general error,2auth error,3not found,4network error - Supports piping:
pnote search "x" --json | jq '.[] | .title' --jsonfor programmatic consumption
Configuration
Section titled “Configuration”Credentials stored in ~/.config/pnote/credentials.json (XDG-compliant).