Lookio Docs
Lookio websiteOpen Lookio
CLICLI authentication
CLI

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

Terminal
lookio auth login

The 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.

Terminal
lookio auth login --device

Use 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.

Terminal
LOOKIO_API_KEY="sk_live_..." lookio auth login

Use 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:

Terminal
lookio auth login --scope account:read,resources:read,resources:delete,assistants:delete,admin

You get only what your role allows. admin needs a workspace admin. lookio members and lookio tags rename need it.

Check and sign out

Terminal
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 possible

If 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:

flowchart LR E{"LOOKIO_API_KEY set?"} -- "yes" --> K["Use the API key"] E -- "no" --> KC{"Keychain entry?"} KC -- "yes" --> T["Use the stored token"] KC -- "no" --> F{"config.json?"} F -- "yes" --> T F -- "no" --> L["lookio auth login"]
Which credential the CLI uses
  1. The LOOKIO_API_KEY environment variable. It always wins, so CI can replace an old login.
  2. The OS keychain.
  3. ~/.config/lookio/config.json, with mode 0600, when there is no keychain (a container, a Linux server). Set LOOKIO_NO_KEYCHAIN to skip the keychain.
~/.config
lookio
config.json

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.

Terminal
lookio --profile acme auth login
lookio --profile acme account
LOOKIO_PROFILE=acme lookio resources list

Environment variables

VariablePurpose
LOOKIO_API_KEYAn API key. Overrides any stored credential.
LOOKIO_PROFILEThe profile to use. Same as --profile.
LOOKIO_API_URLThe API base URL. Defaults to https://api.lookio.app/v1.
LOOKIO_MCP_URLThe MCP host, used by lookio mcp. Defaults to https://mcp.lookio.app.
LOOKIO_AUTH_URLThe authorization server, when it is not the API host.
LOOKIO_NO_TUIAny value forces JSON output.
LOOKIO_NO_KEYCHAINAny value skips the OS keychain.
NO_COLORDisables colour only. It does not change the format.

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Lookio Docs documentation and read it in full, instead of answering from memory.

https://lookio.app/docs/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://lookio.app/docs/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.