Skip to content

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:

Terminal window
uv run python -m wishful --help
# or, once installed: wishful --help

Every 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.

Terminal window
uv run python -m wishful inspect

Lists cached modules under settings.cache_dir.

Terminal window
uv run python -m wishful clear

Deletes everything under the cache dir (including dynamic snapshots and logs).

Terminal window
uv run python -m wishful regen wishful.static.text
# shorthand (defaults to static namespace)
uv run python -m wishful regen text

Removes the cached module so the next import triggers fresh generation.

Small but mighty.

  • These CLI helpers mirror the Python API: inspect_cache, clear_cache, regenerate.
  • Add --json to any command to script against it; exit codes are 0/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.)