@dreki-gg/pi-ask-mode

Read-only ask mode for pi — restricts tools to read-only operations, blocking file creation, editing, and deletion

Packages

Package details

extension

Install @dreki-gg/pi-ask-mode from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@dreki-gg/pi-ask-mode
Package
@dreki-gg/pi-ask-mode
Version
0.3.3
Published
May 28, 2026
Downloads
533/mo · 10/wk
Author
jalbarrang
License
MIT
Types
extension
Size
12.3 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/ask-mode"
  ]
}

Security note

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

README

@dreki-gg/pi-ask-mode

Read-only ask mode for pi. Toggle with /ask — pi can read, search, and answer but cannot create, edit, or delete files.

Install

pi install npm:@dreki-gg/pi-ask-mode

Usage

Feature Name Notes
Flag --ask Start pi in ask mode
Command /ask Toggle ask mode on/off
Shortcut Ctrl+Alt+A Toggle ask mode

Start in ask mode:

pi --ask

Toggle inside pi:

/ask

Enter ask mode and send a prompt in one step:

/ask How does authentication work in this codebase?

Run /ask again to exit ask mode.

Allowed

  • read — Read file contents
  • bash — Read-only commands only (ls, grep, cat, git status, git log, etc.)
  • grep — Search file contents
  • find — Find files by pattern
  • ls — List directories

Blocked

  • edit — File editing
  • write — File creation/overwriting
  • Destructive bash commands — rm, mv, cp, mkdir, git commit, git push, npm install, redirects, editors, and similar commands

How it works

Ask mode uses two layers of protection:

  1. Tool whitelist — Only read-only tools are exposed to the LLM via setActiveTools().
  2. Defense-in-depth — A tool_call handler blocks edit, write, and destructive bash commands even if the LLM somehow attempts them.

Ask mode has no end-of-turn menu and creates no .plans/ files. It stays active until you run /ask again.

State persists across session restarts and tree navigation.

Difference from pi-modes

@dreki-gg/pi-modes provides configurable presets that can also restrict tools. Use pi-modes if you want multiple configurable modes with model/thinking presets. Use pi-ask-mode if you just want a simple dedicated read-only toggle.