Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By jedwards1230v0.3.1MITIn 1 marketplace
Archive Claude Code session transcripts to local and remote targets (S3, rsync/NAS, or any command) on session end. Per-machine configurable, nothing hardcoded.
Run automatically on Claude Code events. Claude doesn't decide.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Archive Claude Code session transcripts — the ~/.claude/projects/<slug>/*.jsonl
files plus their tool-results/ and subagents/ sidecars — to a local mirror
and (optionally) remote targets, on every session boundary. Beats the ~30-day
cleanupPeriodDays auto-delete and gives you a durable, complete record (full
text, tool I/O, images, subagents).
Nothing is hardcoded. All machine-specific config lives in a per-host file you create; the plugin ships generic and safe for the public marketplace.
The JSONL transcript is the most complete record that exists: user + assistant text, every tool call with full input, full tool output, inline base64 images, and subagent sidechains. (Extended-thinking content is stored only as an encrypted signature by Claude Code — that is not recoverable from any archive.)
/plugin install session-archiver@jedwards1230-plugins
Then create a config (see below). Until enabled: true, the plugin does nothing.
Dependencies: jq and rsync (required). aws CLI for S3 targets. Remote
upload tools (rclone, etc.) only if you use a command target. No dependency
on flock / timeout / rclone — works on stock macOS.
Copy config.example.json to one of (first found wins):
$SESSION_ARCHIVER_CONFIG (explicit path)${CLAUDE_CONFIG_DIR:-~/.claude}/session-archiver/config.json ← recommended<data-dir>/config.json (see Data directory below)This file is per-machine and should not be committed. Minimal config:
{ "enabled": true, "local_mirror": "~/claude-archives", "sync_mode": "local-only" }
Spool markers, sync state, locks, and the log live in a data directory that both the in-Claude-Code hook and the standalone drainer must resolve identically — otherwise the drainer can't find what the hook spooled. It is, in order of precedence:
$SESSION_ARCHIVER_DATA (explicit override — set it in both the hook env
and the drain timer/agent if you use it)${CLAUDE_CONFIG_DIR:-~/.claude}/session-archiver ← canonical defaultUpgrading from ≤ 0.2.1: older versions anchored this dir to the plugin's
CLAUDE_PLUGIN_DATAlocation, which only the hook could see — so inspoolmode the standalone drainer looked elsewhere and never drained. As of 0.2.2 the hook automatically migrates any leftover spool markers / state / log from that legacy location into the canonical dir on its next run. No manual step is needed; if you'd rather move it yourself, copy thespool/,state/, andarchive.logfrom~/.claude/plugins/.../data/session-archiver*/into~/.claude/session-archiver/.
| Mode | Behavior |
|---|---|
local-only (default) | Mirror locally only. Most private. |
inline | Mirror, then push to remotes in a detached background process. No timer to install; the local mirror is the safety net if an upload drops. |
spool | Mirror + drop a marker; a timer runs drain.sh to push with retries. Most robust for flaky networks / offline NAS. Install a timer (see templates/). |
blocking | Mirror, then push synchronously in the hook (every event). For ephemeral CI runners where a detached/spooled upload would be killed at job end. |
For the most robust setup, drive replication from an OS timer instead of the event hooks — see Periodic sync mode (recommended). It pairs any non-
blockingsync_modewith"hook_events": ["PreCompact"].
spool mode needs a timer to run drain.sh periodically. Templates are in
templates/: launchd-drain.plist (macOS) and
session-archiver-drain.{service,timer} (systemd user units on Linux). Edit the
path to your installed drain.sh, then load the agent/timer.
macOS gotcha: launchd starts agents with a minimal
PATH(/usr/bin:/bin:/usr/sbin:/sbin) that excludes Homebrew, sodrain.shcan't findjqand aborts (exit 0, nothing drained). The shipped plist sets anEnvironmentVariablesPATHthat prepends/opt/homebrew/bin(Apple Silicon) and/usr/local/bin(Intel) — adjust it if yourjqlives elsewhere.
Set sync_mode to inline, spool, or blocking, then enable targets. Placeholders
{host} {project} {session} are substituted ({src} {dest_key} also for
command). Secrets are never in this file — reference an AWS profile, an
ssh key path, or an external command.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub jedwards1230/claude-plugins --plugin session-archiverPlugins from other owners that cover similar ground