INNER CODE UNIT · Python
main
headroomlabs-ai/headroom · headroom/cli/main.py:21
def main(ctx: click.Context) -> None:
"""Headroom - The Context Optimization Layer for LLM Applications.
Manage memories, run the optimization proxy, and analyze metrics.
\b
Examples:
headroom proxy Start the optimization proxy
headroom memory list List stored memories
headroom memory stats Show memory statistics
headroom update Update Headroom to the latest release
"""
ctx.ensure_object(dict)
# Apply file-backed settings (settings.json) to the process environment
# BEFORE Click parses any subcommand's ``envvar=`` options (Click resolves
# those when it builds the subcommand context, which happens after this
# group callback runs). ``os.environ.setdefault`` keeps explicit shell