A pi extension that shows a small live tldr box above
the input bar while the agent works.
It writes a TLDR of what pi is currently doing and keeps the final TLDR visible until the next prompt starts.
During a prompt, pi displays a TLDR box like:
╭ tldr ─────────────────────────────────────────────╮
│ Inspecting the extension package structure │
╰───────────────────────────────────────────────────╯
The TLDR updates as pi works, including during tool calls and final responses.
pi-tldr records each prompt, assistant update, tool call, tool result, and final response as activity. For each activity, it asynchronously asks the selected TLDR model for a generated status checkpoint.
Each checkpoint prompt includes recent generated TLDR checkpoints as compact context plus the new raw activity that has not been summarized yet. Follow-up prompts keep this generated context, so pi-tldr can summarize continuations without starting from scratch.
The widget does not show local fallback summaries. It renders completed model output when available, shows user-prompt and final-response checkpoints immediately, and throttles ordinary activity updates to avoid flicker.
Install globally:
pi install npm:pi-tldrTry it for one session:
pi -e npm:pi-tldrRemove it:
pi remove npm:pi-tldr- A recent version of pi with package/extension support.
- At least one configured API key for either your configured TLDR model or an automatic fallback model.
By default, auto tries these fast models in order:
openai-codex/gpt-5.4-miniopenai-codex/gpt-5.3-codex-sparkanthropic/claude-haiku-4-5anthropic/claude-haiku-4-5-20251001
If none has a configured API key, the extension shows no tldr model authenticated
above the editor instead of showing fake fallback text.
To prefer a specific TLDR model, set it in pi settings:
Global:
{
"tldr": {
"model": "anthropic/claude-haiku-4-5"
}
}Save this in:
~/.pi/agent/settings.json
Project settings override global settings. Save project settings in:
.pi/settings.json
Set the model to auto, omit the setting, or provide an invalid model string
to use automatic model selection. If a configured provider/model cannot be
found or authenticated, pi-tldr falls back to auto.
Show available pi-tldr commands:
/tldr
/tldr help
| Command | Description |
|---|---|
/tldr status |
Show selected and active model after auth/fallback resolution. |
Check which model is selected and which model is active after auth/fallback resolution:
/tldr status
Example:
pi-tldr status
selected model: auto
active model: openai-codex/gpt-5.4-mini
If no supported model is available, the active model is none and pi-tldr shows
no tldr model authenticated above the editor. If auth cannot be checked, the
active model is unknown (auth check failed).
pi-tldr sends short snippets from recent prompt, assistant, tool, and result
activity to the selected TLDR model provider. Requests may also include recent
generated TLDR checkpoint summaries from the current session. This activity is
generally already part of the pi agent context, but auto may send it to an
additional or different provider from your main pi model.
pi-tldr does not attempt to detect or redact secrets. It disables prompt caching for TLDR requests and keeps snippets short, but this is not a security boundary. Do not use pi-tldr where sending these snippets to the TLDR provider is unacceptable.
MIT