MCPcopy
hub / github.com/opentrace/opentrace / config_set

Function config_set

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

Set a configuration value. \b Supported keys: org Organisation ID (org_xxx) or slug (acme_corp)

(key: str, value: str)

Source from the content-addressed store, hash-verified

966@click.argument("key", type=click.Choice(["org"]))
967@click.argument("value")
968def config_set(key: str, value: str) -> None:
969 """Set a configuration value.
970
971 \b
972 Supported keys:
973 org Organisation ID (org_xxx) or slug (acme_corp)
974 """
975 from opentrace_agent.cli.config import load_config, save_config
976
977 path = _resolve_config_path()
978 data = load_config(path)
979 data[key] = value
980 save_config(path, data)
981 _ensure_gitignore(path.parent)
982 click.echo(f"{key}: {value}")
983
984
985@config.command("get")

Callers

nothing calls this directly

Calls 4

load_configFunction · 0.90
save_configFunction · 0.90
_resolve_config_pathFunction · 0.85
_ensure_gitignoreFunction · 0.85

Tested by

no test coverage detected