> ## 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 interactive chats, send one-shot prompts, resume sessions, and stream agent responses in real time.

<Info>
  **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.
</Info>

### 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.                                                        |

<Info>
  **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.
</Info>

#### Examples

<Tabs>
  <Tab title="Start an interactive chat">
    <Info>
      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.
    </Info>

    **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>

  <Tab title="One-shot: send a message and exit">
    <Info>
      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.
    </Info>

    **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>

  <Tab title="One-shot: pipe a message via stdin">
    <Info>
      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.
    </Info>

    **CLI command**

    ```bash theme={"system"}
    echo "Summarize today's failed dbt runs" | paradime dinoai --agent data-quality-checker
    ```
  </Tab>

  <Tab title="Resume an existing session">
    <Info>
      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.
    </Info>

    **CLI command**

    ```bash theme={"system"}
    paradime dinoai --session xwzdneft6emspe0f
    ```
  </Tab>

  <Tab title="Resume and send a follow-up (one-shot)">
    <Info>
      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.
    </Info>

    **CLI command**

    ```bash theme={"system"}
    paradime dinoai --session xwzdneft6emspe0f --message "Now generate the missing YAML files"
    ```
  </Tab>
</Tabs>

### 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.

### 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](/products/code-ide/terminal/paradime-cli.md)
- [DinoAI Background Agent Environment Variables](/products/settings/environment-variables/dinoai-background-agent-environment-variables.md)
- [DinoAI](/products/dino-ai/index.md)
- [Environment Variables](/products/settings/environment-variables/index.md)
- [DinoAI Copilot](/products/code-ide/left-panel/copilot.md)
