pi-session-exporter
Export Pi session history as clean Markdown for sharing in PRs, issues, docs, and Slack
Package details
Install pi-session-exporter from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-session-exporter- Package
pi-session-exporter- Version
1.0.0- Published
- May 22, 2026
- Downloads
- not available
- Author
- jaraxxxx
- License
- MIT
- Types
- extension
- Size
- 10.8 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"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-exporter
Export your Pi session as clean Markdown for sharing in PRs, issues, docs, and Slack.
What it produces
# Pi Session Export
**Exported:** 2026-05-22 14:30:00
**Directory:** `~/my-project`
**Session:** refactoring-auth
**Entries:** 24
---
### 👤 You
Refactor the auth middleware to use JWT instead of sessions
### 🤖 Assistant
I'll refactor the auth middleware. Let me start by reading the current implementation.
### 🔧 Tool: `read`
```json
{
"path": "src/middleware/auth.ts"
}
export function authMiddleware(req, res, next) {
...
}
Features
- Clean Markdown with roles (👤 You, 🤖 Assistant, 🔧 Tool, 📋 Result)
- Tool calls shown as code blocks with JSON args
- Tool results collapsed in
<details>for readability - Thinking sections collapsed when present
- Plaintext export — one-line summary per entry
- JSON export — structured data for automation
- Image indicators — shows 🖼️ when user messages have attachments
Install
# npm
pi install npm:pi-session-exporter
# GitHub
pi install git:github.com/Jaraxxxx/pi-session-exporter
Usage
| Method | Action |
|---|---|
/export |
Export as Markdown |
/export json |
Export as JSON |
/export plaintext |
Export as plaintext |
Ctrl+E |
Quick export as Markdown |
The LLM can also call the export_session tool.
Files are saved to .pi-exports/ in your working directory.
Output location
your-project/
└── .pi-exports/
└── pi-session-20260522-143000.md
Requirements
- Pi coding agent