Install

One command:

curl -fsSL https://dxcli.com/install.sh | bash

The installer checks the download against SHA256SUMS from the same site before it unpacks anything, and stops if they differ. That catches a corrupt or truncated download. SHA256SUMS is signed too: the first install keeps the signing keys that came with it, and from then on dx update and the installer refuse a release that none of those keys signed, so taking over dxcli.com isn't enough to change what runs on your machine. The very first install can't check the keys it brings, so it trusts the site once; verify a release yourself to close that gap. DX_SKIP_VERIFY=1 skips the checks, for a mirror that doesn't carry the signed list.

Or download a tarball for your platform and install manually:

tar xzf dx-0.15.1-linux-amd64.tar.gz
bash dx-0.15.1/install.sh

Available: linux-amd64 · linux-arm64 · 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.

Verify a release

Every release has a checksum list, SHA256SUMS, and its signature, SHA256SUMS.sig, at the root of this site. The list holds the checksum of install.sh and of each tarball. The signature is an OpenSSH one, in the dx-release namespace, from one of two keys:

KeyFingerprint
Signing keySHA256:IX40JatXel3e+fATn+0ThRK74SWoBJlivGYQgVBVenw
Backup key, kept offlineSHA256:W7T7y6D4xVnmY3bAQgOi1JcE8ieUvwBUDVSfXcMffHk

The same fingerprints are published on a second site, axiomdxlab.com/security. If the two ever disagree, don't install.

To check one by hand you need OpenSSH 8.0 or newer. Save the public keys as release-keys:

dx-release namespaces="dx-release" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxHo6ht+0Zge/5AADXIRRWIb6OBmv9+qQhoqPz2sCdo
dx-release namespaces="dx-release" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGezj7d/ZjoeurMIcsYR6bWXd1fyDyucwDpMbbeUZjGQ

Then:

curl -fsSLO https://dxcli.com/SHA256SUMS
curl -fsSLO https://dxcli.com/SHA256SUMS.sig
ssh-keygen -Y verify -f release-keys -I dx-release -n dx-release -s SHA256SUMS.sig < SHA256SUMS
# Good "dx-release" signature for dx-release with ED25519 key SHA256:...

grep dx-0.15.1-linux-amd64.tar.gz SHA256SUMS     # the checksum it should have
sha256sum dx-0.15.1-linux-amd64.tar.gz           # shasum -a 256 on macOS

ssh-keygen prints Good "dx-release" signature only for a key on that list. A change of keys is only ever published in a release that a key already on the list signed.

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 config [s] [v]     # dx's settings on this device (no setting: all)
dx snap [-y] [id|name] # Save a Claude session; by name or id from any folder (aliases: slap, yoink)
dx resume [-a] [id]   # Resume a saved session (-a = include other repos)
dx fork   [-a] [id]   # Clone a session: a new one that remembers everything so far, then goes its own way (alias: branch; --open starts it in a new tab)
dx open <id>          # Open a session in a new terminal tab and return
dx resume <id> --worktree  # At its commit, in its own worktree (open and fork take it too)
dx resume <id> --copy-in   # From another Claude home into this one, for good (open and fork take it too)
dx drop [id]          # Remove a snapped session from dx
dx name <id> [name]   # Name a session; the name sticks (--clear removes it; alias: rename)
dx ui                 # Open session viewer in browser (--no-open: build the page only)
dx log                # Your snapped and named sessions (default)
dx log -t auto        # Per-commit auto sessions
dx log -t all         # Both
dx log -a             # Show all sessions
dx log -r             # Filter to current repo
dx log -g             # Grouped by project; --group <g> shows one, --groups lists them
dx log -n 50          # Show last 50 sessions
dx tidy --older-than 90d   # Prune old auto sessions (snaps never touched)
dx sync setup         # One-step cross-device setup (auto-detects gh CLI)
dx sync push [dst]    # Push sessions to a private GitHub repo, local path, or rsync remote
dx sync pull [src]    # Pull and merge sessions from the same
dx connect            # Your devices: who is online, what is open where
dx connect pair       # Pair another device (prints a string to paste there)
dx send <s> [device]  # Queue a session for your devices, or one of them
dx share <s> [who]    # Hand a session to a friend (or --file for a bundle)
dx receive <str|file> # Take a session a friend shared; dx resume continues it as your fork
dx wake [-y] [n]      # Reopen sessions closed by a reboot or a closed tab (alias: restore)
dx wake --from <dev>  # Reopen here what is open on another device
dx color <id> [c]     # Pin a tab color to a session — dx wake reopens it colored
dx color -g <grp> [c] # Color every session in a group at once (--clear removes)
dx group <id> [g]     # Put a session in a project group (aliases: project, tenant, herd, bucket)
dx update [version]   # Update dx (e.g. `dx update 0.7.2` to pin, --force to reinstall)
dx doctor             # Check dx on this device, and say what to fix
dx feedback <note>    # A note to the maintainer — one command, no account (also: dx bug, dx idea)
dx help [<command>]   # The commands, or one command's usage (also: dx <command> --help)

Snap & Resume

Save your current interactive Claude session at any point:

dx snap
# => Snapped! Session d29c9dca (27 messages)
#      repo:   my-project
#      branch: main
#      commit: b56e1a6
#      resume: claude --resume d29c9dca-4f49-459a-9a01-7241213d3db0

To snap a session other than the latest one, name it: dx snap d29c9dca takes a uuid or any fragment of one, and dx snap es-issue takes the name you gave the session with /rename — the same name Claude prints in claude --resume "es-issue" when the session exits. Name matching is case-insensitive; an exact name wins, a partial name is accepted only when it matches a single session. dx never guesses: an id fragment several sessions share (unless a session's exact name settles it), or a partial name several sessions match, is an error that lists them.

You don't have to be in the session's folder. When no session here matches, dx looks through every folder Claude has sessions in, shows where it found one, and snaps it after you confirm (dx snap -y <name> skips the question; without a terminal to ask, dx won't snap it and prints that command). The snap records that folder's repo, branch and commit, as if you had run it there. A name that two different sessions share in different folders is listed for you to pick by uuid; a session dx resume linked into several folders counts once.

In a repository with no commits yet, dx snap works too: it records the branch, with no commit. After the first commit, run dx snap with the session's id or name, and dx records its commit.

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...

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+T — cycle session types: your snaps → all types → autos
  • Ctrl+B — toggle branch badge and folder paths
  • Ctrl+R — rename the selected session (the name sticks, like dx name)
  • Type to search by branch, commit, folder or 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.

Snaps and auto sessions

dx records two kinds of sessions: snaps you save with dx snap, and auto sessions the post-commit hook records for every commit in an enabled repo. Snaps are the ones you manage day to day, so dx log and the resume picker show them by default — autos stay one Ctrl+T (or dx log -t auto) away.

Renaming an auto session in the picker, or coloring it with dx color, claims it: from then on it counts as one of your snaps. Searching in the picker never dead-ends — if nothing matches in the current view, the search quietly widens to all types.

Old auto sessions pile up over time. Prune them without touching a single snap (or any Claude transcript):

dx tidy --older-than 90d --dry-run   # preview
dx tidy --older-than 90d             # prompt, then prune
dx tidy --older-than 90d -y          # no prompt

Resume across repos

By default, dx resume and dx fork only surface sessions that belong to the current repo. Pass -a/--all to include sessions from every repo — handy when you want to continue a Claude conversation started in repo A while working inside repo B:

dx resume -a       # picker opens pre-toggled to all-projects
dx resume -a 3     # 3rd most recent across all sessions
dx fork -a         # same flag works for fork

Inside the picker, Ctrl+A still toggles between current-repo and all-projects views. dx warns when the session's commit isn't in the current checkout's history.

A session you never snapped works too. When no snap matches the name or uuid, dx resume and dx fork look through Claude's sessions the way dx snap <name> does — this folder first, then every folder — and ask before snapping the one they find:

$ dx fork dx-soc2
Not snapped yet: dx-soc2 — Claude has it in this folder:
  session: dx-soc2 · 3d8325ab · 1478 messages · last active 2h ago
Snap it and fork it? [Y/n]

Enter snaps it and goes on; -y skips the question. With no terminal to ask, dx doesn't snap it and prints the dx fork -y … command instead.

Aliases: dx slap and dx yoink do the same as dx snap. Aliases: dx hop and dx zap do the same as dx resume.

At its commit, in its own worktree

A session worked in the code of its commit. --worktree brings it back there: dx opens it at that commit, in a folder and on a branch of its own, and your repo's folder stays as you left it.

dx resume notes --worktree
# => Resuming notes at commit a1b2c3d in a new worktree of ~/work/app: ~/.dx/worktrees/1a2b3c4d/app (branch dx/notes)

dx open notes --worktree              # the same, in a new terminal tab
dx fork notes --worktree --open       # a clone at that commit, in a worktree of its own
  • Where it lives: ~/.dx/worktrees/<the session's first 8 id characters>/<repo>, made from a folder on this device that holds the session's repo. Its branch is dx/<name>, or dx/<name>-<id> when that one is taken. The next --worktree reuses it.
  • A clone gets its own. dx fork --worktree, and a session that opens as a clone because it is open on another device (see One place at a time), get a worktree of their own, on dx/<name>-<clone id>. The clone's edits never touch the original's files.
  • The commit: dx looks for it in every folder here with the session's remote, then fetches that remote once. git never asks for a login from dx: a fetch that needs one fails and dx says how to run it. A commit that was rebased away or never pushed can't be found, and dx says how to resume it as it is.
  • dx open and dx fork --open take --dry-run: it shows the git worktree add dx would run, and makes nothing. --worktree and --cwd both choose the folder, so they don't go together.

A new worktree is a folder Claude Code hasn't seen:

  • Claude Code asks whether you trust the folder the first time it runs there.
  • The tools you allowed don't come along. They're in your main checkout's .claude/settings.local.json, which git ignores, so a worktree doesn't have it and Claude asks for permission again. To bring it, list it in a .worktreeinclude file at your repo's top, the file Claude Code reads for its own worktrees. dx copies the files it lists that git ignores into each new worktree, and says how many.
  • Moving the repo breaks the link between it and its worktrees. Relink them from its new place: git -C <new place> worktree repair ~/.dx/worktrees/1a2b3c4d/app. If dx finds a worktree whose link is broken, it stops and gives you that line.
  • On Windows, a file path of 260 characters or more, or a folder path of 248 or more, needs git's long paths: git config --global core.longpaths true. dx says so, and never sets it.
# .worktreeinclude
.claude/settings.local.json

Removing it: dx drop

dx drop <id> drops the session and offers to remove its worktree and dx/ branch too, when nothing there would be lost:

  • it's clean: everything in it is committed, and untracked files count;
  • it's closed: no Claude runs in it;
  • everything is pushed: dx fetches each remote first, and the commit the worktree started at is on a remote or in another branch;
  • its ignored files (node_modules/, *.log) go only when you say so. dx lists them by the .gitignore pattern that ignores them.
$ dx drop notes
notes has a worktree: ~/.dx/worktrees/1a2b3c4d/app (branch dx/notes)
  Everything in it is committed and pushed. Its ignored files would go too:
      *.log           build.log, debug.log, +2
      node_modules/
  a = yes, and from now on remove worktrees like this without asking, as
  long as their ignored files match only these patterns (saved for app)
Remove the worktree too? [y/N/a] y
=> Dropped session 1a2b3c4d
=> Removed its worktree ~/.dx/worktrees/1a2b3c4d/app and branch dx/notes (its 2 commits are on origin).
  • y removes it, and n or Enter keeps it. a removes it and saves your answer: dx config drop-worktree always, with those patterns on your disposable list for that repo. From then on dx removes a worktree like it without asking, as long as its ignored files match only patterns on the list.
  • -y answers yes for you: it removes the worktree, ignored files and all, when dx can, even under never. It saves nothing.
  • A git repository inside it (a folder with a .git of its own, in an ignored folder) goes only with a yes to its own question. It never goes with -y, a saved answer, or no one to ask.
  • With no one to ask, and no saved always, dx keeps the worktree.
  • The settings: dx config drop-worktree is ask (the default), always or never. dx config disposable --add 'node_modules/' '*.log' puts patterns on the list for this repo; add --every-repo for every repo.

When dx keeps a worktree, it says why, and gives the command that removes it once you're ready (dx prints the full paths):

$ dx drop notes
=> Dropped session 1a2b3c4d
dx: kept its worktree ~/.dx/worktrees/1a2b3c4d/app: 1 commit there isn't pushed — push it, then: git -C ~/work/app worktree remove ~/.dx/worktrees/1a2b3c4d/app

That printed command is the easy way: run it as printed. It keeps git's own check working (git refuses a worktree with changes that aren't committed), and on Windows it removes the links inside the worktree first. dx forgets a worktree whose folder is gone.

To remove one by hand, run these in your repo:

# Windows only, from Git Bash: the links first
find ~/.dx/worktrees/1a2b3c4d/app -name .git -prune -o -type l -print0 | xargs -0 rm -f

git -c status.showUntrackedFiles=normal worktree remove ~/.dx/worktrees/1a2b3c4d/app
git branch -d dx/notes
  • On Windows the links go first, because git there deletes the files a link points to (one that npm link made, say) rather than the link.
  • -c status.showUntrackedFiles=normal keeps git's check whole: in a repo set to hide untracked files, git's remove deletes them without refusing.
  • git can't see edits to files marked assume-unchanged or skip-worktree (git ls-files -v shows them with a lowercase letter, or S). Compare each one with its committed version first, as dx's printed command does: [ "$(git -C <worktree> hash-object -- <file>)" = "$(git -C <worktree> rev-parse -q --verify HEAD:<file>)" ].
  • git branch -d refuses while the branch holds commits that aren't merged.
  • Never git worktree prune: it forgets every worktree of the repo whose folder is missing, not only this one.

Group sessions by project

Twenty sessions, six projects. Every session belongs to a group: by default the repo it was snapped in (the same name dx log shows under REPO), so grouping works with no setup. A label moves a session somewhere else — two repos into one project, or one repo split into several:

dx log -g                        # your snaps, grouped, newest group first
dx group viewer-fixes client-x   # move a session into the "client-x" group
dx group viewer-fixes            # show its group
dx group viewer-fixes --clear    # back to its repo's group
dx log --group client-x          # one group (case-insensitive)
dx log --groups                  # one line per group: sessions, last activity
dx group                         # the same list, plus usage

Groups sync across your devices like names and colors, travel with dx send, dx share and .dxsession bundles, and the resume picker shows a #group badge on labelled sessions and searches by group. Grouping an auto session claims it, like naming or coloring it. -g combines with -t, -r and -n.

Aliases: dx project, dx tenant, dx herd and dx bucket do the same as dx group, and so do the plurals (dx groups, dx projects, dx tenants — bare, they list the groups). In dx log, --project and --tenant stand in for --group, --projects and --tenants for --groups, and --by-project and --by-tenant for -g; dx color takes --project and --tenant for --group.

Wake after a reboot

Windows Update restarts your machine. Ten Claude sessions die with it. dx wake brings them all back — each in its own tab, in its own folder, resumed where you left off.

dx wake
# => Sessions you can reopen:
# =>    1. api-auth-refactor    ~/work/api        before reboot (2h)
# =>    2. viewer-ui-v3         ~/work/viewer     before reboot (2h)
# =>    3. changelog-pass       ~/work/dx         closed 14m ago
# => Reopen all 3 in new tabs? [Y/n]

Press Enter and three tabs open. It also catches the everyday case: a tab you closed by accident five minutes ago is right there in the list.

How dx knows

Claude Code registers each running session under ~/.claude/sessions/, or $CLAUDE_CONFIG_DIR/sessions/ when that's set, but clears the entry when the session exits — so after a clean reboot there is nothing left to read. dx therefore keeps its own ledger: whenever it runs, it records which sessions are currently open. That happens on every commit (through the dx hook), on dx snap, dx resume, dx fork, and on every tick of the sync daemon.

The more dx runs, the fresher the list. Running dx sync enable keeps it under ~30 seconds old. You can also refresh it by hand:

dx wake --scan     # refresh the ledger, reopen nothing

Flags

dx wake              # list, then ask
dx wake -y           # reopen everything, no questions
dx wake 2            # reopen just number 2
dx wake --list       # show what would reopen, do nothing
dx wake --dry-run    # print the exact commands instead of spawning
dx wake --since 12h  # only sessions seen in the last 12h (default 72h)
dx wake --terminal print   # force an adapter (see below)
dx wake web          # only the sessions of group web: a repo, or a dx group
dx wake --group web  # the same, when a session is named web too
dx wake web 2        # just number 2 of that group's list

One group

dx wake <group> takes, of what dx wake would reopen anyway, only that group's sessions: a repo's, or the ones dx group put together. It never adds one, so a session of the group that is open now, or closed before --since, stays as it is. A session named like the group wins; --group reads the name as a group. After the group, a number or the start of an id is a row of the group's own list. A name like an id (four or more hex digits and dashes, nothing else) is a group only after --group.

$ dx wake web --list
Sessions of group web you can reopen:
   1. fix login                    ~/code/web                             closed 12m ago
   2. new header                   ~/code/web                             closed 1h ago
  (only sessions dx has seen open are listed — to keep the list fresh: dx wake --scan)

When none of it closed lately, dx says how many closed before that, and the --since that reaches them all:

$ dx wake --group web
No session of group web closed in the last 3d; 2 closed before that.
To reopen them: dx wake --group web --since 5d

Terminals

dx opens tabs with whatever you are already using. It picks the first that applies, and you can override it with --terminal or the DX_TERMINAL environment variable.

AdapterUsed whenWhat happens
tmuxYou are inside tmuxOne new window per session
vscodeVS Code's integrated terminalPrints commands — VS Code cannot be scripted to open terminal tabs
wtwt.exe is available (Windows)All tabs open together in one Windows Terminal window
itermiTerm2 on macOSOne new tab per session
terminalTerminal.app on macOSOne new window per session
printAnything elsePrints ready-to-paste commands

Reopen here what's open on another device

dx wake --from <device> reopens here what is open on one of your other devices, each as a clone: you've moved from the laptop to the desk, and want its sessions here too. Name the device as dx connect shows it, or by 4 or more characters of its id.

$ dx wake --from laptop
Open on laptop now:
   1. notes                        ~/work/app                               opens as a clone
   2. api                          ~/work/app                               [the copy here is 117 KB behind the one on laptop]
Skipped web: no copy of it here yet — on laptop, send it to this device (desk) by device id: dx send 3c4d5e6f-0000-4000-8000-000000000003 eeeeeeee
Already open on this device: docs
Open all 2 here as clones? [Y/n]  (or numbers like 1 3, ranges like 1-4, q to cancel) y
Skipped api: the copy here is behind the one on laptop (117 KB still to come)
  opening: notes — ~/work/app
=> Opened clone dc3d440e here: notes is open on laptop (heard from 2m ago). To continue notes itself, close it on laptop first.
=> Opened 1 session from laptop here as a clone, skipped 2.
  • dx asks laptop first. It sends laptop a catch-up and receives what laptop sends, for up to 10 seconds ("Asking laptop what is open there…"), so the copies here are as fresh as laptop can make them. A device dx hasn't heard from lately isn't asked when a message to it is already waiting, and without rsntr dx goes by what it has.
  • Each one opens as a clone, and laptop's sessions carry on there untouched. --take-over continues each session itself instead (see One place at a time). dx config open-elsewhere doesn't apply here: --from always clones unless you take over.
  • What it skips: a session already open on this device; one with no copy here yet, with the dx send to run on laptop (it names this device by its id, since laptop may know it by an older name); one whose repo isn't on this device; and one whose copy here is behind what laptop reported, while laptop's newer lines are on their way.
  • The folder: each session opens at its repo's top here. dx tries the session's own path first, for when both devices lay out their repos the same way, then the folders where you've used that repo, by its remote. --worktree starts from the folder you're in instead, since it opens one session where you are.
  • A commit that isn't in the folder's history here (laptop's unpushed work, say) is named before the question, with the way to open it at that commit instead: dx open <id> --worktree.
  • --list shows what would reopen, and opens nothing. --dry-run prints the commands instead of opening tabs, and still receives what laptop sends. Name one session to reopen only it: dx wake --from laptop notes.
  • The last line says what happened: "Opened 2 sessions from laptop here as clones, skipped 1.", or with --take-over, "Took over 2 sessions from laptop here, skipped 1." When dx has heard nothing from laptop about what's open there, it says so: "dx has not heard from laptop what is open there".

Session colors

Pin a color to a session and dx wake reopens it colored — Windows Terminal tabs via --tabColor, iTerm2 via its tab-color escape sequence (Terminal.app has no tab colors):

dx color viewer-fixes tan       # palette name, or #rrggbb
dx color viewer-fixes --clear   # remove
dx color                        # palette + everything colored

dx color --group html5-viewer blue   # every session in a group, in one go
dx color --group html5-viewer        # the members and their colors
dx color --group html5-viewer --clear

A group color is applied to each member — the sessions dx log -g shows for that group — so every one of them wakes, replicates and shares like a session colored by hand. A session added to the group later isn't recolored until you run it again. Plain dx color html5-viewer blue works too when no session has that name (a session always wins a name clash; --group forces the group).

Colors are stored by dx and sync across devices like session names. Colors set through the terminal's own UI can't be captured — set them through dx instead.

A session whose folder has been deleted is listed as [folder missing] and skipped rather than opened somewhere random. If claude turns out not to be on the PATH inside a new tab, the tab says so and stays open so you can read the message instead of watching it vanish.

What it does not do

dx wake restores sessions, not window layout. Your conversations come back; pane geometry, split positions, and scrollback do not. The ledger lives in ~/.dx/run/ and is never synced — project paths and session names stay on the machine that recorded them.

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 or type. A session shows by its name (the one dx log and the picker show) with its branch beside it, and the search box finds it by name.

Send feedback

Something broke, something is missing, something is great — say so in one command:

$ dx feedback the picker is slow with 500 sessions
=> Sending with dx 0.10.1, Linux x86_64, bash 5.2.21, vscode, Claude Code 2.1.287…
✓ Sent — thanks! (ref #42)

Nothing to log in to, nothing to install. dx bug … and dx idea … send the same note and say which it is; bare dx feedback asks for one line; dx feedback < notes.md sends a longer note. Add your email to the note if you would like a reply.

The line printed before sending is exactly what goes along: the dx version, OS, bash and Claude Code versions, the terminal. Never paths, host or user names, or anything from a session. --bare sends the note alone; --dry-run shows the whole thing and sends nothing.

The note lands as an issue in the dx repo through a small relay. When the relay cannot be reached, dx keeps the note in ~/.dx/feedback/outbox/ and retries in the background — the next dx says when it went through, and dx feedback --retry tries on demand.

What happens to a note, who handles it and how long it is kept: see the privacy policy.

Supported Tools

Tool Binary Session resume Status
Claude Code claude claude --resume (deterministic UUID, interactive picker) ✅ Tested

dx is built and tested for Claude Code.

Configuration

.dx file

Run dx init to create one, or add it manually to your repo root:

# .dx
# agents=claude

Each device runs the agents its DX_AGENTS names (claude when it's unset). An agents= line narrows them to the ones it names; claude is the one dx supports. A name holds only letters, digits, - and _.

dx works with Claude Code; hook scripts for other tools exist but are untested and unsupported.

dx config: settings on this device

dx config lists dx's settings on this device, each with its value and choices. dx config <setting> <value> sets one, and dx config <setting> --clear puts it back to its default. They're kept in ~/.dx/config, on this device only.

$ dx config open-elsewhere ask
=> open-elsewhere is now ask (it was clone).

open-elsewhere is what dx resume, dx open and dx wake do with a session that is open on another device: clone opens a clone here (the default), ask asks first, and refuse stops and says how to clone it or take it over (see One place at a time).

drop-worktree is what dx drop does with the session's worktree when nothing there would be lost: ask (the default), always, which removes it without asking as long as its ignored files match only patterns on your disposable list, or never. disposable is that list: the .gitignore patterns whose files dx may delete with a worktree, for this repo, or for every repo with --every-repo. Patterns are kept as you write them; quote them so the shell leaves them alone (see Removing it: dx drop):

dx config disposable --add 'node_modules/' '*.log'   # this repo's list
dx config disposable --add '.venv/' --every-repo     # every repo's
dx config disposable --remove '*.log'
dx config disposable                                 # show them

Environment variable override

DX_AGENTS names the agents this device runs (claude when it's unset); a repo's .dx agents= can only choose among them. DX_CLAUDE_ARGS passes extra arguments to claude; an agent's extra arguments come only from the environment:

DX_CLAUDE_ARGS="--model opus" git commit -m "test"

Quiet update check: dx and dx version print a one-line "dx X.Y.Z is available" nudge when a newer release is published — at most once every 7 days, silent on every failure (no curl, offline, etc.). Set DX_NO_UPDATE_CHECK=1 in your shell to disable.

Which agents run: those in DX_AGENTS (claude when it's unset), narrowed to the ones a repo's .dx agents= names, when it has that line.

Claude's home: CLAUDE_CONFIG_DIR

Claude Code keeps its transcripts and its list of running sessions in ~/.claude, or in the folder CLAUDE_CONFIG_DIR names. dx follows the same rule, so dx and claude run with the same variable work in the same place:

export CLAUDE_CONFIG_DIR=~/.claude-work
  • It has to be a full path: /…, or on Windows a drive path such as C:\Users\me\.claude-work. dx ignores a relative or empty value, or one with a control character in it. It looks in ~/.claude, and says so where it starts Claude or finds no transcript. Claude Code still gets the value as it is, so the two can look in different places until you fix it:
    dx: CLAUDE_CONFIG_DIR (claude-work) needs a full path, so dx looked in ~/.claude
  • Tabs and printed commands carry it. A tab dx opens gets the home, and a command dx prints starts with it, as in dx snap's resume: line. These lines are for bash and zsh; they don't run in PowerShell or cmd:
    $ dx open notes --terminal print
      (cd '/home/me/work/app' && CLAUDE_CONFIG_DIR='/home/me/.claude-work' claude --resume 1a2b3c4d-0000-4000-8000-000000000001)
  • A tab can't carry every character. ", $, `, ;, \ or a control character in the path stops any terminal, ' and % stop Windows Terminal too, and ! or a character the locale can't print stops iTerm and Terminal too. dx then prints what to run for the whole run, in place of tabs:
    dx: a new tab cannot take a character in the path to dx or in CLAUDE_CONFIG_DIR, so dx prints what to run instead

More than one Claude home

Two Claude homes usually mean two accounts, so dx doesn't carry a session from one to the other on its own. It records a session's home when you snap the session or the commit hook starts it. dx log and dx sessions still list every session, whatever its home. But when a session is recorded in another home and this one has no copy, dx resume, dx open and dx fork copy nothing and start nothing. -y doesn't change that. dx exits 1 and names the two ways on:

$ dx resume notes
error: notes is in another Claude home (~/.claude-work) — open it there: CLAUDE_CONFIG_DIR=/home/me/.claude-work dx resume 1a2b3c4d-0000-4000-8000-000000000001, or copy it into this home for good: dx resume 1a2b3c4d-0000-4000-8000-000000000001 --copy-in

dx wake skips such a session with the same line and reopens the rest. It has no --copy-in of its own, so its line names dx open.

--copy-in works with resume, open and fork. It copies the session into this run's home, with its side folder, and this becomes the session's home:

$ dx resume notes --copy-in
=> Copied notes into this Claude home from ~/.claude-work/projects/-home-me-work-app/1a2b3c4d-0000-4000-8000-000000000001.jsonl
=> Resuming session 1a2b3c4d...
  • The old copy stays as it was. The two are separate from then on: what Claude writes to one doesn't reach the other.
  • It takes the longest copy in that home, or the newest if its copies have gone separate ways. If dx's own copy of the session goes further, dx takes that one, and the side folder still comes from the home.
  • A copy already in this home stays. dx says so, and this becomes the session's home:
    => Kept the copy of notes already in this home, and copied nothing
  • Not while it's open, under any home dx knows:
    error: notes is already open on this device (pid 4901), so dx copies nothing from it — go to its tab, or close it, then: dx resume 1a2b3c4d-0000-4000-8000-000000000001 --copy-in
  • Not past a folder dx can't read. If dx can't read that home's projects folder, or a folder inside it, it copies nothing, even when it holds a copy of its own, because a longer one may be in there:
    error: dx cannot read some of the folders in ~/.claude-work/projects, so it cannot copy notes from there — make them readable, then: dx resume 1a2b3c4d-0000-4000-8000-000000000001 --copy-in
  • dx doesn't stop a session with no record (it came from another device, or dx last saw it before it kept these records), one whose recorded home is gone, or one with a copy in this home already.

Open means open anywhere on this device. dx checks this run's home, ~/.claude, and every home it has recorded a session in, so it won't start a second Claude on a session open under another home.

A home dx can't read isn't read as closed. It says nothing about the other homes: a session open in a home dx can read is still open, and one recorded elsewhere goes on as usual. But dx can't tell about a session recorded in the home it can't read, so dx resume and dx open stop, with or without --copy-in:

error: dx cannot read ~/.claude-work/sessions, so it cannot tell whether notes is open in that home — make that folder readable, then: dx resume 1a2b3c4d-0000-4000-8000-000000000001
  • dx wake skips such a session with the same line and reopens the rest. dx fork goes on, since a clone is a new session, unless you add --copy-in.
  • Your other devices have no word for "can't tell", so there the session shows as not open.
  • dx drop keeps the session's worktree while any home dx can't read might hold a Claude in it, whichever home the session was recorded in. The line names the folder, and the printed command is the way past it:
    dx: kept its worktree ~/.dx/worktrees/1a2b3c4d/app: dx cannot tell whether a claude runs in it (~/.claude/sessions cannot be read) — close any claude there, then: git -C ~/work/app worktree remove ~/.dx/worktrees/1a2b3c4d/app
  • If dx can't read any home, it has nothing to go on. dx wake reopens nothing. dx wake --list lists nothing and exits 1, since an empty list would read as nothing to reopen. dx wake --scan leaves the ledger as it was:
    error: dx cannot tell which sessions are open here (~/.claude/sessions cannot be read), so it did not reopen anything — make that folder readable, then: dx wake
    Your other devices keep what they last heard. A session with no record can't be told from a closed one, so dx resume and dx open go on for it.

Sync and connect send one home's transcripts: the home of the dx run that sends them. The sync daemon and the connect node keep the home they started with until they restart (dx sync disable, then dx sync enable; dx connect stop, then dx connect), so set the variable first.

  • With it set, that home's sessions go to your other devices, with no new step from you. A session in ~/.claude then goes by name, without its transcript.
  • What's open is wider than what's sent. Your other devices hear of a session open under any home dx has recorded on this device, even when the node started without the variable. A home dx has never recorded isn't read.
  • The record of homes stays on this device.

Connect your devices

Pair your laptop with your desktop once, and every session you snap on one shows up on the other — peer to peer, no repo or account in the middle. The transport is rsntr: a small node per device with its own identity and an encrypted QUIC endpoint. dx downloads it for you and keeps its own data model; the node only carries messages.

Pairing: one paste

# on a device you already use
$ dx connect install          # once: downloads rsntr (~18 MB, sha256-verified) into ~/.dx/bin
$ dx connect pair
This device: mac-mini  (a6060096…)
On the other device, run:

    dx connect join endpointaal7p73…qaaabvlkqg.7KQ2M9XA

Waiting for it (10 min)… ✓ macbook joined
Introduced macbook to 1 other device: office-pc

# on the new device
$ dx connect install
$ dx connect join endpointaal7p73…qaaabvlkqg.7KQ2M9XA
Knocking on mac-mini…  ✓ admitted
Connected to 2 devices: mac-mini, office-pc
Queuing 14 sessions for your 2 other devices. Ctrl-C is safe: dx queues the rest later.
Queued 14 sessions for your 2 other devices. They arrive when each device is online.

The string is the other node's ticket plus a one-time code (good for ten minutes, once). The joining device knocks with its own ticket and the code; the existing device admits it when the code matches. Every device that already knows mac-mini is introduced to macbook and vice versa, so one pairing joins the whole network.

What travels

  • Every snap, name, color and drop replicates to every device.
  • Sessions open on a device are mirrored live to the others as they grow, and show as type live until they are snapped (dx log -t live). dx resume works on any of them; the device where a session is open owns it while it is open, and opening it elsewhere starts a clone (see One place at a time).
  • A session's transcript travels; its side folder (subagent transcripts and tool results Claude keeps next to it) doesn't. A session from another device can mention side files that aren't on this one.
  • Transcripts go from one Claude home at a time. With CLAUDE_CONFIG_DIR set, that's its home, not ~/.claude: see More than one Claude home.
  • Presence: dx connect shows which sessions are open on each device right now.
$ dx connect
dx connect — 3 devices
  * macbook     this device                        14 sessions
    mac-mini    online   3s ago                    27 sessions   2 open: api-auth-refactor, viewer-ui-v3
    office-pc   seen     2d ago                     9 sessions

dx log gains a DEVICE column once a session from another device exists (and --device <name>); the resume picker shows an @device badge and searches by it; dx ui gets a Device filter and shows transcripts that arrived from other devices.

With and without the daemon

With dx sync enable replication is continuous: each push cycle sends what changed, each pull tick receives and reports presence. A git sync target is optional — the daemon runs on paired devices alone. Without the daemon, dx snap, dx drop, dx color and dx send queue their change on the spot, and receiving is instant (the node runs a dx hook when a message lands); live mirroring waits for the next push.

dx send viewer-fixes mac-mini    # queue one session now, for one device
dx send viewer-fixes             # …or for every device (--full queues all of it again)
dx connect name office-pc        # rename this device (default: your hostname)
dx connect forget old-laptop     # unpair a device
dx connect status                # node, endpoint id, ticket, last receive

One place at a time

A session is open in one place at a time: while it's open on a device, that device owns it. Open it on another one, with dx resume, dx open or dx wake, and what opens there is a clone: a new session, under its own id, that remembers everything so far. The original carries on untouched.

$ dx resume notes
=> Opened clone ef567890 here: notes is open on laptop (heard from 2m ago). To continue notes itself, close it on laptop first.
  • Once it's closed there, it's the same session again: dx resume notes continues notes itself.
  • Open means any run of it: in a terminal, in the background (claude --bg or claude -p), in an IDE or in the desktop app. dx wake still reopens only sessions that ran in a terminal.
  • dx goes by what each device last said. A device that hasn't been heard from lately still counts, and dx says when it last heard: "Opened clone ef567890 here: notes was open on laptop when dx last heard from it (3h ago) — the copy here is from 14:02. If its tab there is closed, continue notes itself: dx resume <id> --take-over". A session opened on a device that has said nothing since (no daemon there, and no dx command run) can't be seen.
  • --take-over (on dx resume, dx open and dx wake) continues the session itself anyway, for a laptop that died with it open. dx says what it knows of the copy here: "The copy here has everything laptop last reported.", or what it is missing. When it's known to be missing lines, dx asks first, and -y answers. Anything laptop writes after that goes its own way, so close it there.
  • Open on more than one device, a session is taken over from all of them. dx asks against the one furthest ahead ("the copy here is missing the last 4 KB of what tablet had as of 14:02; if tablet still has notes open, what it writes from now on goes its own way. Take notes over anyway? [y/N]"), and names them all: "Took notes over from tablet (heard from 1m ago) and from laptop. If its tabs on tablet and laptop are still open, close them: anything more they write goes its own way." The first is the device it's taken over from, with when dx last heard from it: the one dx heard from last, or the one named with --from. The others follow in the order you paired them. When one of them reported no size, dx says so: "The copy here has everything laptop last reported; dx cannot tell how it compares with the copy tablet has."
  • To be asked first, or refused instead: dx config open-elsewhere ask, or refuse. The default is clone.
  • Already open on this device: dx says so and points to its tab, or a clone: dx fork <id>.

Before Claude starts, dx brings the copy here up to date from the longest copy on this device that continues it, and says so: "Brought the copy here up to date (118 KB more)."

When copies don't line up

Each device sends the lines a session gains, and the device that held a session sends its last lines after you close it there. Usually the copy here just grows. When it can't, dx doesn't open the session under its own id with lines missing, and it never splices two copies together. It says what it knows, and what you can do:

  • Not here yet: "the copy of notes here is missing the last 300 B of what laptop had as of 14:02, and they have not reached this device yet — wait for them and try again, …". They're on their way.
  • Here, but not added yet: "…, and they are on this device, but dx was busy and could not add them yet — try again in a moment, …".
  • They don't line up: "the copy of notes here does not line up with the lines laptop had as of 14:02, and dx has asked laptop for them — to go on with them, try again once they are here; …".
  • Gone separate ways: "the copy of notes here and the lines laptop had as of 14:02 have gone separate ways — to go on with them, run on laptop: dx resume <id>; …". Each copy has lines the other doesn't, so the lines stay where they are: continue it on laptop, or here without them.

Each ends with the two ways on here: "clone the one here: dx fork <id>, or continue it here without them: dx resume <id> --take-over". After that take-over dx says: "Took notes over without the lines laptop had: they and what you write here go separate ways."

When laptop's lines went their own way and nothing is missing here, the session opens, and dx says where those lines are: "As of 14:02, laptop had lines of notes that went their own way; they stay on laptop — to go on with them, run on laptop: dx fork <id>".

Update all your devices to 0.14. A device still on dx 0.13 keeps working with the others, but it can't say how much of a session it has, or prove where its lines fit. So dx here sometimes can't tell whether a copy is current, and keeps that device's lines out rather than guess. When it matters, dx names the device and its version, and what to run there: "The copy here may not be current, and dx cannot tell: laptop runs dx 0.13.0, which reports no sizes — to fix that, run on laptop: dx update".

Security notes

  • Only a paired device can send anything; an unknown node can do nothing but knock, and a knock is admitted only with the armed one-time code.
  • Traffic is end-to-end encrypted (iroh QUIC). Devices dial each other directly; when NAT blocks that, a public relay forwards the encrypted bytes and sees connection metadata only. connect_lan=1 in ~/.dx/config turns relays off.
  • ~/.dx/node holds this device's private key: never copy it to another machine, never put it in a synced folder. It is not part of dx sync.
  • Everything a device sends is treated as untrusted input; a session file only ever lands in ~/.dx/data/blobs/. Windows (Git Bash) is best-effort in 0.9.0.

Share a session with a friend

Anyone with dx can continue your session on their machine. A friend is a contact, never a device: they get only what you share, and nothing they send but a share is ever applied on your side. Between your own paired devices there is nothing to share — they already replicate every session, and dx send queues one on the spot — so dx receive refuses a string that comes from one of them.

# you
$ dx share viewer-fixes
Share viewer-fixes (1.2 MB, 27 messages, repo dx)?
The full transcript goes — including any file contents and secrets it quotes. [y/N] y
Share string for viewer-fixes — good for 24 hours, once. Your friend runs:

    dx receive endpointaal7p73…qaaabvlkqg.7KQ2M9XA

Waiting for them… sending… ✓ alice received it

# your friend
$ dx receive endpointaal7p73…qaaabvlkqg.7KQ2M9XA
Received viewer-fixes from gurgen (1.2 MB).
To continue it as your own fork: dx resume 2b3c4d5e-0000-4000-8000-000000000002

Their dx resume continues it as their own fork: the received transcript stays as received, their continuation gets a new id, and sharing back never collides. After the first share you are contacts — dx share other-session alice needs no code, and they can share back the same way. dx share list shows your contacts, dx share forget alice revokes.

No direct path between the two machines? dx share viewer-fixes --file writes a .dxsession bundle for email, chat or a USB stick; dx receive viewer-fixes.dxsession imports it. Nothing else is needed on either side.

Sync

Keep your snapped sessions in sync across machines — laptop, Mac mini, workstation. dx uses a private git repo you already own as the transport, so there's no server to run, no account to create, and no ongoing cost. Since it's git, sync is store-and-forward: push while the other device is offline, pull whenever it comes back online.

One-step setup (recommended)

On each device, run:

dx sync setup

If you have the gh CLI installed and logged in, dx auto-creates a private <you>/dx-sessions repo on the first device and offers to reuse it on the others:

# Device 1 (laptop)
$ dx sync setup
=> Detected gh CLI logged in as @alice
? Create private repo github.com/alice/dx-sessions for sync? [Y/n] Y
=> Created github.com/alice/dx-sessions (private)
=> Saved sync target to ~/.dx/config
=> Done.

# Device 2 (Mac mini), same GitHub account
$ dx sync setup
=> Detected gh CLI logged in as @alice
Found existing repo github.com/alice/dx-sessions
? Sync from it? [Y/n] Y
=> Fetching existing sessions...
=> Saved sync target to ~/.dx/config
=> Done.

From then on, on any device:

dx sync push    # upload local sessions
dx sync pull    # download remote sessions and merge

Without gh — any git URL

If you don't have gh, dx sync setup asks for a git URL. Any private git repo you can push to works — GitHub, GitLab, Bitbucket, Codeberg, Gitea, self-hosted. Paste either form:

https://github.com/you/dx-sessions.git
git@github.com:you/dx-sessions.git

Auth uses whatever you already have set up — SSH keys, credential helpers, Keychain, Windows Credential Manager, or a PAT. dx doesn't manage credentials itself.

Cross-device walkthrough

# On the laptop
dx snap                   # save the current Claude session
dx sync push              # upload it

# Later, on the Mac mini
dx sync pull              # fetch and merge
dx resume                 # picker shows the session — hit Enter to resume

Continuous sync (daemon)

dx sync push and dx sync pull are manual. For background sync, run a small daemon that watches your snaps and Claude session files and pushes on change:

dx sync enable      # start the daemon
dx sync status      # show what it's doing
dx sync disable     # stop it

Defaults: push debounced to 10s after the last write, pull every 30s. Override on start:

dx sync enable --push-debounce 5 --pull-interval 15

Aliases: dx watch, dx unwatch, dx watch-status, and dx auto-sync on|off|status all dispatch to the same handlers.

The daemon force-pushes a single squashed commit each cycle, so the sync repo stays at one commit — no history bloat. Conflicts with another device's push trigger an automatic fetch-merge-retry on the next tick. Logs go to ~/.dx/log/sync.log; the daemon is silent on stdout. A push the host refuses is not tried again until something changes on this device: dx sync status shows the refusal on its last error line, the log names the transcript, and a line counts the transcripts left out.

File watching uses inotifywait on Linux, fswatch on macOS, and a 2-second polling fallback on Git-Bash / MSYS and anywhere else missing the native tools. Install the native watcher for instant push:

apt install inotify-tools       # Linux
brew install fswatch            # macOS

dx enable also installs a pre-push hook alongside the existing post-commit hook. Both run dx sync trigger, which tells a running daemon to push+pull immediately instead of waiting for the next debounce window. So your latest commit and session always ride along with your next git push. The trigger is a silent no-op when the daemon isn't running, so the hooks cost nothing if you don't use auto-sync.

The daemon doesn't survive reboot. Add dx sync enable to your shell rc if you want it to auto-start across sessions.

The daemon reads one Claude home, the one it started with, and keeps it until it restarts: see More than one Claude home.

Conflicts and merges

When two devices push independently, dx fetches and re-integrates remote changes before committing, then retries the push. Merges are non-destructive:

  • Session list — unioned by UUID; both devices' sessions are kept. For a session both have, the more recent entry wins, and a tie goes to the sync target's.
  • Names — the one a person chose last wins, whichever device it was chosen on; otherwise, as in a tie, the sync target's wins.
  • Colors and groups — the one set last wins, whichever device set it, and clearing one counts as setting it. One set on a dx before 0.15 carries no time, so it loses to one set on dx 0.15 or later, even one set before it; between two with no time, the sync target's wins.
  • Blobs — UUID-named, never collide; existing local blobs are never overwritten. In a git sync repo each one travels gzipped (blobs/<id>.jsonl.gz); the copy on each device stays plain.
  • Drops — dx drop writes a tombstone that propagates to other devices on the next pull, removing the session there too.

A pulled copy is used the way a copy from a paired device is: before Claude starts, dx brings the copy here up to date from a longer one that continues it. When the two have gone separate ways, dx won't open the session under its own id: "the copy of notes in this folder and a newer one dx holds have gone separate ways — dx will not open it under its own id; clone the one here: dx fork <id>". See When copies don't line up.

Large transcripts

In a git sync repo each transcript travels gzipped, as blobs/<id>.jsonl.gz: the copy on each device stays plain, and everything reads it as before. A pull unpacks a transcript with the time its last change had on the device that pushed it.

A git host can refuse a large file: GitHub refuses one over 100 MB. dx leaves out of the push any transcript whose gzipped copy is over that, and says so: "Left out: the transcript of notes (8dc07239, 115.7 MB gzipped) is over the 100 MB push limit. The session still syncs, without its transcript." sync_max_file=<bytes> in ~/.dx/config sets the limit for a host with another one; 0 means none. A push the host refuses anyway is sent once, not again: dx names the transcript, its size and the host's limit, and the way out.

Update every device to 0.15 before the first sync push. A device on an older dx gets no transcripts from a gzipped repo until it updates, and until an updated device pushes again, each push it makes takes out of the repo every transcript it does not hold and puts back plain copies of the ones it does. No device loses a transcript it holds. The first push from 0.15 gzips every transcript once, so it takes longer than the ones after it.

Target resolution

dx picks the sync target in this order (first match wins):

  1. Explicit arg: dx sync push <target>
  2. DX_SYNC environment variable
  3. sync=<url> in ~/.dx/config (written by dx sync setup)

Alternative targets (no git)

If you'd rather not use git, dx sync push|pull still works with:

dx sync push /mnt/backup           # local path (USB, NAS, shared folder)
dx sync push user@host:~/dx-data   # rsync over SSH

You can also point DX_SYNC at a folder synced by iCloud, Dropbox, or Syncthing — those services handle the transport, dx handles the merge. A folder or rsync target gets plain copies of the transcripts, as before, and no file limit applies.

Like a push to a git sync repo, a push to a folder or an rsync target first merges in what's already there, so the sessions another device pushed there aren't overwritten. If dx can't read or merge them, it doesn't push. Two pushes to the same folder or rsync target at the same moment can still overwrite each other. That holds for your own sync target, set in DX_SYNC or ~/.dx/config. A push to any other folder or host, given on the command line, copies over what's there without merging first. To merge, push to your own target: plain dx sync push.

Security notes

The repo is private, TLS in transit, and encrypted at rest by your git host. dx doesn't add client-side encryption, so sessions are readable by anyone with repo access (including, in principle, the git host's staff). For most threat models this is fine; if you need stronger guarantees, host on your own server or wrap blobs in age or gpg before snapping.

Check your setup

dx doctor looks at dx on this device and says what to fix: the hooks of the repo you are in, the install, Claude Code, Node.js, dx connect, auto-sync, the terminal dx wake opens tabs in, the worktrees dx made, and what dx left behind. It changes nothing except two things other commands also keep up to date: Claude Code's version, and the newest dx release, looked up at most once every 7 days as dx version does (DX_NO_UPDATE_CHECK=1 turns that off). It keeps them in dx's folder (~/.dx) only when that folder exists, and never creates it. It exits 0 whenever it ran. Each line starts with a mark: ok, note (nothing to fix, but worth knowing), fix (something to fix, with the command for it last when there is one), or skip (dx couldn't check):

$ dx doctor
dx doctor
  ok    repo: dx's lines are in post-commit and pre-push (~/code/app)
  ok    install: dx 0.15.0 at ~/.dx, linked from ~/.local/bin, which is on PATH
  ok    claude: Claude Code 2.1.303; home ~/.claude
  ok    node: Node.js 22.11.0
  note  connect: not set up — to pair a device: dx connect pair
  fix   sync: the daemon is not running, but its pid file says it is (pid 4120) — to start it again: dx sync enable
  ok    wake: tabs open in tmux (TMUX is set); tmux 3.2a
  ok    worktrees: 2, each linked to its repo
  ok    leftovers: none
1 thing to fix.

A part with more than one thing to say prints a line for each. A fresh install is healthy when dx is on your PATH and the device has git, Claude Code and Node.js: not being in a repo, a repo without dx's hooks, and dx connect or auto-sync not set up are notes, not fixes. Otherwise it isn't: dx not on PATH, a missing Claude Code and a missing Node.js are each a fix, and without git dx can't check the repo. The last line counts the fix lines, and says when a check could not run (Nothing to fix, but 1 check could not run.). A skip line isn't counted, but it keeps a script from reading the setup as healthy (see Scripts).

Use dx from scripts

A script, an editor extension or a dashboard can drive dx. From dx 0.13.0, three things are stable:

  • The read document: dx sessions --json prints every session, group, device and contact as one JSON document, with its contract version. It needs Node.js.
  • The exit codes: 0 done, 1 error, 2 usage, 3 not found, 4 ambiguous, 5 needs a person, 6 cancelled, and 128+N when a signal stopped it.
  • No questions without a terminal: with no terminal, or with --no-input, dx never asks. Where it would have, it exits 5 and names the flag that answers, usually -y.

The --json results of the other verbs, such as dx open <id> --json and dx fork <id> --json, are dx's own and may change in any release. So may the dx sessions list for people, and every message.

dx doctor --json (see Check your setup) prints one object like them: healthy is true exactly when every check ran and none needs a fix, and ok is true whenever doctor ran, since it exits 0 then. findings[] has {check, checked, needs_fix, message, command} for each thing it found, and there is a data object for each part: repo, install, claude, node, connect, sync, wake, worktrees and leftovers.

Adding a field can come in any release, and raises the contract's minor version. Renaming or removing a field, or giving an exit code another meaning, is a breaking change. It is announced in the changelog at least one minor release and 30 days ahead, and the reference marks the part that will change. Only a security fix may skip that notice.

Every field, code and rule is in the scripting reference.

How It Works

A git post-commit hook runs after every commit. It:

  1. Extracts the commit message and hash
  2. Generates a slug: fix-login-redirect-bug-a1b2c3d
  3. Launches each configured tool (Claude Code by default) in the background with the slug as prompt
  4. Logs the session to ~/.dx/data/sessions.tsv

dx snap finds the most recently modified Claude session file in ~/.claude/projects/, or under $CLAUDE_CONFIG_DIR when that's set (see Claude's home), 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

  • git and bash (always required)
  • node (required for dx ui, the resume picker and dx connect)
  • rsntr (required for dx connect only; dx connect install downloads it)

Platform Support

Platform Status
macOSSupported
LinuxSupported
Windows (Git Bash / MSYS2)Supported
WSLSupported

Uninstall

Remove from a repo:

dx disable

Remove globally: first run dx disable in each repo where you ran dx enable, then remove dx's files:

rm -rf ~/.dx ~/.local/bin/dx

A repo you miss keeps dx's two lines in its post-commit hook. From dx 0.12.1 on they do nothing once dx is gone (dx updates an older repo's lines at its next commit), and dx disable removes them if you install dx again.

If you added the PATH export to ~/.bashrc, remove that line too.