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

@howaboua/pi-dynamic-tools

v0.0.8

Published

Expose TOML-defined commands through Codex-style JavaScript code mode in Pi.

Readme

@howaboua/pi-dynamic-tools

Exposes command-line programs to Pi through Codex-style JavaScript Code Mode. Tools are small TOML definitions; the model composes them inside one isolated exec environment.

Install

pi install npm:@howaboua/pi-dynamic-tools

Definitions live globally in ~/.pi/agent/dynamic-tools/ (or $PI_CODING_AGENT_DIR/dynamic-tools/) and in trusted projects at <launch-directory>/.pi/dynamic-tools/. Only the directory where Pi was launched is checked; project-local definitions override same-named global definitions. Installing the package does not enable the bundled examples.

The first exec with at least one definition downloads the pinned OpenAI Codex Code Mode host for the current platform and verifies its SHA-256 checksum. No host is downloaded while the definitions directory is empty.

Define a tool

Create one top-level TOML file per tool. Its filename becomes the method on tools, so use letters, numbers, _, or $.

usage = '''await tools.spawn_agent(JSON.stringify({ agent_type: "explorer" | "reviewer", message: string, cwd?: string }))'''
description = "Relative cwd resolves from Pi's working directory."
command = "./spawn-agent/spawn-agent.mjs"
input = "stdin"
  • usage is required and shows the exact JavaScript call.
  • command may be on PATH or relative to the TOML file.
  • input is "arg" (default) or "stdin".
  • description and output are optional on-demand help.
  • Set defer_loading = false to put a frequent tool in the prompt.
  • Set yield_time_ms to force the initial exec wait for a directly invoked long-running tool. This private policy overrides the model's // @exec value.

Definitions are rediscovered before each exec, so additions and edits take effect during the session. Invalid definitions with valid tool names remain callable and throw their configuration error; unrepresentable definitions are reported separately without disabling exec, wait, or other valid tools. Deferred help stays local until the model looks up the tool through ALL_TOOLS.

Use dynamic tools for command-backed capabilities. Use a full Pi extension when the capability needs lifecycle hooks, UI, session state, provider integration, or a provider-visible schema.

Disabled examples cover herdr_agent, more_skills, port_info, semantic_grep, sites, sites_documentation, spawn_agent, vent, and workflows_create. See DYNAMIC-TOOLS.md for setup and troubleshooting.

Runtime boundary

exec runs in OpenAI Codex's isolated V8 host with output, state, timer, and resumable-cell helpers. It does not expose Node.js, filesystem, network, or console APIs directly.

The Pi integration is MIT-licensed. Vendored Codex source and downloaded host binaries are Apache-2.0; see THIRD_PARTY_LICENSES.md and UPSTREAM_SYNC.md.