Skip to main content

Overview

kanari login authenticates you with the Kanari backend via a magic link sent to your email. After verification, the API key is saved automatically to ~/.kanari/config so you don’t need to set environment variables manually.

How it works

  1. You enter your email address
  2. Kanari sends you a magic link
  3. You click the link in your email — the browser shows “Verified!”
  4. The terminal receives the confirmation and saves your API key

Flags


After login

Once authenticated, all Kanari commands automatically use the saved API key — no need to set KANARI_API_KEY or pass --token:
The saved config is at ~/.kanari/config and is readable only by your user (chmod 600):

Re-authenticating

If you need a new API key, just run kanari login again. The existing ~/.kanari/config will be overwritten.

Key resolution order

When running any Kanari command, the API key is resolved in this order:
  1. --token flag (explicit override)
  2. KANARI_API_KEY environment variable
  3. ~/.kanari/config (saved by kanari login)
  4. api_key field in your kanari.yaml