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

# DinoAI CLI

> Use the Paradime CLI to interact with DinoAI programmable agents from your terminal: start chats, send one-shot prompts, resume sessions, and stream replies.

> [!NOTE]
>
> **Prerequisites:**
>
> * This feature is available with the [**Paradime DinoAI plan**](https://www.paradime.io/pricing)**.**
> * Your API keys ***must*** have DinoAI Agent capabilities.
> * Programmable agents are defined as YAML files under `.dinoai/agents/<name>.yml` in your workspace repository.

### Talk to a DinoAI Agent

Using the Paradime CLI, you can talk to a DinoAI programmable agent directly from your terminal.

The `paradime dinoai` command supports two modes:

* **Interactive** — drop into a chat-style REPL and have a multi-turn conversation with the agent.
* **One-shot** — pass `--message` (or pipe a message via `stdin`), wait for the response, and exit.

In both modes, agent messages are streamed to the terminal as they arrive, rendered as markdown.

#### CLI command

```bash theme={"system"}
paradime dinoai
```

#### Options

| Flag | Short | Type | Description |
| - | - | - | - |
| `--agent` | `-a` | *`Optional, TEXT`* | Named agent under `.dinoai/agents/<name>.yml`. Omit to use an ad-hoc agent. |
| `--message` | `-m` | *`Optional, TEXT`* | Opening message. **When provided, runs a single turn and exits** (no interactive prompt). |
| `--session` | `-s` | *`Optional, TEXT`* | Resume an existing session by ID. The full conversation history is replayed first. |
| `--help` | | | Show CLI command options and exit. |

> [!NOTE]
>
> **Session lifetime:** A DinoAI session pod stays alive for 24 hours after its last activity. Use `--session <id>` to rejoin within that window — the agent retains full conversation context.

#### Examples

> [tab] Start an interactive chat
>
> > [!NOTE]
> >
> > Open an interactive prompt against a named agent. Each turn is sent to the agent and the streamed response is rendered in your terminal. Press Ctrl-C or submit an empty line to exit.
>
> **CLI command**
>
> ```bash theme={"system"}
> paradime dinoai --agent data-quality-checker
> ```
>
> **Example output**
>
> ```
> Session xwzdneft6emspe0f
> ╭──────────────────────────────────────────────────────────────────────────────╮
> │ dinoai  data-quality-checker                                                 │
> │ Session xwzdneft6emspe0f  ·  blank line or Ctrl-C to exit                    │
> ╰──────────────────────────────────────────────────────────────────────────────╯
> > Which models have no tests?
> ⠹ DinoAI is thinking… (RUNNING, 0:08)
> ```

> [tab] One-shot: send a message and exit
>
> > [!NOTE]
> >
> > Pass `--message` to run a single turn — the CLI triggers the agent, streams the response, and exits. Useful for ad-hoc questions or shell aliases.
>
> **CLI command**
>
> ```bash theme={"system"}
> paradime dinoai --agent data-quality-checker --message "Which models have no tests?"
> ```
>
> **Example output**
>
> ```
> Session a71bc0mr6owuzb2r
>
> Here are the models without tests in your project:
>
> 🔴 No YAML file = No tests defined
>   • stg_f1__constructor_results
>   • stg_f1__driver_standings
>   • dim_f1__driver
>   ...
> ```

> [tab] One-shot: pipe a message via stdin
>
> > [!NOTE]
> >
> > When `stdin` is piped and no `--message` is passed, the CLI reads the message from `stdin`, runs a single turn, and exits. Useful in scripts and CI.
>
> **CLI command**
>
> ```bash theme={"system"}
> echo "Summarize today's failed dbt runs" | paradime dinoai --agent data-quality-checker
> ```

> [tab] Resume an existing session
>
> > [!NOTE]
> >
> > Use `--session <id>` to pick up where you left off. The CLI fetches the full conversation history, prints it back, and drops you into the interactive prompt for the next turn.
>
> **CLI command**
>
> ```bash theme={"system"}
> paradime dinoai --session xwzdneft6emspe0f
> ```

> [tab] Resume and send a follow-up (one-shot)
>
> > [!NOTE]
> >
> > Combine `--session` with `--message` to send one follow-up to an existing session and exit — the history is not replayed, only the new exchange is rendered.
>
> **CLI command**
>
> ```bash theme={"system"}
> paradime dinoai --session xwzdneft6emspe0f --message "Now generate the missing YAML files"
> ```

### Aborting and rejoining a run

If a run is taking too long, you can press **Ctrl-C** at any point. This aborts only the **local view** — the agent run continues server-side. The CLI prints the session ID and the command needed to rejoin:

```
↩ aborted local view — run still RUNNING server-side.
  Rejoin with: paradime dinoai --session xwzdneft6emspe0f
```

You can then re-attach later (within the 24-hour session window) and resume streaming as soon as the agent emits new messages.

### Tool calls and start-up progress

From SDK 6.8.0, the CLI shows what the agent does between your question and its answer:

* Each finished tool call prints as one line, for example `↳ Ran a SQL query: SELECT race_year, COUNT(*) AS wins FROM …`. Tool outputs aren't printed. Text the agent writes still streams as messages.
* While the agent pod boots, the spinner shows the current start-up step instead of `QUEUED`.
* A rejoined session (`--session`) shows only the tool calls that come after it reconnects.

### Spinner status meanings

While a run is in flight, the CLI shows a single-line spinner labelled with the current run status and elapsed time:

```
⠹ DinoAI is thinking… (RUNNING, 0:08)
```

The status field can be one of:

| Status | Meaning |
| - | - |
| `QUEUED` | The run has been accepted by the backend and is waiting for an agent pod. |
| `RUNNING` | The agent is actively processing your message. |
| `WAITING` | The previous turn already returned `COMPLETED`; the backend is still transitioning the run state for your follow-up message. |
| `COMPLETED` | Terminal — the agent finished and produced a response. |
| `FAILED` | Terminal — the run did not complete successfully. The CLI prints the last error message. |


## Related topics

- [Paradime CLI](https://docs.paradime.io/developers/paradime-cli/index.md)
- [DinoAI in the Code IDE](https://docs.paradime.io/products/code-ide/write-code/dinoai.md)
- [Run DinoAI Background Agent](https://docs.paradime.io/products/bolt/creating-schedules/command-settings/paradime-dinoai-agent-trigger.md)
- [DinoAI](https://docs.paradime.io/products/dino-ai/index.md)


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