@pi-archimedes/diff
Shiki-powered diff rendering for pi-archimedes
Package details
Install @pi-archimedes/diff from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@pi-archimedes/diff- Package
@pi-archimedes/diff- Version
1.3.1- Published
- Jun 17, 2026
- Downloads
- 2,386/mo · 1,354/wk
- Author
- danmademe
- License
- unknown
- Types
- extension
- Size
- 59.1 KB
- Dependencies
- 3 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
],
"image": "https://raw.githubusercontent.com/danielcherubini/pi-archimedes/main/docs/images/diff-edit.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@pi-archimedes/diff
Shiki-powered diff rendering for the Pi coding agent.
Features
- Split and unified views — side-by-side split diff or traditional unified view, auto-selected based on terminal width
- Shiki syntax highlighting — full syntax highlighting powered by Shiki, with auto-derived theme colors
- Word-level emphasis — changed characters within lines are highlighted at word level for precise change tracking
- Graceful fallback — falls back to plain text diff when Shiki is unavailable or the language is unrecognized
- Configurable thresholds — control minimum terminal width for split view and minimum code width per side
Screenshots
Split diff view
Side-by-side diff with syntax highlighting, word-level emphasis on changed characters, and line numbers:

Installation
pi install @pi-archimedes/diff
Or install the full pi-archimedes meta package for the integrated experience:
pi install pi-archimedes
Settings
| Setting | Type | Default | Description |
|---|---|---|---|
diffTheme |
string | github-dark |
Shiki syntax-highlighting theme |
diffSplitMinWidth |
number | 150 |
Minimum terminal columns to show split diff view (≥ 100) |
diffSplitMinCodeWidth |
number | 60 |
Minimum code columns per side in split view (≥ 30) |
Settings are stored in ~/.pi/agent/settings.json under the archimedes.diff namespace.
Integration
When installed via pi-archimedes (the meta package), the diff tools are registered with callbacks to the current theme and config, ensuring colors match your active Pi theme. Standalone installs use default dark theme colors.
