Skip to content

PyPNM CLI

The pypnm command is the primary CLI entrypoint for PyPNM.

Current command structure:

  • pypnm serve for starting the FastAPI service
  • pypnm config-menu for launching the interactive system configuration menu

Usage

pypnm --help

Expected top-level shape:

usage: pypnm [-h] [-v] {serve,config-menu} ...

Commands

pypnm serve

Starts the FastAPI service (pypnm.api.main:app) through Uvicorn.

Common options:

  • --host (default 127.0.0.1)
  • --port (default 8000)
  • --ssl, --cert, --key
  • --log-level {critical,error,warning,info,debug,trace}
  • --workers
  • --no-access-log
  • --reload
  • --reload-dir (repeatable)
  • --reload-include (repeatable)
  • --reload-exclude (repeatable)
  • --mute-tags
  • --mute-tags-hard

Examples:

pypnm serve
pypnm serve --host 0.0.0.0 --port 8080
pypnm serve --reload
pypnm serve --ssl --cert ./certs/cert.pem --key ./certs/key.pem
pypnm serve --mute-tags "PNM Operations - Multi-Downstream OFDM RxMER"
pypnm serve --mute-tags "Orchestrator,Operational" --mute-tags-hard

Notes:

  • When --reload is enabled, --workers is forced to 1.
  • --mute-tags hides matching-tag routes from OpenAPI/docs.
  • --mute-tags-hard additionally enforces 403 for matching routes.

pypnm config-menu

Launches the interactive system configuration menu (same behavior as the legacy helper script).

Example:

pypnm config-menu

Version

pypnm --version

Migration from old syntax

Old:

pypnm --reload
pypnm --host 0.0.0.0 --port 8000

New:

pypnm serve --reload
pypnm serve --host 0.0.0.0 --port 8000