Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

CLI Usage

The pgm CLI is the primary human-facing interface and supports the same actions as REST with concise output modes for automation.

Install and usage patterns for everyday local use and agent-friendly workflows.

  1. Install:
Terminal window
npm install -g @ivotoby/postgram-cli
  1. Configure once:
Terminal window
export PGM_API_URL=http://127.0.0.1:3100
export PGM_API_KEY=your-api-key
  1. Store and retrieve entities:
Terminal window
pgm store "decided to use pgvector" --type=memory --tags decisions
pgm search "decided to use pgvector"
pgm recall <entity-id>
pgm update <id> --content "revised content" --version 1
pgm delete <id>
  1. Task and sync operations:
Terminal window
pgm task add "fix retrieval false positives" --context @focus --status next
pgm sync ~/Documents/personal-notes --repo personal-notes
pgm link <source-id> <target-id> --relation involves
pgm expand <entity-id> --depth 2

For local development without build:

Terminal window
npx tsx cli/src/pgm.ts <command>
  • Agent modes:
    • --json (compact structured JSON)
    • --json --full-response (REST-shaped payloads)
    • --toon (compact agent-readable text for list-like operations).
  • task complete and search are commonly used in automation scripts; capture the returned version for update flows.