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

# Fluent CLI

> Run Fluent agents interactively or from automation.

Install the CLI from npm. Node.js 20 or newer is required.

```bash theme={null}
npm install --global @fluenterp/cli
```

## Commands

```text theme={null}
fluent auth login
fluent auth logout
fluent auth status [--json]
fluent agents list [--json]
fluent runs create --agent <id-or-name> [options]
fluent runs create --conversation <id> --message <text> [--wait] [--json]
fluent runs get <run-id> [--json]
fluent runs list [options]
fluent runs watch <run-id> [--json]
```

`runs create` supports:

| Option | Description |
| - | - |
| `--file <path>` | Foreground file; repeat for multiple files |
| `--background-file <path>` | Tool-accessible background file; repeat as needed |
| `--message <text>` | Instruction for the agent |
| `--conversation <id>` | Continue an existing interactive chat |
| `--together` | Process foreground files in one conversation |
| `--notification-email <email>` | Email when processing finishes |
| `--wait` | Poll until the run reaches a terminal status |
| `--json` | Emit machine-readable output |

`runs list` accepts `--agent`, `--status`, `--limit`, and `--offset`.

## Continue a conversation

```bash theme={null}
fluent runs create --conversation "$CONVERSATION_ID" \
  --message "Use the 24 inch conveyor" --json
```

The conversation determines the agent and supplies its saved history. This mode
always waits for the current chat turn and returns assistant and tool messages;
`--wait` is accepted too. Tools may launch background work that finishes later.
Chat errors produce a non-zero exit code.

Supply `--message` and omit `--agent`, file options, `--together`, and
`--notification-email`. No new background run is created. Pending questions and
approval requests appear in the tool messages; the command does not submit form
answers or grant approvals.

## Authentication and environments

Use `fluent auth login` for interactive OAuth. For unattended use, set `FLUENT_API_KEY` or pass `--api-key`.

The CLI defaults to `https://www.fluenterp.com`. Set `FLUENT_BASE_URL` or pass `--base-url` only when intentionally targeting a different Fluent environment.

## CI example

```yaml theme={null}
- name: Install CLI
  run: npm install --global @fluenterp/cli

- name: Run Fluent agent
  env:
    FLUENT_API_KEY: ${{ secrets.FLUENT_API_KEY }}
  run: fluent runs create --agent "$AGENT_ID" --file invoice.pdf --wait --json
```

Create a separate API key for each automation so it can be audited and revoked independently.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.