Skip to content

Command-Line Interface

The h9a command is defined in h9a/cli.py and exposed via the h9a console script (see pyproject.toml).

Synopsis

h9a [--digit DIGIT] [--start START] [--end END] [--json] [--no-color] [--screenshot [PATH]] [--version]

There are no positional arguments.

Options

Option Description
--digit DIGIT Single decimal digit (0-9) to count. Default: 9.
--start START First number of the range, inclusive. Default: 1.
--end END Last number of the range, inclusive. Default: 100.
--json Print machine-readable JSON instead of styled text.
--no-color Disable colors in the styled output.
--screenshot [PATH] Render the output to a PNG image with Pillow. Default path: Screenshots/home.png.
--version Print the version number and exit.
-h, --help Show the help text and exit.

Behavior

Item Value
Command h9a (or python -m h9a)
Positional arguments none
Environment variables none
Configuration files none
Exit code (success) 0
Exit code (invalid args) 2

Examples

h9a                              # defaults: digit 9, range 1..100
h9a --digit 7 --end 999          # digit 7, range 1..999 -> 300
h9a --json                       # JSON output
h9a --no-color --end 50          # plain text output
h9a --screenshot                 # generate Screenshots/home.png
h9a --screenshot out.png         # generate out.png
h9a --version                    # print h9a 0.0.0

Error cases

  • h9a: error: ... followed by exit code 2 — invalid arguments, e.g. --digit 11 (not a single digit) or --start 10 --end 5 (start greater than end).
  • h9a : The term 'h9a' is not recognized (Windows) or h9a: command not found — the package is not installed. Install it or run python -m h9a. See troubleshooting.md.
  • ModuleNotFoundError: No module named 'PIL' — Pillow is missing; install it or reinstall with pip install h9a[screenshot].

Back to Home