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

@use-aistack/cli

v0.16.0

Published

Measure and share your AI stack from your terminal

Readme

@use-aistack/cli

Measure and share your AI stack. The CLI scans local history from Claude Code, Codex, Cursor, Grok Build, opencode and Pi, shows you exactly what would go up, and publishes only after you approve in your terminal.

Run on-demand with npx - no install required:

npx @use-aistack/cli sync

Commands

npx @use-aistack/cli sync

The default command. Scan your local transcripts (rolling 30 days), review the full summary, and publish the measured layer to your stack. Nothing leaves your machine without your explicit approval at the prompt. Raw transcripts, prompts, and paths never leave at all - only aggregates.

npx @use-aistack/cli sync

On an unlinked machine, sync starts the login flow inline - your browser opens to approve the machine, then the sync continues. One command is the whole onboarding.

After a manual sync, the CLI offers auto-sync with three choices: Enable, Maybe later, and Never ask again. Maybe later asks again after your next manual sync. Existing declines from older CLI versions are treated as Maybe later.

npx @use-aistack/cli sync --auto on / off

Optional: keep your stack fresh without manual syncs. on asks your stack for permission, then writes hooks for the harnesses you actually use. The SessionStart paths are: ~/.claude/settings.json for Claude Code, ~/.codex/hooks.json for Codex, and $GROK_HOME/hooks/aistack.json (default ~/.grok/hooks/aistack.json) for Grok Build. Cursor uses a user-level stop hook in ~/.cursor/hooks.json and reloads that configuration automatically. Its trigger runs when the agent finishes a turn. The other hooks run when a session starts. All triggers share one silent sync throttle, at most once every 6 hours. Existing user hooks are preserved. Grok Build needs a new session or hook reload after installation. off disables local publication first, removes the owned hooks, then takes the remote permission back. If removal fails, the disabled local gate still prevents publication and the next interactive sync can retry reconciliation.

npx @use-aistack/cli sync --auto on            # enable, default every 6h
npx @use-aistack/cli sync --auto on --every 12 # custom frequency in hours
npx @use-aistack/cli sync --auto off           # revoke

Your stack owns the permission, not this machine. The silent run asks aistack.to before it publishes anything, so the switch above the first section on your stack page is a complete revoke: it stops every machine, even one whose hooks are still installed. The switch defaults to every 6 hours. Run the enable command shown beside it on each machine that should install triggers. A harness you adopt months later gets its trigger the same way.

The silent run (sync --auto) never prompts and never installs a hook. Each run appends one line to ~/.config/aistack/sync.log (capped at 200 lines). The next interactive sync reports the last result. After 3 failures in a row, one visible message appears in Claude Code and names the fix. No email, no dialogs.

npx @use-aistack/cli login

Link this machine to your AI Stack account via browser. Optional - sync runs this inline when the machine is not linked yet.

npx @use-aistack/cli login
npx @use-aistack/cli login --label "build server" # preset and lock the label

npx @use-aistack/cli connect claude

Optional: install the in-session sync surface for Claude Code - the aistack MCP server (user scope) plus the aistack-sync Skill. After that, say "sync my stack" in any Claude Code session. Both halves install together or not at all.

npx @use-aistack/cli connect claude

npx @use-aistack/cli collect

Scan your project for AI config files (prompts, rules, skills, MCP setups) and upload them to your stack.

cd your-project
npx @use-aistack/cli collect

Detects: .cursorrules, CLAUDE.md, AGENTS.md, .cursor/rules/, mcp.json, skill directories, prompts, and global configs (~/.claude/, ~/.cursor/, etc).

npx @use-aistack/cli create

Write your stack's AI config files into the current directory.

npx @use-aistack/cli create

Install globally (optional)

If you'd rather type aistack instead of npx @use-aistack/cli every time, install it globally:

npm i -g @use-aistack/cli

Then the same commands become:

aistack login
aistack sync
aistack collect

Development

pnpm --filter @use-aistack/cli build
pnpm --filter @use-aistack/cli dev   # watch mode

Test locally:

node packages/cli/dist/index.js login
node packages/cli/dist/index.js sync

Set AISTACK_URL=http://localhost:3019 to test against local dev server.

Grok Build's context map uses per-call measurements retained from its local diagnostic log. Some calls may be missing because Grok rotates that log. AI Stack preserves the numeric measurements it has captured for 400 days. The map shows total call sizes; Grok's harness/instructions breakdown is unavailable. An ordinary sync collects these measurements when the log contains them.