-
Global user config –
~/.oncall/config- Stores your API key and (optionally) other global values.
-
Example:
-
Per‑service config –
oncall.yaml(in each project root)- Describes a single service in your app and how OnCall can interact with it.
-
Example:
~/.oncall/config (user settings)
Used to configure values that apply to all projects on a machine:
API_KEY— required; used to authenticate to the OnCall debugging service.- Set with
oncall login <api-key>. - Rotated by updating the file via
oncall loginand deleting old keys in the dashboard.
- Set with
- You typically do not edit this file by hand; use CLI commands instead.
oncall.yaml (project/service settings)
Each project directory that uses OnCall CLI should have exactly one oncall.yaml. It is created with:
id(string): Project ID – all services with the sameidare treated as part of a single logical app/cluster.description(string): Short description of the service – gives the AI more context about what this service does.name(string): Optional display name for the service.window_id(number): Unique identifier for this service instance – auto‑generated; do not edit manually.logs_available(boolean): Iftrue, allows log tools (read_logs,tail_logs,grep_logs,get_recent_errors) for this service. Iffalse, these tools are blocked; the AI only sees logs you paste or embed.code_available(boolean): Iftrue, allows code tools (read_file,grep_search) for this service. Iffalse, the AI cannot read or search code for this service.
-
Development:
-
Production:
Environment variables
OnCall CLI also respects a small number of environment variables for advanced configuration:- Cluster server configuration:
ONCALL_CLUSTER_URL— WebSocket URL for the local cluster server. Default:ws://127.0.0.1:4466ONCALL_WS_PORT— Port used by the cluster server when runningoncall cluster.ONCALL_WS_HOST— Host used by the cluster server when runningoncall cluster.
Settings precedence
When the CLI runs a command (for example,oncall npm run dev), it loads configuration in this order:
- Environment variables (if set).
~/.oncall/configfor user‑level values likeAPI_KEY.oncall.yamlin the current working directory for service‑level behavior.
oncall.yaml always controls per‑service access to logs and code, regardless of any environment variables.
Best practices
- One
oncall.yamlper service – Check this file into source control so your team shares the same description, project ID, and access flags. - Separate keys per environment or team – Use distinct API keys in
~/.oncall/configon different machines/environments so dashboard usage is naturally segmented. - Align flags with risk level – Enable full access (logs + code) in development to get the richest assistance. Restrict code access in production and other sensitive environments.
- Keep settings simple – Prefer using
oncall init,oncall login, and editingoncall.yamlover introducing many custom environment overrides—this keeps your setup easier to understand for the whole team.