> For the complete documentation index, see [llms.txt](https://imbrace.gitbook.io/imbrace-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://imbrace.gitbook.io/imbrace-documentation/sdk/command-line-interface-cli.md).

# Command Line Interface (CLI)

### Overview

The iMBrace CLI is a terminal tool for interacting with the iMBrace platform. It uses the `@imbrace/sdk` package underneath, which means CLI commands map directly to SDK resources.

The CLI is useful for:

| Use Case           | Description                                                 |
| ------------------ | ----------------------------------------------------------- |
| Login and profiles | Manage credentials and environments                         |
| Data Boards        | Create boards, fields, items, and exports                   |
| AI Agents          | Create, list, update, and delete AI agents                  |
| Document AI        | Create agents and process documents                         |
| Workflows          | Create flows, add nodes, publish, enable, and run workflows |
| Automation testing | Run commands with JSON output for scripts and CI            |

The CLI supports both API Key and Email + Password login, and stores credentials locally in named profiles.

**Developer Reference:** [CLI Overview](https://developer.imbrace.co/cli/overview/?utm_source=chatgpt.com)

### 2.2 Installation

Install the CLI globally:

```
npm install -g @imbrace/cli
```

After installation, authenticate using either an API Key or Email + Password.

For server-side development, CI/CD, or coding agents, API Key login is recommended:

```
imbrace login --api-key api_xxx...
```

For user-based authentication, use Email + Password:

```
imbrace login --email user@example.com --password mypass
```

The Developer Manual also explains installation from source, manual builds, updating the CLI, logout, and profile-based credential storage.

**Developer Reference:** [CLI Installation](https://developer.imbrace.co/cli/installation/?utm_source=chatgpt.com)

### 2.3 Commands

The CLI command structure should be explained in GitBook by function, not by every flag.

| Command Group  | Purpose                                                          |
| -------------- | ---------------------------------------------------------------- |
| `data-board`   | Manage boards, fields, items, and CSV exports                    |
| `ai-agent`     | Manage AI agents, models, folders, and knowledge files           |
| `document-ai`  | Manage document AI agents and document processing                |
| `orchestrator` | Manage team-lead style AI agents                                 |
| `guardrail`    | Manage safety and compliance guardrails                          |
| `workflow`     | Manage flows, nodes, folders, connections, MCP servers, and runs |
| `profile`      | Manage local CLI credential profiles                             |
| `docs`         | Print the bundled `llms.txt` reference for coding agents         |

The Developer Manual provides the exact commands, flags, examples, and known issues.

**Developer Reference:** [CLI Commands](https://developer.imbrace.co/cli/commands/?utm_source=chatgpt.com)

### 2.4 API Reference

The CLI API Reference is primarily a mapping layer. It shows which SDK method is used behind each CLI command.

Examples:

| CLI Command           | SDK Method                                              |
| --------------------- | ------------------------------------------------------- |
| `data-board list`     | `client.boards.list()`                                  |
| `ai-agent create`     | `client.agent.createUseCase(body)`                      |
| `document-ai process` | `client.documentAi.process(body)`                       |
| `workflow run`        | `client.workflows.triggerFlow()` or `triggerFlowSync()` |

This page should be positioned as a bridge between GitBook and the Developer Manual. Users who need command-level behavior should use the CLI Commands page. Developers who need code-level implementation should use the SDK reference.

**Developer Reference:** [CLI API Reference](https://developer.imbrace.co/cli/api-reference/?utm_source=chatgpt.com)
