> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oncall.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Welcome to OnCall CLI! This quickstart gets you using AI‑powered debugging in minutes—install, initialize, log in, run your first AI‑assisted session, and iterate with the built‑in tools.

# Quickstart

### Before you begin

Make sure you have:

* Node.js 20+ installed.
* API key from OnCall Web Studio (stored in `~/.openbug/config`).
* A project directory to run commands in.
* Ability to run  `debug`  in a separate terminal.

### Step 1: Install OpenBug

```bash theme={null}
npm install -g @openbug/cli
```

### Step 2: Log in

```bash theme={null}
debug login <your-api-key>
```

* Stores `API_KEY` in `~/.openbug/config`.

### Step 3 : Start the OpenBug Cli Interface

Run this in a separate terminal if you have multiple services:

```bash theme={null}
debug
```

* Keeps a local registry so the AI can see all services sharing the same project `id`.

### Step 5: Run your first AI-assisted session

```bash theme={null}
debug npm run dev
# or
debug python app.py
# or
debug docker-compose up
```

What happens:

* 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?”

The CLI sends your question plus recent logs (and cluster architecture if available). The AI may call local tools:

* Logs: `tail_logs`, `grep_logs`, `get_recent_errors`, `read_logs` (requires `logs_available: true`)
* Code: `read_file`, `grep_search` (requires `code_available: true`)

### Step 7: Iterate quickly

* `Ctrl+R` reset chat
* `Ctrl+D` cycle views (split → full chat → full logs)
* `Tab` switch focus; `↑/↓` scroll focused pane
* `Ctrl+L` clear logs; `Ctrl+K` clear chat

### **Minimal “hello” run**

> #### *Launch OpenBug Interface*

```bash theme={null}
debug login <your-api-key>
debug
```

> #### Run Command (in new terminal)

```
debug node -e "console.log('hello from openbug')"
```

Then ask in chat: “What did this command output?”
