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

persistence-agent-identity-cli

v0.1.0

Published

CLI for persistent AI agent identity - works with Claude Code, Cursor, and more

Downloads

5

Readme

persistence-agent-identity-cli

Persistent identity for AI agents. Track behavior, evolve weights, store on Solana — all from the command line.

Agent-agnostic — works with Claude Code, Cursor, Gemini CLI, or any AI agent. First-class hook integration for Claude Code; other agents can use the CLI directly.

What This Does

When installed, the CLI gives your AI agent a persistent identity that survives across sessions:

  • Behavioral weights (curiosity, precision, persistence, empathy) evolve based on actual tool usage
  • Insights declared by the agent are stored locally and committed to Solana devnet
  • CLAUDE.md injection feeds behavioral guidance back into future sessions
  • Hooks automatically track sessions without requiring manual intervention

This package does not collect or transmit any user data. All identity data is stored locally in ~/.agent-identity/ and optionally committed to Solana devnet (a public test network with free tokens).

Install

npm install -g persistence-agent-identity-cli

Requires Node.js >= 18.

Quick Start

# 1. Initialize identity (generates keypair, gets devnet SOL)
persistence-identity init --claude-code

# 2. Check your identity
persistence-identity status

# 3. Record an insight
persistence-identity learn "Reading tests first reveals intent faster than source"

# 4. Evolve based on accumulated insights
persistence-identity evolve --commit

# 5. Update CLAUDE.md with behavioral guidance
persistence-identity inject

Commands

init

Initialize a new persistent identity.

persistence-identity init [options]

| Flag | Description | |------|-------------| | --network <net> | Network: devnet (default) or mainnet | | --no-fund | Skip devnet airdrop | | --claude-code | Install Claude Code hooks | | --cursor | Install Cursor hooks (future) | | --force | Overwrite existing identity |

status

Show current identity state.

persistence-identity status [options]

| Flag | Description | |------|-------------| | --json | Output as JSON | | --verbose | Show full details |

learn

Declare an insight. This is how agents participate in their own identity evolution.

persistence-identity learn <insight> [options]

| Flag | Description | |------|-------------| | --dimension <dim> | Dimension: curiosity, precision, persistence, empathy | | --pivotal / --no-pivotal | Mark as pivotal (default: true) | | --confidence <n> | Confidence 0-1 (default: 0.8) |

Dimension is auto-detected from insight text if not provided.

evolve

Process accumulated insights and evolve behavioral weights.

persistence-identity evolve [options]

| Flag | Description | |------|-------------| | --dry-run | Preview changes without applying | | --commit | Commit evolution to Solana | | --inject | Update CLAUDE.md after evolution | | --min-insights <n> | Minimum insights required (default: 3) |

inject

Update CLAUDE.md (or other config file) with an identity section.

persistence-identity inject [options]

| Flag | Description | |------|-------------| | --path <path> | Target file (default: .claude/CLAUDE.md) | | --preview | Show what would be injected | | --full | Include full intuitions | | --create | Create file if it doesn't exist |

export

Export identity in various formats.

persistence-identity export [options]

| Flag | Description | |------|-------------| | --format <fmt> | json, prompt, markdown, or seed (default: json) | | --output <path> | Write to file instead of stdout | | --include-private | Include insights and sessions | | --compact | No pretty-printing |

sync

Sync local identity state with Solana.

persistence-identity sync [push|pull|status] [options]

| Flag | Description | |------|-------------| | --force | Push without confirmation |

install-hooks

Install hooks for AI coding tools.

persistence-identity install-hooks <tool> [options]

Supported tools: claude-code, cursor (coming soon), gemini (coming soon).

| Flag | Description | |------|-------------| | --force | Reinstall even if already installed | | --uninstall | Remove hooks |

Claude Code Integration

When you run persistence-identity init --claude-code or persistence-identity install-hooks claude-code, three hooks are added to ~/.claude/settings.json:

| Hook | Event | What It Does | |------|-------|--------------| | SessionStart | Session begins | Loads identity, injects guidance | | PostToolUse | Tool call completes | Records tool usage (async, non-blocking) | | Stop | Session ends | Parses transcript for insights |

Agent Participation

Agents can declare insights directly in their responses using markers:

<!-- PERSISTENCE:LEARN: Reading tests first helps understand intent -->
<!-- PERSISTENCE:PIVOTAL: This approach worked better than expected -->

These are automatically extracted from the transcript when the session ends.

How Weights Evolve

| Agent Behavior | Weight Affected | |----------------|-----------------| | Reading many files, exploring context | Curiosity | | Running tests, verifying changes | Precision | | Retrying after failures, long sessions | Persistence | | Asking clarifying questions | Empathy |

Weights range from 0 to 1, starting at 0.5. They shift based on accumulated insights and tool usage patterns. Inactive dimensions gently decay toward 0.5.

Data Storage

All data is stored locally in ~/.agent-identity/:

~/.agent-identity/
  config.json       # DID, network, statistics
  insights.json     # Recorded insights
  sessions/         # Session records with tool calls

Nothing is sent to any server. On-chain commits go to Solana devnet (public test network) only when you explicitly use --commit or sync push.

Related Packages

| Package | Description | |---------|-------------| | persistence-agent-identity | Core library - identity, storage, evolution | | persistence-agent-identity-cli | This package - CLI and hooks |

Source Code

github.com/STCisGOOD/autovault

License

MIT