CERT-Polska / mwdblib

Client library for the mwdb service by CERT Polska.
https://mwdblib.readthedocs.io/en/latest/
MIT License
40 stars 13 forks source link

CLI: Better handling of API URL and formatter options #53

Closed psrok1 closed 2 years ago

psrok1 commented 2 years ago

All options are accessible at the end of command

$ mwdb list files --help
Usage: mwdb list files [OPTIONS]

  List recent files

Options:
  -n, --limit INTEGER
  -o, --output [nocolor|nohuman|nopager|table|short|json]
                                  Format options
  --api-url TEXT                  URL to MWDB instance API
  --config-path TEXT              Alternative configuration path
  --help                          Show this message and exit.
$ mwdb login --help
Usage: mwdb login [OPTIONS]

  Store credentials for MWDB authentication

Options:
  -u, --username TEXT  MWDB user name (default: ask)
  -p, --password TEXT  MWDB password (default: ask)
  -A, --via-api-key    Use API key provided by stdin
  -a, --api-key TEXT   API key token (default: password-based authentication)
  --api-url TEXT       URL to MWDB instance API
  --config-path TEXT   Alternative configuration path
  --help               Show this message and exit.

Closes #44