Start the CGC Gateway HTTP API server. This server provides a REST API that can be used by ChatGPT Actions, Claude, or web frontends to interact with the CodeGraphContext graph.
(
host: str = typer.Option("0.0.0.0", help="Host to bind the server to"),
port: int = typer.Option(8000, help="Port to bind the server to"),
reload: bool = typer.Option(False, help="Enable auto-reload (development only)"),
)
| 942 | |
| 943 | @api_app.command("start") |
| 944 | def api_start( |
| 945 | host: str = typer.Option("0.0.0.0", help="Host to bind the server to"), |
| 946 | port: int = typer.Option(8000, help="Port to bind the server to"), |
| 947 | reload: bool = typer.Option(False, help="Enable auto-reload (development only)"), |
| 948 | ): |
| 949 | """ |
| 950 | Start the CGC Gateway HTTP API server. |
| 951 | |
| 952 | This server provides a REST API that can be used by ChatGPT Actions, |
| 953 | Claude, or web frontends to interact with the CodeGraphContext graph. |
| 954 | """ |
| 955 | import uvicorn |
| 956 | console.print(f"[bold green]Starting CGC Gateway on {host}:{port}...[/bold green]") |
| 957 | _load_credentials() |
| 958 | uvicorn.run("codegraphcontext.api.app:app", host=host, port=port, reload=reload) |
| 959 | |
| 960 | |
| 961 |
nothing calls this directly
no test coverage detected