| summary | Kilo provider data sources: app.kilo.ai API token and CLI auth-file fallback. | |||
|---|---|---|---|---|
| read_when |
|
Kilo supports API and CLI-backed auth. Source mode can be auto, api, or cli.
- API (
api)- Token from
~/.codexbar/config.json(providers[].apiKeyforkilo) orKILO_API_KEY. - Calls
https://app.kilo.ai/api/trpc.
- Token from
- CLI session (
cli)- Reads
~/.local/share/kilo/auth.jsonand useskilo.access. - Requires a valid CLI login (
kilo login).
- Reads
- Auto (
auto)- Tries API first.
- Falls back to CLI only when API credentials are missing or unauthorized (401/403).
- Preferences -> Providers -> Kilo:
- Usage source:
Auto,API,CLI - API key: optional override for
KILO_API_KEY
- Usage source:
- In auto mode, resolved CLI fetches can show a fallback note in menu and CLI output.
- Kilo text output splits identity into
Plan:andActivity:lines. - Auto-mode failures include ordered fallback-attempt details in text mode.
- Missing API token: set
KILO_API_KEYor providerapiKey. - Missing CLI session file: run
kilo loginto create~/.local/share/kilo/auth.json. - Unauthorized API token (401/403): refresh
KILO_API_KEYor rerunkilo login.
CodexBar can show usage for any Kilo organization the API key belongs to.
- Open Preferences → Providers → Kilo, set the API key, then click Refresh organizations.
- Toggle the organizations you want to display alongside Personal. Personal is always shown.
- When at least one organization is enabled, the menu renders one Kilo card per enabled scope.
- The CodexBar fetcher sends the standard
X-KILOCODE-ORGANIZATIONIDheader on every usage call to scope the response to that organization. - CLI source mode (
auth.json): the header is applied to CLI-resolved tokens as well. If a CLI token isn't authorized for the chosen organization, that card surfaces an unauthorized error while Personal and other enabled scopes continue to render normally.