---
title: "CLI overview"
description: "The lookio command-line interface lets you import resources, build assistants and ask questions from a terminal, a CI job or a coding agent."
canonical: "https://lookio.app/docs/developers/cli/overview"
updated: "2026-11-08"
---

# CLI overview

The `lookio` command is a thin layer over the [REST API](/docs/developers/api), for your machine or your CI. When its output is not a terminal, it prints JSON.

## Install

The package is `@lookio/cli` on npm. It needs Node.js 20 or later. To set up Lookio from an AI agent, see [Connect an AI agent](/docs/get-started/connect-an-agent).

```bash
npm install --global @lookio/cli
lookio --help
```

Or run it without installing:

```bash
npx @lookio/cli account
```

The command is `lookio`. Do not use the `lookio-cli` package: it is the old CLI, for the old API.

## Sign in and check the connection

```bash
lookio auth login        # opens your browser and stores a token in your OS keychain
lookio account           # the workspace, the plan, the credit balance and what this credential may do
lookio doctor            # connectivity, credential, CLI version and clock skew
```

For a CI job, use an API key instead of a browser: see [Authentication](/docs/developers/cli/authentication).

## Your first questions

```bash
lookio resources add-url https://example.com/pricing --tags pricing
lookio resources get RESOURCE_ID          # repeat until status is ready or failed

lookio assistants create --name "Support" --follow-tags pricing
lookio ask ASSISTANT_ID "How much does the Pro plan cost?"
```

> **Info: Only ask and search spend credits**
>
> `lookio ask` spends 30 credits in Flash (the default), 10 in Eco, 80 in Deep, also when it finds nothing. `lookio search` spends 1 credit. All other commands are free. An assistant that reads no resource is refused for free (`assistant_has_no_resources`, exit code 6).

## Imports do not wait

`resources add-text`, `add-url`, `add-file`, `sites add` and `resources reindex` return at once, with a `queued` resource. Poll `lookio resources get` until `status` is `ready` or `failed`.

## Global flags

Put them before or after the subcommand.

| Flag                           | Effect                                                                        |
| ------------------------------ | ----------------------------------------------------------------------------- |
| `--output json\|table\|ndjson` | The output format. JSON when stdout is not a terminal, a table in a terminal. |
| `--json`                       | Short for `--output json`.                                                    |
| `--profile <name>`             | Which stored credential to use.                                               |
| `--no-retry`                   | Do not retry on `429` or `5xx`.                                               |
| `--timeout <seconds>`          | Stop one request after this time. Default 60.                                 |

## Where to go next

[**Authentication**](/docs/developers/cli/authentication)

Browser, device and API key sign-in, profiles, where credentials live.

[**Commands**](/docs/developers/cli/commands)

Every command, with examples.

[**Automation**](/docs/developers/cli/automation)

JSON output, polling, retries and CI.

[**Exit codes**](/docs/developers/cli/exit-codes)

What each code means, including 7 for out of credits.
