CLI workflow

Open any Git change from your terminal.

Install the ddd shell command to open working-tree changes, commits, branches, and pull requests in Diffdump. Scripts and coding agents can still upload directly with curl.

Updated

Open Diffdump

Install or update ddd

The installer places ddd in ~/.local/bin, adds the directory to your login shell’s profile when necessary, and installs the ddc, ddu, ddp, and ddb shortcuts. Running it again updates the command.

curl -fsSL https://diffdump.com/install | bash

The installer verifies the downloaded command with SHA-256 before replacing an existing installation. You can inspect the served installer and ddd command before running them. The command requires Bash 3.2 or newer, Git, and curl. ddd pr and default-branch detection additionally require the GitHub CLI (gh).

Commands and shortcuts

CommandShortcutOpens
ddddduStaged, unstaged, and untracked changes.
ddd commitddcThe latest commit only.
ddd prddpThe current GitHub pull request, without uploading a patch.
ddd branchddbThe current branch against the default branch.
ddd from <ref>Working-tree changes since an arbitrary Git ref.

ddd opens the URL automatically on macOS and prints it everywhere else. Run ddd help for the command’s built-in reference.

Use curl directly

The CLI is a convenience wrapper around Diffdump’s HTTP endpoint. Send any unified diff with an HTTP PUT request; a successful upload returns the unlisted review URL as plain text.

git diff | curl -T- https://diffdump.com/d

Staged changes

Add Git’s --cached flag to review what the next commit will contain.

git diff --cached | curl -T- https://diffdump.com/d

A committed change

Render the latest commit as a patch without the commit message, then upload it.

git show --format= --patch HEAD | curl -T- https://diffdump.com/d

Open the returned link

Because the response is plain text, it can be passed directly to another command. On macOS:

git diff | curl -T- https://diffdump.com/d | xargs open

Expand context from GitHub

Include the canonical GitHub repository and the full base commit SHA to enable on-demand expansion of unchanged lines. Diffdump keeps the patch as the request body.

BASE_SHA=$(git rev-parse HEAD)
git -c core.quotepath=off diff --full-index --binary "$BASE_SHA" |
  curl -T- \
    -H "X-Diffdump-GitHub-Repo: org/repository" \
    -H "X-Diffdump-Base-Sha: $BASE_SHA" \
    https://diffdump.com/d

The viewer fetches a requested base file directly from GitHub only after an expansion click, then applies the patch in the browser. Public repositories work anonymously. Private repositories use a GitHub token saved in that viewer’s browser. core.quotepath=off keeps non-ASCII file paths literal in the patch so their context stays expandable.

HTTP responses

StatusMeaning
201Created; the body contains the share URL.
400The body or optional GitHub base metadata was invalid.
413The patch exceeded the 2 MiB limit.
429The anonymous creation rate limit was reached.
500The diff could not be stored.

Security and expiry

Uploads create unlisted URLs, not authenticated shares. Anyone with the link can view its contents until it expires after 24 hours. Remove secrets before uploading a patch.