npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ivotoby/postgram-cli

v1.28.1

Published

Postgram CLI — store, search, and manage entities from the command line

Readme

@ivotoby/postgram-cli

Command-line client for Postgram.

Install

npm install -g @ivotoby/postgram-cli

Configure

Set environment variables or create ~/.pgmrc:

# Option 1: environment variables
export PGM_API_URL=http://localhost:3100
export PGM_API_KEY=your-api-key

# Option 2: ~/.pgmrc
echo '{"api_url":"http://localhost:3100","api_key":"your-api-key"}' > ~/.pgmrc

Usage

# Store an entity
pgm store "decided to use pgvector" --type memory --tags "decisions,architecture"

# Search
pgm search "pgvector decisions" --limit 5

# Recall by ID
pgm recall <entity-id>

# List entities
pgm list --type memory

# Update an entity
pgm update <entity-id> --content "updated content" --version 1

# Delete an entity
pgm delete <entity-id>

# Create a relation
pgm link <source-id> <target-id> --relation involves

# Show graph neighborhood
pgm expand <entity-id> --depth 2

# Tasks
pgm task add "write integration tests" --context @dev --status next
pgm task list --status inbox
pgm task complete <task-id> --version 1

# Sync markdown directory
pgm sync ./notes --repo my-notes

# Check enrichment/extraction queue status
pgm queue

# JSON output (all commands)
pgm store "hello" --json

Memory Roles

Store durable memory:

pgm store "Ivo prefers client-scoped session context in Postgram." \
  --type memory \
  --visibility personal \
  --metadata '{"memory_role":"durable_memory"}'

Store session context:

pgm memory session-context "We are discussing Postgram memory lifecycle roles." \
  --visibility personal \
  --topic postgram-memory \
  --agent-id codex \
  --tags session-context

Search session context:

pgm search "Postgram memory lifecycle roles" \
  --type memory \
  --memory-role session_context \
  --visibility personal

Use durable memory for stable facts, decisions, constraints, and preferences. Use session context for recent-thread continuity. Session context is embedded for semantic recall, scoped to the calling client when the server knows its client_id, and skipped by graph extraction.

Claude Code skill

A portable Claude Code skill for using pgm from your agent lives in skill/postgram/SKILL.md in the main repo. Copy the skill/postgram/ directory into your own project's .claude/skills/ (or your user-level ~/.claude/skills/) and the agent will know when to invoke pgm store, pgm search, pgm link, etc.

Development

git clone https://github.com/ivo-toby/postgram/
cd postgram/cli
npm install
npm run build
npm test

License

MIT