Get a configuration value.
(key: str)
| 985 | @config.command("get") |
| 986 | @click.argument("key", type=click.Choice(["org"])) |
| 987 | def config_get(key: str) -> None: |
| 988 | """Get a configuration value.""" |
| 989 | from opentrace_agent.cli.config import load_config |
| 990 | |
| 991 | path = _resolve_config_path() |
| 992 | data = load_config(path) |
| 993 | val = data.get(key) |
| 994 | if val is None: |
| 995 | raise click.UsageError(f"'{key}' is not set. Run: opentraceai config set {key} <value>") |
| 996 | click.echo(val) |
| 997 | |
| 998 | |
| 999 | @config.command("show") |
nothing calls this directly
no test coverage detected