> ## Documentation Index
> Fetch the complete documentation index at: https://docs.engini.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI overview

> The engini CLI - install, authenticate, discover, connect, and execute from the terminal.

The `engini` CLI is **machine-first**: human-readable output on a TTY, JSON when piped or with `--json`, stable exit codes, and agent-resumable flows. Two distributions, identical behavior:

<CodeGroup>
  ```bash npm theme={null}
  npm install -g @engini/cli
  ```

  ```bash pip theme={null}
  pip install 'engini[cli]'
  ```
</CodeGroup>

## Commands at a glance

```
engini login | logout | whoami            # auth
engini tools list | get | call | result   # discover, execute & drill into results
engini applications list | get            # browse connector apps
engini connect [<app>]                    # create a connection (interactive / agent-resumable)
engini connections list | get             # inspect connections
engini connections create | delete | check | refresh | objects | select-objects   # primitives
engini connections sign-in-url | oauth-complete   # OAuth2 start / finish primitives
```

## Quickstart

```bash theme={null}
engini login --api-key eng_…              # or run interactively on a TTY
engini applications list --available      # discover connector apps
engini tools list --application monday    # discover tools
engini connect monday                     # create a connection (guided)
engini tools call monday_create_item --args '{}' --connection 3
engini tools call gmail_send_mail --args '{}' --file attachmentsarray=@report.pdf
engini tools result <handle> --select items.email   # drill into a large result
```

## Universal flags

Every command accepts:

| Flag        | Effect                                                                                              |
| ----------- | --------------------------------------------------------------------------------------------------- |
| `--json`    | Pretty JSON output (JSON is also automatic when output is piped)                                    |
| `--quiet`   | Suppress non-essential output                                                                       |
| `--schema`  | Print the command's argument/output schema as JSON - agents introspect instead of parsing help text |
| `--dry-run` | On mutating commands: preview what would happen without executing                                   |

## Authentication & configuration

Two ways to authenticate:

* **`engini login --api-key eng_…`** - stores the credential in a `0600` TOML config file (`~/.config/engini/config.toml`; `%APPDATA%\engini\config.toml` on Windows), alongside `api_url` (default `https://api.engini.io`).
* **Environment variables** - `ENGINI_API_KEY` (preferred) or `ENGINI_API_TOKEN`; no login needed. Useful for CI and agents.

Verify with `engini whoami` (exit code `3` means the credential is missing/invalid). Point at another environment with `engini login --api-url <url>`. What the two credential types mean: [Authentication](/concepts/authentication).

## Errors & big results

* Failures print a structured JSON error (with a `hint` where applicable) and exit with a **stable code** - `2` usage, `3` auth, `4` not found, `5` needs-input, `124` timeout. Full table: [machine contract](/cli/machine-contract).
* API rate limiting surfaces as an error - honor `Retry-After` per the [rate-limit rules](/concepts/pagination-and-errors).
* List commands return **complete** results (pagination is handled for you). Large tool outputs become a **result handle** - drill in with `engini tools result <handle>` instead of re-fetching.

Full per-command reference: [CLI commands](/cli/commands).
