@artale/pi-lean

Lean tool output for Pi. Auto-truncate verbose bash output, collapse npm/pip noise, keep errors and results visible.

Package details

extension

Install @artale/pi-lean from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@artale/pi-lean
Package
@artale/pi-lean
Version
1.0.0
Published
Mar 14, 2026
Downloads
30/mo · 2/wk
Author
artale
License
MIT
Types
extension
Size
8.7 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "src/extension.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-lean

Lean tool output for Pi. Auto-truncate verbose bash output, collapse npm/pip noise, keep errors visible. Save context tokens.

Install

pi install npm:@artale/pi-lean

What it does

Hooks into tool results and removes noise:

  • npm — strips npm warn, npm notice, npm http, progress bars
  • pip — strips Requirement already satisfied, progress bars
  • git — strips remote:, Receiving objects:, Resolving deltas:
  • cargo — strips Compiling, Downloading, Fetching

Keeps important lines: errors, warnings, stack traces, test results, final status.

Truncates long output: keeps head + tail + important middle lines, drops the rest.

Commands

/lean status               — show lines/tokens saved
/lean mode <mode>          — off | normal | aggressive
/lean reset                — reset stats

Modes

  • off — no truncation
  • normal — remove noise, truncate at 100 lines
  • aggressive — remove noise, truncate at 50 lines

Example

Before (npm install, 47 lines of noise):

npm warn deprecated ...
npm warn deprecated ...
added 847 packages in 32s

After (pi-lean, 3 lines):

added 847 packages in 32s
[44 noise lines removed by pi-lean]

Zero dependencies

Node.js built-ins only. Pattern matching, no external packages.

License

MIT