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

# CLI walkthrough (human & agent)

> The same journey driven from the terminal - and how an AI agent runs it without ever blocking.

## As a human (TTY)

```bash theme={null}
engini login --api-key eng_…              # store the credential
engini whoami                              # verify

engini applications list --available       # what can I connect?
engini connect monday                      # guided: credentials/OAuth, check, objects

engini tools list --application monday     # what can I run?
engini tools get monday_create_item        # read the input schema
engini tools call monday_create_item --args '{"name":"My first item"}'
```

Interactive prompts handle auth-method choice, credential fields, OAuth browser hand-off, and object selection.

## As an agent (piped / non-TTY)

Same commands - but nothing ever blocks. Output is JSON automatically, exit codes are stable, and `connect` returns **resumable gates** instead of prompting:

```bash theme={null}
engini connect monday --json
# exit 5 -> {"need":"fields", "fields":[...], "resume":"engini connect monday --auth 0 --field ApiKey=<value>"}

# the agent asks its user for the value, then runs the resume command verbatim:
engini connect monday --auth 0 --field ApiKey=<key>
# -> creates -> checks -> refreshes -> {"connection_id": 42, "is_alive": true, ...}
```

OAuth apps never open a browser for an agent - the gate returns `sign_in_url` + `state` to show the user, then `engini connect <app> --oauth-state <state>` finishes the job.

Big results become handles instead of flooding the context window:

```bash theme={null}
engini tools call list_rows --args '{}'            # -> handle h42 + shape preview
engini tools result h42 --select items.email       # extract just what you need
engini tools result h42 --fields id,name --limit 10
```

And results can come back already shaped for an LLM conversation:

```bash theme={null}
engini tools call monday_create_item --args '{}' --llm anthropic --tool-call-id call_1
```

Preview any mutation first with `--dry-run`; discover any command's arguments with `--schema`. The full contract (exit codes, output modes, gate payloads): [machine contract](/cli/machine-contract).
