Install
One command:
curl -fsSL https://dxcli.com/install.sh | bash
Or download a tarball for your platform and install manually:
tar xzf dx-0.5.7-linux-amd64.tar.gz
bash dx-0.5.7/install.sh
Available: linux-amd64 · darwin-arm64 · darwin-amd64 · windows-amd64
Then enable in any git repo:
cd my-project
dx enable
That's it. Make a commit and a session appears.
Commands
dx enable # Install post-commit hook in current repo
dx disable # Remove hook from current repo
dx init # Create a .dx config file with defaults
dx snap [uuid] # Save current Claude session (aliases: slap, yoink)
dx resume [id] # Resume a saved session (by number or uuid)
dx ui # Open session viewer in browser
dx log # Show recent sessions in terminal
dx log -a # Show all sessions
dx log -r # Filter to current repo
dx log -n 50 # Show last 50 sessions
dx sync push [dst] # Push session data to local path or remote
dx sync pull [src] # Pull and merge sessions from another location
Snap & Resume
Save your current interactive Claude session at any point:
dx snap
# => Snapped! Session d29c9dca-4f49-459a-9a01-7241213d3db0 (27 messages)
# repo: my-project
# branch: main
# commit: b56e1a6
# resume: claude --resume d29c9dca-4f49-459a-9a01-7241213d3db0
Resume from any checkout of the same repo — even across different clones or from WSL when the session was created on Windows:
dx resume
# => Recent sessions for my-project:
# * [1] 5m ago b56e1a6 claude main d29c9dca...
# [2] 1h ago 463be4a claude feature-x 463be4ab...
#
# => Use: dx resume <number> or dx resume <uuid>
dx resume 1
# => Resuming session d29c9dca-4f49-459a-9a01-7241213d3db0...
Running dx resume with no arguments opens an interactive picker with search, arrow-key navigation, and keyboard shortcuts:
- Ctrl+A — toggle between current repo and all projects
- Ctrl+B — toggle branch badge and folder paths
- Ctrl+R — rename the selected session (persisted across invocations)
- Type to search by branch, commit, agent, folder, or custom name
- Tab toggles between search and list focus
If the session was created on a commit ahead of your current checkout, dx warns you before resuming.
Aliases: dx slap and dx yoink do the same as dx snap. Aliases: dx hop and dx zap do the same as dx resume.
Session Viewer
dx ui
Opens a local web viewer showing all your sessions — both auto-created (from commits) and manually snapped. Click any session with a chat icon to see the full Claude conversation with messages, thinking blocks, and tool calls. Filter by repo, agent, or type.
Supported Agents
| Agent | Binary | Session resume | Status |
|---|---|---|---|
| Claude Code | claude |
claude --resume (deterministic UUID, interactive picker) |
✅ Tested |
| Gemini CLI | gemini |
gemini --resume (search by commit slug) |
🚧 Untested |
| Cursor Agent | agent |
agent resume or agent --resume="<id>" |
🚧 Untested |
| OpenCode | opencode |
opencode run -s "<slug>" |
🚧 Untested |
| OpenAI Codex | codex |
codex resume [ID] |
🚧 Untested |
| GitHub Copilot CLI | gh copilot / copilot |
gh copilot --resume |
🚧 Untested |
By default, only claude is enabled. Other agents have hook scripts but are not yet tested. Configure via .dx file or DX_AGENTS env var. Missing binaries are silently skipped.
Configuration
.dx file
Run dx init to create one, or add it manually to your repo root:
# .dx
agents=claude gemini
# claude_args=--model opus
# gemini_args=
# cursor_args=--cloud
# opencode_args=
# codex_args=
# copilot_args=
Environment variable override
DX_AGENTS overrides the .dx file:
DX_AGENTS="gemini" git commit -m "test"
Per-agent args via env: DX_CLAUDE_ARGS, DX_GEMINI_ARGS, etc.
Priority: DX_AGENTS env var > .dx file > default (claude).
Sync
Push your session data to another machine or pull it back:
dx sync push /mnt/backup # copy to a local path
dx sync pull /mnt/backup # merge sessions from that path
dx sync push user@host:~/dx-data # push to a remote via rsync
dx sync pull user@host:~/dx-data # pull from a remote
Set a default target so you don't have to type it every time:
# in .dx file
sync=/mnt/backup
# or via environment variable
export DX_SYNC=user@host:~/dx-data
Push copies your sessions.tsv and conversation blobs. Pull merges remote sessions into your local data without overwriting existing entries.
How It Works
A git post-commit hook runs after every commit. It:
- Extracts the commit message and hash
- Generates a slug:
fix-login-redirect-bug-a1b2c3d - Launches each configured agent in the background with the slug as prompt
- Logs the session to
~/.dx/data/sessions.tsv
dx snap finds the most recently modified Claude session file in ~/.claude/projects/ and records it. dx ui reads the session data and Claude's JSONL conversation files, builds a self-contained HTML viewer, and opens it in your browser.
The hook never blocks git. It skips during rebase, merge, and other non-interactive operations.
Requirements
gitandbash(always required)node(required fordx uionly)
Platform Support
| Platform | Status |
|---|---|
| macOS | Supported |
| Linux | Supported |
| Windows (Git Bash / MSYS2) | Supported |
| WSL | Supported |
Uninstall
Remove from a repo:
dx disable
Remove globally:
rm -rf ~/.dx ~/.local/bin/dx
If you added the PATH export to ~/.bashrc, remove that line too.