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

# Quickstart

> From install to your first health check in under 2 minutes

## Prerequisites

* Python 3.9+
* A running Redis instance
* Celery 5.2+ workers (they don't need to be healthy — Kanari will tell you if they're not)

***

## 1. Install

```bash theme={null}
pip install kanari
```

***

## 2. Generate a config file

```bash theme={null}
kanari init
```

This creates `kanari.yaml` in the current directory with sensible defaults. If `REDIS_URL` or `CELERY_BROKER_URL` are already set in your environment, those values are written into the file automatically. The command also pings Redis and reports whether it's reachable:

```
✅ Created kanari.yaml
   Redis detected at redis://localhost:6379/0

   Next steps:
   kanari doctor        # verify connectivity first
   kanari audit         # one-shot health check
```

Open `kanari.yaml` and update `redis_url` / `celery_broker_url` if needed, then continue.

***

## 3. Verify your setup

```bash theme={null}
kanari doctor
```

Checks that the required libraries are installed, Redis is reachable, and your Celery workers are responding. If anything is wrong, it tells you exactly how to fix it. Automatically loads `kanari.yaml` if it's in the current directory.

Fix what `doctor` reports before running `audit`.

***

## 4. Run a health check

```bash theme={null}
kanari audit
```

```
🔍 Kanari Audit
════════════════════════════════════════════════════════════

✅ System: HEALTHY

Infrastructure
  ✅ Redis: connected
  ✅ Celery: connected (3 workers)

Workers
  Status   Worker       Slots   Note
  ✅       api-worker   2/8     online
  ✅       email-wrk    1/4     online
  ⚠️       job-worker   4/4     at capacity

Queues
  Status   Queue     Pending   Latency
  ✅       celery    3         unknown
  ✅       default   0         0s
  ✅       emails    12        unknown

Metrics
  📊 Saturation: 43.8% (7/16 slots, headroom: 9 slots)
  ⏱️  Max Latency: unavailable — enable with: KanariStampPlugin.install(app)
  📋 Total Pending: 15 tasks

════════════════════════════════════════════════════════════
✅ All systems healthy
Audit completed in 1.2s
```

That's it for local monitoring. No account, no external service beyond what you already have.

> **Tip:** If `kanari.yaml` is in your current directory, all commands load it automatically — no `--config` flag needed. If the file is somewhere else, use `kanari audit --config /path/to/kanari.yaml`.

***

## 5. Connect to Kanari for alerts (optional)

To get Slack and email alerts when something breaks, connect the agent to your Kanari account:

```bash theme={null}
kanari login
```

Enter your email, click the magic link, and your API key is saved automatically.

Then configure where to send alerts:

```bash theme={null}
kanari alerts configure --slack-webhook https://hooks.slack.com/...
kanari alerts configure --email you@company.com
```

Then run the continuous monitoring agent:

```bash theme={null}
kanari agent
```

The agent runs in the background, collects metrics every 15 seconds, and sends you alerts the moment something goes wrong.

***

## Next steps

<CardGroup cols={2}>
  <Card title="kanari doctor" icon="stethoscope" href="/docs/commands/doctor">
    Diagnose connection issues, missing libraries, and config errors in one command.
  </Card>

  <Card title="Enable latency tracking" icon="clock" href="/docs/guides/latency-tracking">
    Add one line to your Celery app to measure real queue wait times.
  </Card>

  <Card title="Run a deep audit" icon="microscope" href="/docs/guides/deep-audit">
    Check your Redis and Celery configuration for common misconfigurations.
  </Card>

  <Card title="CI/CD integration" icon="code-branch" href="/docs/guides/cicd">
    Use exit codes to fail your pipeline when Celery issues are detected.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.