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-claude-agent

v0.1.1

Published

Pi extension that delegates tasks to the local Claude Code CLI with tmux sessions and inspectable artifacts.

Readme

pi-claude-agent

Pi extension that delegates work to the local Claude Code CLI.

It adds one tool, claude_agent, that can run Claude in either:

  • backend: "tmux" — interactive Claude in a tmux session or pane, with artifacts written to disk.
  • backend: "print"claude --print --output-format stream-json, streamed back to Pi.

The tmux backend is the main feature: it uses the same working directory as Pi, writes an inspectable artifact directory, and can run hidden or in a visible split pane.

Install

Prerequisites:

  • Pi
  • Claude Code available as claude
  • tmux for the default backend: "tmux". If you do not use tmux, set backend: "print".

Install from GitHub:

pi install git:github.com/liamvinberg/[email protected]

For a local checkout:

pi install /path/to/pi-claude-agent

Usage

Ask Pi to delegate to Claude:

Use claude_agent to inspect this repository and suggest one cleanup.

Explicit tmux run:

{
  "backend": "tmux",
  "task": "Inspect this repository and summarize the package structure."
}

Watch Claude in a visible tmux split:

{
  "backend": "tmux",
  "tmux_display": "pane",
  "task": "Review the current diff."
}

Leave the tmux session or pane open after completion:

{
  "backend": "tmux",
  "tmux_display": "pane",
  "autoclose": false,
  "task": "Investigate this failing test."
}

Resume a previous Claude session:

{
  "backend": "tmux",
  "resume_session_id": "00000000-0000-0000-0000-000000000000",
  "task": "Continue from the previous investigation."
}

Use a custom MCP config:

{
  "backend": "tmux",
  "mcp_config": "./claude-mcp.json",
  "strict_mcp_config": true,
  "allowed_tools": ["mcp__example__tool"],
  "task": "Use the configured MCP server to answer the question."
}

Options

Common options:

  • task — delegated task for Claude.
  • backend"tmux" or "print". Default: tmux.
  • cwd — working directory. Default: Pi's current cwd.
  • model — Claude model or alias. Omitted by default, so Claude CLI chooses its default.
  • resume_session_id — Claude session id returned by a prior run.
  • timeout_seconds — run timeout. Default: 300.
  • sandbox_mode"read-only" or "default". Default: read-only.
  • permission_mode, tools, allowed_tools — forwarded to Claude permission/tool flags.
  • mcp_config, strict_mcp_config — generic Claude MCP config. No MCP profiles are built in.

Tmux options:

  • tmux_display"detached" or "pane". Default: detached.
  • autoclose — close the tmux target when done. Default: true.
  • output_dir — artifact directory. Default: a temporary pi-claude-agent-* directory.
  • tmux_session_name — optional name for detached sessions.

Optional environment overrides:

export PI_CLAUDE_COMMAND=claude
export PI_CLAUDE_AGENT_BACKEND=print
export PI_CLAUDE_AGENT_TMUX_DISPLAY=pane
export PI_CLAUDE_AGENT_MODEL=sonnet
export PI_CLAUDE_AGENT_TIMEOUT_SECONDS=600

Artifacts

Tmux runs write files such as:

  • task.md — delegated task
  • instructions.md — run instructions for Claude
  • final.md — final assistant message captured by the Stop hook
  • ready.json, done.json — lifecycle markers
  • hook-events.jsonl — Claude hook events
  • tmux-capture.txt — recent tmux pane capture

Pi returns the artifact directory path in the tool result. Artifacts may contain prompts, local paths, Claude transcript paths, and hook event metadata. Treat them as local debugging output, not sanitized logs.

Security

This extension runs your local claude CLI with your local Claude credentials and filesystem access. The default sandbox_mode: "read-only" limits Claude's built-in tools, but it is not an OS sandbox. Review requested permissions before enabling write tools or bypass permissions.

License

MIT