← Catalog

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.

Extension

Install

Install with PiG

pig install npm:pi-calm

Install with Pi

pi install npm:pi-calm
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": [
    "./extensions/calm/index.ts"
  ]
}

README

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

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 visibleQuietly hidden (presentation only)
Genuine user promptsThinking / CoT blocks (unless /calm thinking)
Genuine assistant textOrdinary tool chatter (built-in and user-defined tools)
Deliverable tools (plan_mode_complete, PI_CALM_VISIBLE_TOOLS)Operational user rows marked with U+2063 envelopes
Pi's native Working... row (always on, cannot be disabled)

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

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 ./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 contentsMeaning
onCalm on, thinking hidden (default)
on thinkingCalm on, thinking / CoT shown
offCalm 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).

Visible tools exemption

While Calm tucks away routine tool chatter (read, bash, edit, etc.), tools whose execution result is a primary user deliverable remain visible.

  • plan_mode_complete: Automatically kept visible so proposals from pi-plan-mode can be read directly in the transcript.
  • PI_CALM_VISIBLE_TOOLS: Comma-separated environment variable to exempt additional tools:
export PI_CALM_VISIBLE_TOOLS="generate_report,review_summary"

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:

  • Deliverable-oriented tool rows (plan_mode_complete, and any tool names in PI_CALM_VISIBLE_TOOLS)
  • 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 ordinary tool rows (including user-defined tools) while allowing deliverable tools like plan_mode_complete to remain visible. 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.