pi-calm
Make Pi easier to follow while it works: keep the conversation and Working... visible while quietly hiding tool chatter and optional thinking. Toggle it with /calm on, /calm thinking, and /calm off.
Package details
Install pi-calm from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-calm- Package
pi-calm- Version
1.0.1- Published
- Jul 30, 2026
- Downloads
- 133/mo · 28/wk
- Author
- jesse-zhang
- License
- MIT
- Types
- extension
- Size
- 40.3 KB
- Dependencies
- 0 dependencies · 4 peers
Pi manifest JSON
{
"extensions": [
"./extensions/calm/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-calm
A calmer way to read Pi while it works.
pi-calm keeps the conversation and Pi's Working... status easy to follow, while quietly tucking away tool chatter and optional thinking. It changes only what you see in the terminal—tool execution, model context, and session data stay untouched.
What stays visible
Calm is on by default:
| Stays visible | Quietly hidden (presentation only) |
|---|---|
| Genuine user prompts | Thinking / CoT blocks (unless /calm thinking) |
| Genuine assistant text | All tool shells (built-in and user-defined) |
Pi's native Working... row (always on, cannot be disabled) |
Operational user rows marked with U+2063 envelopes |
Hidden content remains in the session and comes back when you turn Calm off. /export and /share briefly restore Pi's normal rendering so exported content remains complete.
Install
Option A — GitHub package (recommended)
pi install git:github.com/JesseZhang97/pi-calm
The package is discoverable by Pi's package gallery/index through the
pi-package keyword in package.json.
Option B — npm package
pi install npm:pi-calm
Option C — Local path
From this directory:
pi install /Users/daydreamer/Developer/calm-mode
Or install as a path package from anywhere:
pi install ./path/to/calm-mode
Option D — Global extension copy
mkdir -p ~/.pi/agent/extensions
cp -R extensions/calm ~/.pi/agent/extensions/calm
Option E — One-shot test
pi -e ./extensions/calm/index.ts
Restart Pi (or /reload) after install. Project-local installs require project trust.
Usage
/calm on # Calm on, thinking hidden
/calm thinking # Calm on, toggle thinking / CoT
/calm off # restore ordinary transcript
Pi provides argument completion for these three command arguments after typing
/calm .
Working... is always forced visible and cannot be turned off while this extension is loaded.
There are intentionally no bare /calm, /calm thinking off, or alias forms; use
only on, thinking, and off.
Preference is written to:
~/.pi/agent/calm
Contents:
| File contents | Meaning |
|---|---|
on |
Calm on, thinking hidden (default) |
on thinking |
Calm on, thinking / CoT shown |
off |
Calm off |
Missing file → defaults to on. Override the path with PI_CALM_PREFERENCE_PATH.
Preference is restored on every session_start (startup, resume, new, fork, reload).
Operational rows (optional)
Any text-only user message that begins with one of these envelopes can be zero-height under Calm:
U+2063CALM_HIDE: <body> # general
U+2063FIRSTMATE_OP: v1 <kind>: <body> # firstmate-compatible
[fm-from-firstmate]U+2063<body> # firstmate routing carrier
U+2063Supervisor escalate (... # narrow legacy shape
Helpers:
import {
encodeCalmHideInput,
encodeFirstmateOperationalInput,
classifyOperationalText,
} from "./extensions/calm/lib/operational-input.ts";
// In another extension that injects follow-up / watcher text:
pi.sendUserMessage(encodeCalmHideInput("watcher: task finished"), {
deliverAs: "followUp",
});
Near misses stay visible (quoted markers, plain FIRSTMATE_OP: without U+2063, ordinary text before the marker, image-bearing messages).
Supported limits
Pi has no global transcript filter. These stay visible even with Calm on:
- User-bash (
!/!!) - Skill / compaction / branch summary rows
- Custom messages and entries emitted by third-party extensions
- Generic system / cache / command notices
Adapters probe the exact Pi APIs they patch (AssistantMessageComponent.updateContent, ToolExecutionComponent.render, InteractiveMode.addMessageToChat, InteractiveMode.setWorkingVisible). The ToolExecutionComponent patch blanks every tool row, including user-defined tools, even if another extension wins Pi's first-wins tool ownership (e.g. pi-tool-display). If a future Pi removes a seam, that adapter logs a diagnostic and skips; /calm and the rest keep working. No numeric version gate.
Verified against Pi 0.81.1 – 0.82.1.
Layout
package.json # pi package manifest
extensions/calm/
index.ts # /calm command, tool wrappers, preference
lib/
visibility.ts # presentation policy + preference + legacy entry renderer
operational-input.ts # pure TS marker encode/classify
assistant-layout.ts # thinking/CoT presentation adapter
tool-execution-layout.ts # all tool-row zero-height adapter
operational-user-layout.ts # operational user-row zero-height adapter
working-lock.ts # force Working... always visible
Credits
Behavior and presentation contracts follow firstmate's Calm docs:
Standalone packaging, pure-TS operational markers, and Pi-agent-dir preference storage are this package's adaptations.