fireaid
A little help for Python Fire.
Python Fire turns any Python
function, class or module into a command-line tool with a single line
of code. fireaid is a thin wrapper around it that adds the help
conventions people know from tools like git: a help command,
--help printed plainly to the terminal, and a short usage message
when a command is incomplete. Everything else is Fire, unchanged.
All you need is:
pip install git+https://github.com/cr/fireaid
import fireaid as fire
fire.Fire(MyTool)
Installation
Directly from the repository:
pip install git+https://github.com/cr/fireaid
As a dependency in another project's pyproject.toml:
dependencies = ["fireaid @ git+https://github.com/cr/fireaid"]
From the project directory:
pip install .
For development:
pip install -e .
fireaid requires Fire 0.2.0 or later, the first version to accept
--help without a separator. On Python 3.13 and later, Fire itself
requires version 0.7.0.
Usage
Change:
import fire
to:
import fireaid as fire
Existing code such as:
fire.Fire(MyCLI)
continues to work, as do import fireaid.core and python -m fireaid.
Help
Python Fire accepts:
tool foo -- --help
tool foo --help
tool foo -h
fireaid additionally supports Git-style help:
tool help
tool help foo
tool help foo bar
help is a command like any other: Fire lists it with the program's
commands in the usage text and in the help, and tool help help shows
help for it.
To that end, fireaid adds the command to the program for as long as
Fire runs: to its class, or to a copy if the program is a dict.
With --help and -h, fireaid also
- prints the help text to stdout, so that
tool --help | lessworks, - prints it as it is, where Fire starts a pager on a terminal,
- omits Fire's
INFO: Showing help with the command ...banner, - shows help for functions taking
**kwargs, where Fire passeshelp=Trueto the function.
Native Fire syntax continues to work unchanged, printing to stderr, or to a pager on a terminal.
Usage text
A command line that names a group rather than a command, such as
plain tool, is a success to Fire, which shows the full help for the
group, in a pager. To fireaid it is an incomplete command, as it is to
Git: it prints Fire's short usage text to stdout, and exits with 2,
Fire's exit code for errors:
Usage: tool <group|command>
available groups: shelf
available commands: add | help | list | remove | search
For detailed information on this command, run:
tool --help
A function that returns an object is a complete command. There, Fire shows the help for the object, which fireaid only keeps from the pager.
examples/pantry.py is a small program to try all of this on, and
examples/tour.sh runs through it.
Limits
fireaid does not take anything away from the wrapped program:
helpis only help as the first word, and not if the program has ahelpcommand of its own, or is a single function.--helpand-hare only help as the last word.--helpis left to a command with ahelpparameter,-hto a command with a parameter starting withh, for which it is Fire's shortcut.- A command that fireaid cannot find without running the program, such
as a member created in
__init__, may have such a parameter. There,-his left to Fire, which shows help with its banner on stderr.
Help for a command that does not exist is an error, as it is in Fire's native syntax.
As with Fire, help is shown for what the command line evaluates to.
tool foo x --help calls foo and shows help for its result. Ask
for tool foo --help to get help for foo.
Tests
make test
creates a virtual environment in .venv, upgrades it to the latest
stable Fire, and runs the test suite. The tests hold fireaid to what
this README says, mostly by comparing it to Fire on the same command
lines. make test PYTHON=python3.14 selects the Python for a new
environment, make clean removes it.
Releasing
Set the new version in pyproject.toml, commit, then tag and push:
git tag v0.1.0 && git push origin main v0.1.0
The tag starts .github/workflows/publish.yml, which runs the tests,
checks that the tag is the package version, builds, and publishes to
PyPI as a trusted publisher. PyPI never takes the same version twice.
Metadata
Release files for fireaid 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fireaid-0.1.0.tar.gz | 17.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fireaid-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.1 kB
Release files / fireaid-0.1.0.tar.gz
| Download URL | fireaid-0.1.0.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39de9892b38bb92e9f1204a270689d8a05aa06ff17de2d9f97cd041e2728c868
|
|
BLAKE2b-256 checksum How to use checksums |
cff7cd3703457f0616584c082bfc75091e6dc5e954e7e21bac5b0922fb74f131
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / fireaid-0.1.0-py3-none-any.whl
| Download URL | fireaid-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d62d308396bb5936586acada611188194e88968ae77080ac88f2dc42e488a04e
|
|
BLAKE2b-256 checksum How to use checksums |
c439496af0cc9630075a548836b11b12e8d1d3e575f4f97f11d2590eca917d4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency log