Black (black)
Black formats Python code and offers no options worth arguing about. Double quotes, spaces around operators, one argument per line once a call no longer fits in 88 characters, and a trailing comma that tells it to keep a list one item per line. The point is the end of style discussions: code formatted by Black looks the same whoever wrote it, and a diff shows only what changed in meaning.
The few settings that exist are a line length, a flag to skip the magic
trailing comma, and the Python versions to target. black . formats a
project in place, --check makes a CI step, --diff shows what it would
do. blackd is the same formatter as an HTTP server: post the code, get
it back formatted, with the options in request headers, which is how
editor plugins avoid starting Python for every save.
This demo opens a web page, not a terminal: a playground with a sample
file and a Format button, served by blackd inside the VM. Press Format,
raise the line length to 120 and press it again, tick Skip magic
trailing comma, then Show diff. A terminal opens under the page, where
curl -s --data-binary @/root/app.py localhost:45484 posts the same
file to blackd by hand. The VM is private to your browser tab; nothing
you type leaves it.
Commands to try
curl -s --data-binary @/root/app.py localhost:45484 | in the terminal under the page: blackd formats the file posted to it |
curl -s -H 'X-Line-Length: 120' --data-binary @/root/app.py localhost:45484 | options go in headers |
curl -s -H 'X-Diff: 1' --data-binary @/root/app.py localhost:45484 | the change as a diff instead of the result |
black app.py | on your own machine: format the file in place |
black --check . | the CI step: fails when anything would change |
Install Black on your own machine
| pip | pip install black |
| Alpine | apk add black |
| macOS (Homebrew) | brew install black |
This VM was last built on Oct 19, 2026. How Demoshell demos work →
Similar tools you can try here
- curl — The command-line tool for transferring data with URLs, sending requests to a local httpbin server in a private Linux VM.
- curlie — Httpie's syntax and coloured output on top of curl, every curl option still there, run against a local server in a private Linux VM.
- pet — The command-line snippet manager that saves a long command once and finds it by what it does, live in a private Linux VM.
- navi — Interactive cheatsheets for the command line that pick a command, fill in its arguments and run it, in a private Linux VM.
- Miller — Awk, sed, cut and sort for CSV, TSV and JSON by field name, run over a sample orders file in a private Linux VM.