Before you begin
Make sure you have:- Node.js 18+ installed.
- API key from OnCall Web Studio (stored in
~/.oncall/config). - A project directory to run commands in.
- Ability to run
oncall clusterin a separate terminal.
Step 1: Install OnCall‑Cli
Step 2: Initialize your project
- Creates
oncall.yamlwithid,window_id, and access flagslogs_available/code_available. - Use the same
idacross services to group them into one cluster.
Step 3: Log in
- Stores
API_KEYin~/.oncall/config.
Step 4 : Start the cluster server
Run this in a separate terminal if you have multiple services:- Keeps a local registry so the AI can see all services sharing the same project
id.
Step 5: Run your first AI‑assisted session
- Command runs in a pseudo‑terminal; logs stream live.
- CLI opens a WebSocket to the backend with your
API_KEY+window_id. - You get a split UI: logs on the left, AI chat on the right.
Step 6: Ask your first question
Type in the chat pane:- “What’s causing this error?”
- “Why are API requests failing?”
- “What just happened?”
- Logs:
tail_logs,grep_logs,get_recent_errors,read_logs(requireslogs_available: true) - Code:
read_file,grep_search(requirescode_available: true)
Step 7: Iterate quickly
Ctrl+Rreset chatCtrl+Dcycle views (split → full chat → full logs)Tabswitch focus;↑/↓scroll focused paneCtrl+Lclear logs;Ctrl+Kclear chat