Install
Install with PiG
pig install npm:@zhcsyncer/pi-glanceInstall with Pi
pi install npm:@zhcsyncer/pi-glancePackages 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.
{
"image": "https://raw.githubusercontent.com/zhcsyncer/pi-extensions/main/packages/pi-glance/assets/demo.png",
"extensions": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.9.3 (README.md). PiG does not review it.
◌ @zhcsyncer/pi-glance
A calm, composable input surface for Pi
Replace the default prompt with a rounded multiline editor and an inline glance at Git, cost, Reply speed, context, optional tokens, and model—without hiding statuses published by other extensions.
This package is a maintained fork of pi-glance 0.5.3. It adds a status-only footer, Follow Pi theme integration, bottom-right context and auto-compaction details, and a switchable Claude-inspired working indicator. Upstream 0.5.3 does not include the working indicator.
Install
pi install npm:@zhcsyncer/pi-glance
Then restart Pi or run /reload.
Needs Pi 1.1 or newer and Node.js 22.19.0 or newer. Standalone usage and automatic theme appearance follow Pi 1.1's reporting.
Use
/glance
/diff
/glance opens settings with a live input-surface preview. /diff hands the terminal to optional revdiff after you choose Working tree, Branch vs main, or Compare revisions; annotations return to the editor for you to confirm and are never sent automatically. If revdiff is missing, only /diff shows the install hint.
Ctrl+Shift+S stashes or restores the current editor draft. Ctrl+Shift+U discards the stash after a second press. Confirm prompts appear under the editor with a short draft preview and disappear if you wait. The left border shows a highlighted !stash mark while a draft is waiting. Reloading or resuming the same session restores it automatically if the editor is empty.
Review changes
/diff worktree— review staged, unstaged, and untracked changes./diff branch [base]— MR-style review from the common ancestor of the base and HEAD. Choose Committed only or Include working tree (including untracked files). The default base is the locally availableorigin/main, falling back to localmain;/diffnever fetches. Supply a base if neither exists./diff compare [from] [to]— compare two committed endpoints, without working-tree changes. Missing endpoints open a searchable picker for local/remote branches, tags, and the latest 50 commits on HEAD. Search by name, SHA, or commit subject, or choose Use typed ref/SHA after pasting a revision.
In fullscreen mode, click the changes summary ending in a bold, accent-colored › in the Git status line or bottom-right border to review the working tree directly. In regular mode, use /diff worktree. Only the displayed summary is clickable, not the branch name or empty border.
Subcommands have completion. Use ↑↓ and Enter to choose; Esc cancels without changing your draft. Annotations append to the current draft (or fill an empty editor); a cancelled or annotation-free review leaves it untouched. Reviews require an idle Pi TUI and a Git worktree. Revdiff keeps your native appearance preferences, including theme, compact mode, and wrapping; the selected review mode determines which changes are included. Native include/exclude file filters still apply. Your original config is not modified; theme changes made with T inside /diff apply only to that review. To save a theme preference, use standalone revdiff or edit its native config.
What you see

| (blank) | (blank) | (blank) |
|---|---|---|
| 🖊️ | Rounded editor | 2 / 3 / 4 min rows and 0 / 1 / 2 top spacing rows |
| 🏷️ | Project title | Folder name, or a safe ~/... path |
| 📊 | Inline status | Git · cost · Reply speed · context · optional tokens · model |
| Δ | Working tree | File count and tracked +N −N in the Git line, or on the bottom-right border |
| ⚙️ | /glance pane | General settings, segment order, and per-segment options |
| 💤 | Dim unfocused | Surface quiets when you scroll the chat |
| 🎨 | Themes | Follow Pi theme tokens by default, with 22 Glance palettes as fallback |
| 📥 | Editor stash | Ctrl+Shift+S stashes or restores, Ctrl+Shift+U discards after a second press; the border shows !stash for an unrestored draft |
| ✢ | Working indicator | Spinner, activity, current-cycle output, and elapsed time |
Other extensions' ctx.ui.setStatus() values remain visible below the editor. Glance does not restore Pi's two informational footer rows.
Settings
Open /glance:
- General —
Color sourceisFollow Pion new installs. ChooseGlance paletteto use the 22 built-in palettes.Light paletteandDark paletteare the fallback when the current Pi theme is unavailable.Iconsdefault toplain;nerdneeds a Nerd Font. If icons look like boxes, chooseplain.Workspace labelisname,smart, orpath. - Working indicator — one
Enabled: on/offswitch in the first-level menu.offrestores Pi's default working row. - Git —
Enabledstops all Glance git reads,fetch,/diff, and worktree counts, not just the status segment. ThenDirty marker(hidden while file counts are visible; conflicts stay),Ahead / behind,Behind main,SHA,Working tree(statusorborder right), andPolling. - Reply speed — enabled by default. Shows output tokens per second of server inference (thinking + writing):
?unknown,~42 tok/sprovisional,42 tok/sfinal. It excludes local tool execution and waiting before each response starts, so a slow tool no longer drags the speed down. Longer thinking lowers the speed for the same output. On supported Pi versions, time spent waiting in blocking UI prompts is excluded too.Precisionisauto,1 digit, or0 digits. This is a reply-experience indicator, not a benchmark. It sends no notifications and does not estimate tokens from text. - Cost — known costs recorded in the current session, including standalone usage such as cache warming and tool-reported totals. A trailing
?means a recorded usage has missing or invalid pricing; the known subtotal stays visible even withHide zero. Unreported charges are not estimated. Branch navigation keeps the session-wide total; standalone usage does not increase Context or Reply speed. - Tokens — optional session totals.
Displaychooses input/output or total.Cachecycles throughauto(read/write counts at full width),show(always show counts),hide, andHit rate(rate). Hit rate shows a rounded percentage such as42%of prompt tokens served from cache; output tokens do not affect it. Narrow layouts keep the percentage first, and no percentage appears before there are prompt tokens. The default remainsauto; existing settings stay unchanged. - Context — text as percent / tokens, plus an optional bottom-right
Progress bar(trackorborder,one thirdorremaining). Unused border cells stay light─, used cells become heavy━. Below 70% is normal, 70% to below 85% is warning, 85% or higher is error. - Bottom details — hide the auto-compaction marker if you want. Nerd Font mode shows
auto.
Git stays quiet:
- Clean trees show only the branch name.
- Dirty trees add
*/●unless Working Tree file counts are already visible, for examplemain Δ6 +123 −99. - If a narrow layout hides the file-count summary, the enabled dirty marker returns. Conflicts add
!/⚠independently of the summary. - Upstream counts look like
↑2 ↓1. - Behind the last local
origin/mainadds highlightedmain↓N. It stays hidden when the count is 0,origin/mainis missing, or upstream↓Nis already showing that same lag.
Pi's light/dark appearance takes priority over its theme name, including when the system theme changes without being renamed. Older themes without appearance keep the exact light / dark name fallback.
/diff is optional. Glance and the working-tree summary stay available without revdiff.
Working indicator
Fork difference: provided by this package; upstream pi-glance 0.5.3 does not include it.
While a high-level cycle is active, Glance shows a themed spinner, a stable per-cycle verb, current activity (requesting, thinking, highlighted responding, or running a tool), cycle output, and elapsed time after three seconds (3s, 47s, 3m 08s). Elapsed time uses the theme warning color at five minutes or later. It is not an official Anthropic component and does not change the Agent, prompts, models, tools, messages, or session behavior.
The working row is the current cycle's output. Top-border Tokens are session cumulative usage. Context is context-window occupancy. Empty partials stay hidden instead of showing ↓ ~0 tokens.
License
MIT. Original pi-glance copyright © 2026 linys77. See UPSTREAM_SOURCE.md, UPSTREAM_LICENSE, and UPSTREAM_README.md.