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 DiffdumpInstall 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 | bashThe 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
| Command | Shortcut | Opens |
|---|---|---|
| ddd | ddu | Staged, unstaged, and untracked changes. |
| ddd commit | ddc | The latest commit only. |
| ddd pr | ddp | The current GitHub pull request, without uploading a patch. |
| ddd branch | ddb | The 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/dStaged changes
Add Git’s --cached flag to review what the next commit will contain.
git diff --cached | curl -T- https://diffdump.com/dA 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/dOpen 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 openDownload an uploaded diff
Retrieve the original uploaded patch with an HTTP GET request to /d/YOUR_SLUG. Use the slug from the shared review URL’s /view/YOUR_SLUG path:
curl -fS https://diffdump.com/d/YOUR_SLUG -o changes.diffA successful request returns 200 with the raw patch. Missing, invalid, or expired shares return 404; storage failures return 500. Downloads use the share’s original 24-hour expiry and do not extend it.
You can also open the shared review link and select Download diff beside Copy link.
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/dThe 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.
Upload HTTP responses
| Status | Meaning |
|---|---|
| 201 | Created; the body contains the share URL. |
| 400 | The body or optional GitHub base metadata was invalid. |
| 413 | The patch exceeded the 2 MiB limit. |
| 429 | The anonymous creation rate limit was reached. |
| 500 | The diff could not be stored. |
Security and expiry
Uploads create unlisted URLs, not authenticated shares. Anyone with the link can view or download its contents until it expires after 24 hours. Remove secrets before uploading a patch.