How-toLocal modeLast updated

Publish your first dump locally, in five minutes.

For anyone who wants to try dumps without a server, a tunnel or a login. You will build one small binary, publish an HTML page and open it at localhost, all on your own machine.

  1. 01Clone the repo
  2. 02Build dumpsd
  3. 03Write a page
  4. 04Publish it
  5. 05Serve and open

Five steps. "Five minutes" assumes Go is already installed; the first build also runs the Go tests.

The short version

Four commands, from inside the cloned repo

cli/dumps install-dumpsd, then cli/dumps publish ./page.html, then cli/dumps serve-local, then open http://localhost:8090.

Local mode is the default (DUMPS_HOST=local), so there is no config file to write.

Before you start

Local mode runs on macOS and Linux. It needs:

  • bash, jq, rsync and python3.
  • Go, at the version in server/go.mod (currently go 1.26), to build dumpsd.
  • Optional, for thumbnails: Chrome or Chromium, plus sips (built into macOS) or ImageMagick (Linux).
Note

Without a browser or a resizer, publishing still works. The home just shows a placeholder card with the first letter of the title.

Step by step

  1. Clone the repository

    git clone https://github.com/grippado/dumps.git
    cd dumps

    You are at the repo root, where cli/dumps lives. Every command below runs from here.

  2. Build and install dumpsd

    This runs the Go tests, builds dumpsd for the current machine and installs it into the local root, ~/.local/share/dumps/bin. There is no need to run make build.

    cli/dumps install-dumpsd

    The command ends by printing the installed dumpsd version, and ~/.local/share/dumps/bin/dumpsd exists.

  3. Write a page to publish

    Any single .html file works, or a folder with an index.html. If you do not have one at hand, make a tiny one:

    printf '<!doctype html><title>Hello</title><h1>Hello, dumps</h1>\n' > page.html

    A page.html file sits in the current folder.

  4. Publish it

    cli/dumps publish ./page.html

    The last line is the dump's URL, with a short random id:

    http://localhost:8090/<id>/

    To pick the title and a readable, stable URL, pass flags. Publishing the same id again updates that dump.

    cli/dumps publish ./my-folder --title "My folder" --id my-folder
  5. Serve and open it

    This re-renders the home and the listing, then serves both on loopback. Leave it running; stop it with Ctrl-C.

    cli/dumps serve-local

    It prints this line (the CLI messages are in Portuguese for now):

    dumps local em http://localhost:8090/ e admin em http://localhost:8091/_dumps/ (origens separadas). Ctrl-C para sair.

    Then open:

    Warning

    Open the admin with localhost, not 127.0.0.1. The API compares the Origin header as exact text, so on http://127.0.0.1:8091 every admin action fails with 403.

Optional: let your agent publish

The dump-this skill turns a request into a finished page and publishes it hidden for your review. This links the skill and the /dump-this command into Claude Code and Codex (use claude or codex instead of all for just one):

cli/dumps install-agent all

The agent calls the bare dumps command, so put the CLI on your PATH. The CLI suggests a symlink like this one:

ln -s "$PWD/cli/dumps" ~/.local/bin/dumps

dumps config works from any folder, and /dump-this <what you want> is available in your harness.

Command reference

All commands run as cli/dumps <command> (or dumps <command> once it is on your PATH).

CommandWhat it does
install-dumpsdRuns the Go tests, builds dumpsd for this machine and installs it into the root.
publish <file|folder>Publishes a .html file or a folder with index.html and prints its URL.
serve-localServes the home and dumps on 127.0.0.1:8090 and the admin on 127.0.0.1:8091. Local mode only.
listLists every dump: id, last update, title (marked when archived) and URL.
archive <id>Takes a dump off the public home without taking it offline.
unarchive <id>Puts an archived dump back on the home.
edit <id> --title <text>Renames a dump on the home and in the listing. The bar inside the HTML changes on the next publish.
rm <id>Deletes a dump.
regenRebuilds the home and the listing from the manifests.
configShows the effective configuration.
install-agent [claude|codex|all]Symlinks the dump-this skill and the /dump-this command. Default all.
Danger

rm does not ask for confirmation. If you only want a dump off the home, use archive.

Flags for publish

FlagDefaultMeaning
--title <text>the page's <title>, else the file nameTitle shown on the home, the listing and the bar.
--id <id>random, 10 charsReadable, stable URL. Lowercase letters, digits and hyphens, starting with a letter or digit. Republishing the same id updates it.
--hiddenoffPublishes already archived: the link works, but the dump stays off the home.
--author "Name|URL"DUMPS_AUTHORSAuthor shown in the footer. Repeat the flag for more than one.
--source agentcliMarks the dump as made by an agent. Accepts cli or agent.
--no-baroffPublishes without the top bar.
--no-footeroffPublishes without the footer.

Local defaults

SettingDefaultVariable
Root~/.local/share/dumps (or $XDG_DATA_HOME/dumps)DUMPS_ROOT
Dumps originhttp://localhost:8090DUMPS_URL
Dumps listener127.0.0.1:8090DUMPS_LISTEN
Admin listener127.0.0.1:8091DUMPS_ADMIN_LISTEN
Admin originhttp://localhost:8091, from the admin portDUMPS_ADMIN_ORIGIN
Admin pagehttp://localhost:8091/_dumps/DUMPS_LIST_URL

Exit codes

CodeMeaning
0OK
1Usage or validation error
2Blocked path (DUMPS_BLOCKED_PATHS)
3Server unreachable
4Remote failure

Troubleshooting

CLI errors start with erro: and warnings with aviso:. The messages are quoted as printed.

Admin actions fail with 403

You opened the admin at 127.0.0.1. Use http://localhost:8091/_dumps/: the Origin must match http://localhost:8091 exactly. A custom DUMPS_ADMIN_ORIGIN breaks the check the same way when it differs from the address you open.

go não encontrado nesta máquina

Go is not on your PATH. Install the version in server/go.mod and run install-dumpsd again.

dumpsd ausente em …; rode: dumps install-dumpsd

serve-local found no binary in the root. Run cli/dumps install-dumpsd first, with the same DUMPS_ROOT.

pasta sem index.html or arquivo precisa ser .html

publish takes a single .html file or a folder that has an index.html at its top level.

id inválido: use minúsculas, números e hífen

The --id must be lowercase letters, digits and hyphens, start with a letter or digit, and be at most 63 characters.

aviso: miniatura não gerada, a home usa um placeholder

No Chrome or Chromium, or no resizer. Install one of each (sips ships with macOS; on Linux, ImageMagick), or point DUMPS_CHROME at your browser. The dump itself is published either way.

The thumbnail is missing styles or images

The thumbnail is rendered from file://, so absolute paths such as /assets/x.css do not load. Use relative paths in the folders you publish.

Links point to the wrong port

DUMPS_URL and DUMPS_LISTEN disagree. To move ports, set the three values together:

DUMPS_URL=http://localhost:9000 DUMPS_LISTEN=127.0.0.1:9000 DUMPS_ADMIN_LISTEN=127.0.0.1:9001 cli/dumps serve-local
aviso: 'dumps' não está no PATH

Printed by install-agent. The skill is installed, but the agent cannot publish until dumps resolves. Add the symlink from the agent step.

Note

Dumps share one origin with each other, so publish only HTML you trust. A dump's JavaScript cannot reach the admin API, which lives on a different origin.