Commit 77542146 authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

Rewrite to use click instead of typer

Typer doesn't work with Click 8[1].

parent 652185f3
......@@ -9,7 +9,7 @@ This repository contains the complete collection of ansible playbooks and roles
Install these packages:
- terraform
- python-typer
- python-click
- python-jmespath
- moreutils (for playbooks/tasks/reencrypt-vault-key.yml)
......@@ -7,11 +7,9 @@ from contextlib import contextmanager
from enum import Enum
from pathlib import Path
from typing import List
import typer
import click
import yaml
app = typer.Typer()
def chdir(path):
......@@ -56,14 +54,11 @@ class OutputFormat(str, Enum):
def __str__(self):
return self.value
def main(
vault: Path = typer.Argument(...),
keys: List[str] = typer.Argument(...),
format: OutputFormat = typer.Option(
OutputFormat.BARE, show_default=True, help="Output format"
@click.argument('vault', type=click.Path(exists=True))
@click.argument('keys', nargs=-1)
@click.option('--format', default=OutputFormat.BARE, type=click.Choice([e.value for e in OutputFormat]), help='Output format')
def main(vault, keys, format):
Get a bunch of entries from the vault located at VAULT.
......@@ -84,4 +79,4 @@ def main(
if __name__ == "__main__":
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment