pi-claude-addons

Claude Code-inspired addons for Pi.

Packages

Package details

extension

Install pi-claude-addons from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-claude-addons
Package
pi-claude-addons
Version
1.4.0
Published
Jul 7, 2026
Downloads
not available
Author
noamyu
License
MIT
Types
extension
Size
48 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

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

README

pi-claude-addons

Claude Code-inspired quality-of-life extensions for Pi.

This package adds a few familiar CLI behaviors while staying small, inspectable, and easy to remove.

Install

pi install npm:pi-claude-addons

Restart Pi, or run /reload in an existing Pi session after installing/updating.

Features

/cd <path>

Move the current Pi session to another working directory without restarting Pi.

/cd ..
/cd ../another-repo
/cd ~/src/project
/cd "/path/with spaces"

What it does:

  • Validates that the target exists and is a directory
  • Preserves the current conversation by relocating it into the target directory's Pi session storage
  • Switches Pi so future file and shell operations use the new working directory
  • Adds a short context note so the assistant knows the working directory changed
  • Supports directory autocompletion, ~, .., relative paths, absolute paths, and paths with spaces

This is modeled after Claude Code's /cd <path> behavior: move the session root rather than merely granting access to an extra folder.

/effort

Set Pi's thinking level with a Claude Code-style effort selector.

/effort
/effort off
/effort medium
/effort high
/effort xhigh

Running /effort with no argument opens an interactive Faster → Smarter selector. Supported levels are:

  • off
  • minimal
  • low
  • medium
  • high
  • xhigh

Pi may clamp the requested value if the current model does not support that thinking level.

/loop

Run a task until completion, or repeat a prompt on an interval for monitoring.

/loop <task>                 # work-until-done mode
/loop --max 25 <task>        # cap continuation iterations
/loop 5m <task>              # timed mode
/loop every 2 hours <task>   # timed mode, natural interval syntax
/loop                        # use .pi/loop.md, ~/.pi/agent/loop.md, or built-in maintenance
/loop status
/loop stop
/cancel-loop

Work-until-done mode starts immediately and auto-continues after each assistant turn until Pi sees the assistant output:

<promise>DONE</promise>

Timed mode starts immediately, then waits the interval and re-runs the prompt until stopped, max iterations are reached, or the assistant outputs the completion promise.

How it works:

  • Stores loop state in .pi/loop.local.md
  • Supports relative default prompts with .pi/loop.md and user default prompts with ~/.pi/agent/loop.md
  • Stops at the configured max iteration count, defaulting to 100
  • Restores pending timed loop wakeups on /reload while the same Pi session is open

Only output <promise>DONE</promise> when the task is completely and verifiably finished.

Claude-style line cursor

Use a vertical line cursor in Pi's editor instead of Pi's default fake block cursor.

/cursor
/cursor line
/cursor block

The line cursor is enabled by default when the extension loads. Use /cursor block if you want to temporarily return to block cursor behavior.

Repeated large-paste expansion

A Claude Code-style paste helper for large blocks of text.

Behavior:

  • First large paste: Pi inserts a compact marker such as [paste #1 +123 lines]
  • Paste the same text again: the marker expands into the full pasted text
  • Press ctrl+c to clear the editor: the cycle resets
  • Paste the same text after clearing: it is compacted again, then expands on the next same paste

Local development

From this repository:

pi -e .

Or install the local checkout:

pi install .

After changing extension files, run /reload inside Pi.

Security

Pi extensions execute with your local user permissions. Review extension code before installing any third-party Pi package.

Publishing

For maintainers:

npm publish --access public