opencode-timeline-exporter
v0.1.1
Published
OpenCode plugin — export session timeline with timestamps, toggle recording per session
Maintainers
Readme
opencode-timeline-exporter
OpenCode plugin — records session events with timestamps and exports them as Markdown timelines.
Installation
npm install opencode-timeline-exporterSetup
Add to opencode.json:
{ "plugin": ["opencode-timeline-exporter"] }Optional — start with recording disabled:
{ "plugin": [["opencode-timeline-exporter", { "enabled": false }]] }The plugin auto-installs slash commands on first startup. No manual file copying needed.
Commands
| Command | Description |
|---|---|
| /export-timeline | Export timeline. max=N limits lines per block, -1 = unlimited |
| /export-timeline max=100 | Export with max 100 lines per content block |
| /timeline-switch off | Stop recording this session |
| /timeline-switch on | Start/resume recording |
| /timeline-switch status | Check current recording state |
Output Format
# OpenCode Session Timeline
**Session:** ses_abc123
**Date:** 2026-06-04
---
## 23:30:00 - Session Started
## 23:30:05 - User Message
帮我写一个函数
## 23:30:08 - Assistant
以下是实现...
## 23:30:10 - Tool Call: bash
**Args:**
{"command":"cargo build"}
## 23:30:15 - Tool Result: bash
Compiling... FinishedHow It Works
- Events (
message.part.updated,tool.execute.after) → cached in.opencode/timeline-cache/{timestamp}_{sessionID}.json - Recording state per session →
.opencode/timeline-cache/status/{sessionID}.json /export-timeline→ reads cache, formats Markdown, trims export period events- Plugin's own commands are never recorded in the timeline
License
MIT
