downtime

Zero-dependency Node CLI

Put dt in front of a slow command and play trivia until it finishes

When the command exits, the game closes mid-question and you get one line saying what ran and how long it took, then the command's full output, untouched.

At a glance

does
Runs your command unchanged. If it is still going after 5 seconds, trivia takes the terminal's alternate screen; when the command exits you get a one-line recap, the held output in order and the real exit code.
tested
56 Node tests pass in CI on Linux and macOS under Node 18, 20 and 22. CI also checks that a fast command prints only its own output and that exit code 42 passes through. The bank of 550 questions in 23 categories is checked for shape, duplicate ids and answer position (138, 138, 138 and 136 across a to d).
output
A 40,000-line firehose came back complete and in order. Past 32 MB held, the game ends early and the rest streams normally.
limits
Interactive tools (bare claude, vim) fail at once, because the wrapped command gets a closed stdin. Only Claude Code has been run end to end; Codex, Gemini CLI and Aider are untested, and so is Windows. Order between stdout and stderr while output is held is best effort.
A browser copy of the trivia screen, using 12 of the 550 questions in questions.json. The build is simulated and "finishes" after three answers. In a real terminal the right answer gets a check mark and the colors come from your theme.
$ npm install -g github:lyhjeremy/downtime-cli

Then dt <any command>, for example dt npm run build. Node 18 or newer.

How it works

Two letters in front of what you already type

  1. 01

    Prefix the command

    dt npm run build, dt pytest -x, dt claude -p "fix the tests". Output, exit code and behavior are the same as running it bare.

  2. 02

    Under 5 seconds, nothing happens

    Past the threshold the trivia takes over the screen, on the terminal's alternate buffer so it never reaches your scrollback. Answer with letters, numbers or the arrow keys. Flags, country outlines and landmarks are drawn in the terminal.

  3. 03

    It lets go when your command does

    Everything the command printed while the game was up is held and replayed in order, on the stream it came from, with the real exit code.

Keys

Everything the game understands

a to d, or 1 to 4answer
Up Down Entermove the highlight and pick
n or Spacenext question
q or Escleave the game; the command keeps running
Enterreturn to your task once it has finished
Ctrl+Cstop the command and everything it started, then print what it had output

Compatibility

Anything that runs to completion

Builds, tests, installs, deploys, and coding agents in their non-interactive mode. The wrapped command gets an empty stdin, so tools that open their own interface, like bare claude or vim, fail at once and visibly. Don't wrap those.

ToolCommandStatus
Claude Codedt claude -p "refactor the auth module"tested
Codex CLIdt codex exec "fix the failing test"same pattern, untested
Gemini CLIdt gemini -p "explain this repo"same pattern, untested
Aiderdt aider --message "add tests" --yessame pattern, untested
Everything elsedt npm run build, dt cargo build, dt pytestworks
WhereBehavior
Terminal.app, iTerm2, Alacritty, Kitty, WezTerm, GNOME Terminalfull support
VS Code, Cursor and JetBrains integrated terminalsfull support
tmux and GNU screenfull support
Emacs shells, dumb terminals, CI, pipesplain wrapper, no trivia

Design rules

Two things it will not do

Lose output
Held output is replayed in order with the real exit code. In a test with a 40,000-line firehose every line arrived, in order. Past 32 MB held, the game ends early and the rest streams normally.
Ask you back
No streaks, daily goals, notifications or feed. Each question finishes in a few seconds and carries nothing over, so there is nothing to return to once your work is ready.