CLI authentication
Sign the lookio CLI in with a browser, a device code or an API key, choose scopes, use several profiles and know where credentials are stored.
The CLI uses the same two credentials as the API: a personal connection (OAuth) and a workspace API key. See Authentication.
Sign in
lookio auth loginThe CLI opens Lookio. You approve the workspace and the permissions. The CLI stores the token. Use this for a person: the connection has your identity and keeps your conversations.
lookio auth login --deviceUse it over SSH, or in a container without a browser. The CLI prints an address and a code. Open the address on any device and type the code.
LOOKIO_API_KEY="sk_live_..." lookio auth loginUse a workspace key for CI or a server. --key also works, but your shell history then keeps the key. Use the environment variable. If a key leaks, rotate it.
The CLI tests the credential with GET /v1/account before it stores it.
Which permissions the CLI asks for
A browser or device login asks for the Editor set: account:read, usage:read, resources:read, resources:write, assistants:read, assistants:write and query. It does not ask for resources:delete, assistants:delete or admin, so this login deletes nothing.
To ask for other scopes, pass --scope:
lookio auth login --scope account:read,resources:read,resources:delete,assistants:delete,adminYou get only what your role allows. admin needs a workspace admin. lookio members and lookio tags rename need it.
Check and sign out
lookio auth status # workspace, plan, credential kind, scopes and when the token expires
lookio auth logout # forgets the credential and revokes it on the server when possibleIf LOOKIO_API_KEY is still set, the CLI keeps using it after you sign out. logout warns you.
Credential order
The CLI uses the first credential it finds, in this order:
- The
LOOKIO_API_KEYenvironment variable. It always wins, so CI can replace an old login. - The OS keychain.
~/.config/lookio/config.json, with mode0600, when there is no keychain (a container, a Linux server). SetLOOKIO_NO_KEYCHAINto skip the keychain.
~/.config
lookio
XDG_CONFIG_HOME moves the config directory.
The CLI renews the access token with its refresh token. If the connection was revoked, the CLI forgets it and asks you to sign in again.
Profiles
A profile is a named stored credential, for example one per workspace.
lookio --profile acme auth login
lookio --profile acme account
LOOKIO_PROFILE=acme lookio resources listEnvironment variables
| Variable | Purpose |
|---|---|
LOOKIO_API_KEY | An API key. Overrides any stored credential. |
LOOKIO_PROFILE | The profile to use. Same as --profile. |
LOOKIO_API_URL | The API base URL. Defaults to https://api.lookio.app/v1. |
LOOKIO_MCP_URL | The MCP host, used by lookio mcp. Defaults to https://mcp.lookio.app. |
LOOKIO_AUTH_URL | The authorization server, when it is not the API host. |
LOOKIO_NO_TUI | Any value forces JSON output. |
LOOKIO_NO_KEYCHAIN | Any value skips the OS keychain. |
NO_COLOR | Disables colour only. It does not change the format. |