pi-session-native-compression
Transparent macOS native compression for Pi session JSONL files using Applesauce.
Package details
Install pi-session-native-compression from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-session-native-compression- Package
pi-session-native-compression- Version
0.1.1- Published
- Sep 6, 2026
- Downloads
- 270/mo · 148/wk
- Author
- ckrvxr
- License
- MIT
- Types
- extension
- Size
- 34.2 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-session-native-compression
A global Pi extension for transparent native compression of Pi session .jsonl files on macOS.
It uses Applesauce with ZLIB compression while keeping the original session path, filename, and .jsonl format. Pi can continue to read and resume compressed sessions normally; no decompression step or wrapper command is required.
Requirements
- macOS with a filesystem supporting native file compression (normally APFS)
- Pi
>= 0.84.4 - The
applesauceexecutable available onPATH
Install
pi install npm:pi-session-native-compression
The package is loaded globally by Pi after installation.
Behavior
- Scans historical sessions at startup.
- Compresses the current session when Pi shuts down or switches sessions.
- Skips the active session during startup scanning.
- Uses Applesauce ZLIB, level 5, minimum compression ratio
0.95, and verification. - Leaves files uncompressed when native compression would not reduce physical storage.
- Records status in
~/.pi/agent/session-compression.json. - Reports failures, preserves the session file, and retries on a later run.
The extension also supports custom session directories such as --session-dir and serializes work across concurrent Pi processes.
Uninstall
pi remove npm:pi-session-native-compression
Uninstalling the package does not delete or modify existing session files or the state file.
License
MIT