MCPcopy
hub / github.com/opentrace/opentrace / config_get

Function config_get

agent/src/opentrace_agent/cli/main.py:987–996  ·  view source on GitHub ↗

Get a configuration value.

(key: str)

Source from the content-addressed store, hash-verified

985@config.command("get")
986@click.argument("key", type=click.Choice(["org"]))
987def 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")

Callers

nothing calls this directly

Calls 3

load_configFunction · 0.90
_resolve_config_pathFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected