---
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/cli/overview"
updated: "2026-11-03"
---

# CLI overview

The `lookio` command is a thin layer over the [REST API](/docs/api/overview). It runs on your machine or in your CI, holds no secret of Lookio's, and prints JSON automatically whenever its output is not a terminal. It requires Node.js 20 or newer.

## Install

The package is `@lookio/cli` on npm. It needs Node.js 20 or later. Setting Lookio up 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 binary is called `lookio`. The `lookio-cli` package that is already on npm is the previous generation: it talks to the previous API and has different commands. Do not use it for these pages.

## 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/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 spends credits**
>
> `lookio ask` is the only command that spends credits: 30 in Flash (the default), 10 in Eco and 80 in Deep, whatever the length of the answer and even when nothing is found. An assistant that reads no resource is refused first (`assistant_has_no_resources`, exit code 6) and costs nothing. Importing, reading and editing are free.

## Imports do not wait

`resources add-text`, `add-url`, `add-file`, `sites add` and `resources reindex` return at once with a resource in `queued`. Lookio reads it in the background. Poll `lookio resources get` until `status` is `ready` or `failed`. Both are final.

## Global flags

You can write these 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>`          | Give up on one request after this long. Default 60.                           |

## Where to go next

- [Authentication](/docs/cli/authentication): browser, device and API key sign-in, profiles and where credentials are stored.
- [Commands](/docs/cli/commands): every command.
- [Automation](/docs/cli/automation): JSON output, polling, retries and CI.
- [Exit codes](/docs/cli/exit-codes), including `7` for out of credits.
