Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

psrok1
Copy link
Member

@psrok1 psrok1 commented Nov 22, 2021

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

@psrok1 psrok1 merged commit 956bfe5 into master Nov 29, 2021
@psrok1 psrok1 deleted the refactor/formatter-mwdb-options branch November 29, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: Use click.Choice for formatting options
1 participant