CLI
wishful is a real console script (installed with the package), and
python -m wishful is the equivalent module form. Inside this repo, run everything
through uv run:
uv run python -m wishful --help# or, once installed: wishful --helpEvery subcommand accepts --json for machine-readable output, and the CLI exits
0 on success, 1 on a runtime error (e.g. an invalid module name), and 2 on a
usage mistake. wishful --version prints the installed version.
Inspect cache
Section titled “Inspect cache”uv run python -m wishful inspectLists cached modules under settings.cache_dir.
Clear cache
Section titled “Clear cache”uv run python -m wishful clearDeletes everything under the cache dir (including dynamic snapshots and logs).
Regenerate a module
Section titled “Regenerate a module”uv run python -m wishful regen wishful.static.text# shorthand (defaults to static namespace)uv run python -m wishful regen textRemoves the cached module so the next import triggers fresh generation.
Pro tips
Section titled “Pro tips”Small but mighty.
- These CLI helpers mirror the Python API:
inspect_cache,clear_cache,regenerate. - Add
--jsonto any command to script against it; exit codes are0/1/2. - Static modules cache at
<cache_dir>/<name>.py; dynamic modules live entirely under<cache_dir>/_dynamic/<name>.py. As of 0.3.0 the two namespaces never share a file. - When file logging is enabled, logs live under
<cache_dir>/_logs/; clearing the cache nukes them too. (No survivors.)