@zigai/pi-tree

Pi package that improves /tree with timestamps and preview behavior.

Packages

Package details

extension

Install @zigai/pi-tree from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@zigai/pi-tree
Package
@zigai/pi-tree
Version
0.1.7
Published
Jun 14, 2026
Downloads
544/mo · 449/wk
Author
zigai
License
MIT
Types
extension
Size
43.7 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

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

README

Pi Tree

npm version npm downloads license

This Pi extension improves /tree with timestamps on every entry, a cleaner help/status line, and an optional right-side preview.

The preview helps when scanning a long session because you can inspect message content without opening each branch.

Install

pi install npm:@zigai/pi-tree

Features

  • Shows per-entry timestamps in /tree.
  • Supports off, relative, and absolute timestamp modes.
  • Uses Pi's configured tree label-timestamp keybinding, commonly Shift+T, to cycle timestamp modes.
  • Adds an optional selected-entry preview pane on the right side of /tree when the terminal is wide enough.
  • Toggles the preview pane with Shift+P.
  • Reads timestamp and preview choices from global or trusted project Pi settings.
  • Can make /tree taller with treeMaxVisibleLines.
  • Can keep the preview pane at full height or shrink it to fit preview content.

Pi Tree preview demo

Configuration

Configuration is stored in Pi settings: globally in ~/.pi/agent/settings.json, or per trusted project in .pi/settings.json.

{
  "treeTimestampMode": "relative",
  "treeSelectedPreview": false,
  "treeMaxVisibleLines": 24,
  "treePreviewFullHeight": true
}

Settings:

  • treeTimestampMode: one of off, relative, or absolute. Defaults to relative.
  • treeSelectedPreview: set to true to open /tree with the preview pane enabled. Defaults to false.
  • treeMaxVisibleLines: optional maximum number of tree rows to show. When unset, Pi's native height is used. Values are clamped to at least 5.
  • treePreviewFullHeight: set to false if the preview pane may shrink to the selected preview content, but never below the visible tree rows. Defaults to true.

You can also change the first two settings from inside /tree: use Pi's configured tree time keybinding, commonly Shift+T, to cycle timestamp modes, and Shift+P to toggle the preview pane. Interactive changes are written to global settings.

Development

npm install
npm run check

License

MIT