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

@zcouncil/pi

v0.1.15

Published

Pi package exposing one /chat-style zcouncil tool backed by the zcouncil SDK and bridge-aware backend.

Downloads

487

Readme

@zcouncil/pi

Pi package that exposes exactly one tool: zcouncil.

It brings the zcouncil /chat-style council SDK into Pi:

messages.latestUser()
messages.recent()

council.run(input)
council.ask(memberId, input, description)
council.members()
council.profiles()

ui.status(text)

In Pi, council.run() and council.ask() start zcouncil backend jobs and return immediately. Member results arrive later as <pi_context source="zcouncil" kind="member_result" name="gpt"> follow-up messages that wake Pi. Each invocation gets a small zc_inv_N id so started jobs and follow-up results can be correlated while debugging. The zcouncil backend handles model routing and the user's bridge.

Install

pi install @zcouncil/pi

Local development:

pi install ./packages/pi
pi -e ./packages/pi

Auth

Use the same scoped token store as @zcouncil/cli:

~/.zcouncil/tokens/<bridge-scoped-token-file>

Inside Pi, run:

/zcouncil login

The command shows the correct token deep link for the current ZCOUNCIL_API_URL / ZCOUNCIL_BRIDGE_URL, prompts for the token through Pi UI, validates it, and saves it with 0600 permissions.

Other commands:

/zcouncil doctor
/zcouncil logout

Tool calls never accept or prompt for tokens. If ZCOUNCIL_TOKEN is set, it overrides the saved token for the current Pi process.

Environments

Select dev, preview, or prod outside the agent by starting Pi with the desired environment:

ZCOUNCIL_API_URL=http://localhost:8787 pi
ZCOUNCIL_API_URL=https://zcouncil-worker-preview-pr-123.example.workers.dev pi
pi # prod defaults

Member jobs time out after 10 minutes by default. For unusual long-running jobs, set ZCOUNCIL_PI_JOB_TIMEOUT_MS before starting Pi.

Do not expose environment selection as tool arguments.

Tool calls

Pi tool calls are object-shaped, so conceptual zcouncil() is an empty tool call:

zcouncil({})

That runs:

return council.run(messages.latestUser())

Default member labels are gpt, claude, grok, and gemini when those backend members are available.

Custom /chat-style council code:

zcouncil({
  code: "await ui.status('I’m asking the council.'); return council.run(messages.latestUser())"
})

Ask one backend member:

zcouncil({
  code: "return council.ask('gpt', messages.latestUser(), 'Answer from the GPT slot')"
})

Adjust Pi message context:

zcouncil({ messages: { limit: 12, includeAssistant: true } })

Notes

  • The extension calls the zcouncil backend through @zcouncil/sdk.
  • The backend handles bridge routing; Pi does not call model CLIs directly.
  • Do not put API tokens in tool arguments; tool calls are saved in Pi sessions.