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

@pithos-kit/aegis

v0.1.0

Published

Protect Pi agent shell commands and file mutations with configurable block and confirmation rules.

Readme

Aegis

Protect Pi agent shell commands and file mutations with configurable block and confirmation rules.

Aegis intercepts agent bash, write, and edit tool calls before they run. It has no command blacklist by default and one built-in protected path: editing .pi/aegis.json requires confirmation. Add project rules in .pi/aegis.json. For confirmation rules, No is the first/default option; any result other than selecting Yes blocks the operation.

User-entered ! and !! shell commands are not protected because they already represent explicit user intent.

Install

pi install npm:@pithos-kit/aegis

Pin to a version:

pi install npm:@pithos-kit/aegis@<version>

For local development from a checkout of pithos-kit:

pi install ./pithos.aegis

Project-local install:

pi install ./pithos.aegis -l

Temporary test run:

pi -e ./pithos.aegis

Pithos .pithos config

pi:
  extensions:
    "@pithos-kit/aegis": "npm:0.1.0"

Default behavior

There are no built-in command blacklist rules. The only built-in protection rule requires confirmation before an agent write or edit operation changes .pi/aegis.json.

When an agent operation matches a configured confirm rule, Aegis shows an interactive prompt with these options:

No
Yes

The operation is allowed only when Yes is selected. No, Escape/cancel, or non-interactive modes block the operation.

Configuration

Create .pi/aegis.json in your project to add rules:

{
  "commands": [
    {
      "name": "git push",
      "pattern": "\\bgit\\s+push\\b",
      "action": "confirm"
    },
    {
      "name": "recursive remove",
      "pattern": "\\brm\\s+(-rf|-fr|--recursive)\\b",
      "action": "block"
    }
  ],
  "paths": [
    {
      "name": "protect .pi",
      "pattern": "(^|/)\\.pi(/|$)",
      "action": "confirm"
    }
  ]
}

Top-level fields:

  • commands: rules matched against the full agent-run shell command for bash tool calls.
  • paths: rules matched against normalized project-relative paths for write and edit tool calls.
  • rules: an alternate field for command rules; entries are combined with commands.

Rule fields:

  • name: human-readable rule name shown in prompts and status output.
  • pattern: JavaScript regular expression string matched case-insensitively.
    • Command patterns match the full shell command.
    • Path patterns match normalized project-relative paths such as .pi/settings.json.
  • action: either:
    • confirm — ask the user before allowing the operation; block when no UI is available.
    • block — always block the operation.

If multiple rules match, block takes precedence over confirm. Invalid project configuration does not break the extension; Aegis reports warnings and continues with valid rules.

Commands

Inside Pi:

/aegis status
/aegis list
/aegis reload
/aegis toggle
/aegis --help

-h and the existing help subcommand also show usage.

  • status — show the config path, whether it was found, and the rule count.
  • list — show effective rules.
  • reload — reload .pi/aegis.json from disk.
  • toggle — enable or disable Aegis for the current Pi session; the state survives /reload.
  • help — show usage and a copy-paste example configuration.

/aegis with no argument is the same as /aegis status.

Aegis is a clean-break identity: it does not register prior commands, read prior configuration paths, or restore prior session-state entries.

Development

cd pithos.aegis
npm test
npm pack --dry-run

Notes

This package imports @earendil-works/pi-coding-agent as a peer dependency. Pi provides it at runtime; do not bundle it.