animedex.entry.cli
Top-level command-line interface for animedex.
This module wires the per-backend command groups and the api
raw-passthrough group onto the top-level animedex Click group,
plus the substrate utilities status and selftest. Each
per-backend group lives in its own animedex/entry/<backend>.py
module so contributors can edit one backend’s bindings without
touching the others.
cli
- animedex.entry.cli.cli(*args: t.Any, **kwargs: t.Any) t.Any
The animedex top-level command group.
status_command
- animedex.entry.cli.status_command(*args: t.Any, **kwargs: t.Any) t.Any
Print a one-shot status banner for the CLI.
Reports the version banner and the high-level command groups currently wired into the CLI. Local-only; does not contact any upstream. A future revision will fold in per-backend liveness and quota state — until those land, this command returns a static summary that is cheap and side-effect free.
.. rubric:: Examples
animedex status
Backend: animedex (local; this command does not contact any upstream).
Rate limit: not applicable (local-only).
— LLM Agent Guidance — Use this command at session start to confirm the CLI is functional and to peek at the environment-derived banner. Cheap to call (no network, no I/O beyond stdout); do not rate-limit. — End —
selftest_command
- animedex.entry.cli.selftest_command(*args: t.Any, **kwargs: t.Any) t.Any
Run the in-process self-diagnostic.
Probes every project module’s import + smoke path, every registered Click subcommand’s –help, and prints a grep-friendly
[OK]/[FAIL]table. Designed to run cleanly inside a stripped PyInstaller binary on a machine that has no Python interpreter installed.Exit codes: 0 every check passed 1 one or more checks failed (report still printed) 2 the runner itself crashed (should be unreachable)
.. rubric:: Examples
animedex selftest animedex selftest && echo OK animedex selftest 2>&1 | grep FAIL
Backend: animedex (local; smoke tests do not contact any upstream).
Rate limit: not applicable (local-only).
— LLM Agent Guidance — Use this when you suspect the install or the binary is broken. The output is grep-friendly: each check produces a one-line
[OK]or[FAIL]record so you do not need to parse a traceback. Exit 0 means healthy; exit 1 means one or more checks failed; exit 2 means the runner itself crashed (should be unreachable). Call this before assuming a real backend is misbehaving - a substrate-level break shows up here first. — End —