← Catalog

@zhexin/pi-usage

A unified provider usage command for the Pi agent.

Package

Install

Install with PiG

pig install npm:@zhexin/pi-usage

Install with Pi

pi install npm:@zhexin/pi-usage
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.2.0 (README.md). PiG does not review it.

Pi Usage

A unified /usage <provider> command for the Pi coding agent.

pi install npm:@zhexin/pi-usage

Run /usage to pick from all discovered providers, or /usage <provider> to skip the picker. Either way, the selected provider must have configured credentials.

Adapter protocol

  • Listen for pi-usage:discover. The payload is { add }. Call add({ id, label, authHint? }) synchronously, with id matching your Pi provider ID. The optional authHint tells users how to configure credentials.
  • Listen for pi-usage:request. The payload is { provider, ctx }, where provider is the selected ID and ctx is the ExtensionCommandContext. Ignore requests for other providers. Resolve credentials and display results or errors in the adapter; the command does not wait for the query.

Adapters do not need to depend on this package.

License

MIT