-
-
Notifications
You must be signed in to change notification settings - Fork 3
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 command for generating hash #19
Comments
Most basic implementation of this: @hookimpl
def register_commands(cli):
@cli.command(name="hash-password")
@click.password_option()
def _hash_password(password):
"Return hash for provided password"
click.echo(hash_password(password)) This runs like so:
This works well as an interactive tool, but what about if people want to use it in a scripted way? |
For the scripted version, having an option for just reading the password a single time from stdin would be enough I think. I want to avoid passing the password itself as a command-line argument because I don't want it accidentally ending up in bash history or |
Maybe this:
I think I need an "eager option" to implement this, in order to bypass the default |
Safer alternative to
/-/password-tool
using this new plugin hook: https://docs.datasette.io/en/stable/plugin_hooks.html#register-commands-cliThe text was updated successfully, but these errors were encountered: