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

# CLI Overview

> Install and use the Trilo CLI to manage tasks, pages, projects, events, and messages from your terminal

The Trilo CLI (`trilo`) lets you interact with your workspace directly from the terminal. List tasks, send messages, create pages, trigger workflows — all without opening a browser.

## What You Can Do

```bash theme={null}
trilo tasks list --status in_progress --json
trilo messages send --content "Deploy complete" --project-id <id> --sender-id <id>
trilo workflows run --page-id <id>
trilo projects list --json | jq '.[].name'
```

| Category      | Commands                          |
| ------------- | --------------------------------- |
| **Tasks**     | `list`, `get`, `create`, `update` |
| **Pages**     | `list`, `get`, `create`           |
| **Projects**  | `list`, `get`                     |
| **Events**    | `list`, `create`                  |
| **Members**   | `list`                            |
| **Messages**  | `send`, `send-direct`, `list`     |
| **Workflows** | `run`, `status`, `continue`       |

## Quick Start

<Steps>
  <Step title="Install">
    The CLI runs via [Bun](https://bun.sh). From the Trilo monorepo:

    ```bash theme={null}
    cd packages/cli && bun link
    ```
  </Step>

  <Step title="Authenticate">
    ```bash theme={null}
    trilo login
    ```

    This opens your browser to authorize the CLI. Your token is stored securely in `~/.config/trilo/`.
  </Step>

  <Step title="Use it">
    ```bash theme={null}
    trilo tasks list
    trilo projects list --json
    ```
  </Step>
</Steps>

## Authentication Methods

<CardGroup cols={2}>
  <Card title="Browser Login (OAuth)" icon="globe">
    Run `trilo login` to authenticate via your browser. Tokens auto-refresh when expired.
  </Card>

  <Card title="Personal Access Token" icon="key" href="/developers/cli/authentication">
    Set `TRILO_TOKEN` env var for CI/CD and scripting. Create tokens in workspace settings.
  </Card>
</CardGroup>

## Output Formats

The CLI auto-detects your context:

* **Interactive terminal** — human-readable tables
* **Piped** (`trilo tasks list | jq`) — auto-switches to JSON
* **`--json` flag** — forces JSON in all contexts

This makes the CLI composable with standard Unix tools like `jq`, `grep`, and `awk`.
