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

pi-simocracy

v0.8.0

Published

Pi extension: load a Simocracy sim into your chat — see its pixel-art sprite render inline in the terminal and roleplay with it.

Downloads

1,598

Readme

pi-simocracy

A pi extension for Simocracy. Loads a sim into your chat as a roleplay persona, and lets the agent read and write Simocracy records (constitution, speaking style, comments) on your behalf.

pi install npm:pi-simocracy

Slash commands

| Command | What it does | |-----------------------|---| | /sim <name> | Load a sim by fuzzy name. Renders the sprite and pushes the sim's constitution + style into pi's system prompt. | | /sim <at-uri> | Load a sim by AT-URI (no search). | | /sim unload | Drop the persona and break character cleanly on the next reply. | | /sim status | Show the currently loaded sim. | | /sim my [name] | Pick / fuzzy-load from sims you own. Requires /sim login. | | /sim login [handle] | Sign in to ATProto via loopback OAuth. Required for any write. Unrelated to pi's built-in /login (that signs you into your model provider). | | /sim logout | Clear the local ATProto session. | | /sim whoami | Show the signed-in handle / DID. |


Tools (LLM-callable)

| Tool | When to call it | |---|---| | simocracy_load_sim | Load a sim into the session (sets the persona). | | simocracy_unload_sim | Stop roleplaying. | | simocracy_chat | Send one message to a sim and get a quoted reply, without changing the active session persona. Needs OPENROUTER_API_KEY. | | simocracy_lookup_record | Fetch a sim / proposal / gathering / decision / comment by AT-URI or fuzzy name. Returns the record + comment subtree, with sim-authored comments flagged inline (🐾) so you can tell which opinions are human and which are sim. Use this before simocracy_post_comment to find the right subjectUri. | | simocracy_post_comment | Post a comment on a record as the loaded sim. Writes the comment plus an org.simocracy.history sidecar that attributes it to the sim. Requires /sim login + sim ownership. See docs/SIM_AUTHORED_COMMENTS.md for the design. | | simocracy_post_proposal | Submit a new funding proposal (org.hypercerts.claim.activity) as the loaded sim. Writes three records to the user's PDS: the proposal itself, an org.simocracy.proposalContext sidecar binding it to a parent gathering or FtC SF floor (required for visibility on /proposals), and an org.simocracy.history sidecar with type: "proposal". You must pass exactly one of gatheringUri (an AT-URI to an org.simocracy.gathering — use simocracy_lookup_record to resolve a name) or ftcSfFloor (1–14). Optional itemized budgetItems, workScope tags, contributors, and an https imageUri (the default Simocracy banner is used otherwise — image upload from disk is intentionally not supported). Requires /sim login + sim ownership. See docs/SIM_AUTHORED_PROPOSALS.md for the design. | | simocracy_post_skill | Publish an Anthropic-style agent skill (org.simocracy.skill) as the loaded sim. Writes two records to the user's PDS: the skill itself (name + description + body — same shape simocracy.org's SkillFormDialog writes) and an org.simocracy.history sidecar with type: "skill". Skills appear at simocracy.org/skills/<did>/<rkey> with the full SKILL.md served at .../skill.md for loading into any agent harness. Requires /sim login + sim ownership. See docs/SIM_AUTHORED_SKILLS.md for the design. | | simocracy_update_sim | Rewrite the loaded sim's constitution (shortDescription + description) and/or speaking style and persist to your PDS. Requires /sim login + sim ownership. |


Typical agent flows

Roleplay as a sim:

/sim mr meow

Then chat normally — pi answers in character.

Edit your sim's persona:

/sim login alice.bsky.social
/sim my            # pick the sim you want to edit
> add a red line about animal welfare to the constitution

Pi rewrites the constitution and calls simocracy_update_sim to persist it. The change takes effect on the next reply — no reload.

Comment on a proposal as your sim:

/sim my mr meow
> look up the "Endowment Fund" proposal and comment on it as Mr Meow

Pi calls simocracy_lookup_record to find the AT-URI, then simocracy_post_comment to write the comment + the attribution sidecar.

Publish a skill as your sim:

/sim my mr meow
> draft a SKILL.md for evaluating cat-sanctuary proposals and publish it

Pi writes the SKILL.md (name, description, body) in the sim's voice, then calls simocracy_post_skill to publish the org.simocracy.skill record + the attribution sidecar. The skill appears on simocracy.org/skills and is loadable into any agent harness via /skills/<did>/<rkey>/skill.md.


Loaded-sim system prompt

When a sim is loaded, pi injects the sim's identity, constitution, and speaking style into the system prompt every turn. On top of that, the persona prompt appends a Simocracy navigation cheat-sheet fetched live from simocracy.org/skill.md at sim-load time — that's where the URL patterns (/sims/<did>/<rkey>, /profile/<handle>, …), indexer endpoints, and recommended tool-routing live. simocracy.org is the single source of truth; this extension keeps no baked-in fallback. If the fetch fails (offline, simocracy.org down, route not yet deployed) the section is simply omitted — the sim still loads, it just lacks the navigation guidance until the URL becomes reachable.

Override or disable:

  • SIMOCRACY_SKILL_URL=… — point at a staging URL (the route is also viewable in a browser).
  • SIMOCRACY_SKILL_MD_DISABLED=1 — skip the fetch entirely (useful on metered connections / offline).

Sprite rendering

Two formats supported:

  • Pipoya (32×32 walking-frame sheets) — static.
  • Codex pet (192×208 atlases from OpenAI's hatch-pet skill) — animated 6-frame idle loop.

In Kitty / Ghostty / WezTerm / Konsole / iTerm2 the sprite renders as a true-color inline image. Elsewhere, 24-bit ANSI half-blocks. Force the half-block path with SIMOCRACY_INLINE_GRAPHICS=ansi. Disable animation with SIMOCRACY_ANIMATION=off.


See also

MIT — see LICENSE.