# Duvo CLI

The Duvo CLI (`duvo`) brings Duvo to your terminal. Use it from scripts, CI/CD pipelines, and developer workflows to manage Assignments, Connections, Files, Jobs, and more — without leaving the command line.

The CLI is a wrapper around the [Public API](https://github.com/duvoai/monorepo/blob/gitbook-prod/knowledge-base/api-reference/README.md), so anything you can do via the API you can do with `duvo`. JSON output is built in for scripting, and named profiles let you switch between teams or environments instantly.

## What you can do

* **Run Jobs and respond to humans-in-the-loop** — Start Jobs, stream messages, approve or deny requests, send mid-run instructions.
* **Manage Assignments** — List, create, update, and organize Assignments into folders.
* **Inspect Connections** — See which Connections you have, filter by integration, and look up Connection IDs for use in scripts.
* **Move Files in and out of Duvo** — Upload documents to the team file library, read or replace their contents, generate presigned URLs.
* **Work with Cases and Queues** — Inspect Case history, delegate Cases in bulk, manage labels.
* **Hit the raw API** — Call any Duvo endpoint via `duvo api` when you need something a dedicated command doesn't cover yet.

## Installation

Install globally from npm:

```bash
npm install -g @duvoai/cli
```

Requires Node.js 22 or newer.

Run `duvo --version` to confirm the install, and `duvo --help` to see every available command.

## Quick start

```bash
# 1. Install
npm install -g @duvoai/cli

# 2. Sign in (opens your browser)
duvo login

# 3. List your Assignments
duvo agents list

# 4. Start a Job
duvo runs start --agent <agent-id>

# 5. Check Job status
duvo runs get <run-id>
```

## Sign in

The CLI stores credentials as **named profiles**. Each profile holds either an OAuth session or an API key, so you can switch between teams or workspaces without re-entering credentials each time.

### Log in with your Duvo account

```bash
duvo login
```

The CLI first prompts you for a profile name (for example, `acme` or `personal`), then opens your browser so you can sign in to Duvo. Once you approve, the CLI stores the OAuth session under that profile name. The first profile you add becomes the default.

Pass `--name <profile>` to skip the prompt:

```bash
duvo login --name acme
```

### Log in with an API key

Generate a key at [Team Settings → API Keys](https://app.duvo.ai/settings/api-keys), then:

```bash
duvo login --api-key <key>
```

Use API keys for service accounts, CI pipelines, and any non-interactive environment.

### Add another profile

Run `duvo login` again to repeat the browser sign-in and prompt for a new profile name. Pass `--api-key <key>` if you want the new profile to use an API key instead.

### Switch the default profile

```bash
duvo profiles use personal
```

If you omit the profile name, an interactive picker opens so you can arrow-key through your saved profiles:

```bash
duvo profiles use
```

### Use a different profile for a single command

```bash
duvo agents list --profile staging
```

`--profile <name>` works on every command and doesn't change your default.

### See who you're signed in as

```bash
duvo whoami
```

### Sign out

```bash
duvo logout                    # sign out of the active profile
duvo logout --name <profile>   # sign out of a specific profile
duvo logout --all              # sign out of every stored profile
```

`duvo logout` revokes the OAuth tokens server-side and removes the profile locally.

### Environment variables

For non-interactive use (CI, scripts), the CLI also reads:

| Variable       | Description                                    |
| -------------- | ---------------------------------------------- |
| `DUVO_API_KEY` | API key — bypasses the stored profile entirely |
| `DUVO_PROFILE` | Profile name to use instead of the default     |

## Output formats

By default every command prints a human-friendly table or summary. Add `--json` to any command for machine-readable output suitable for piping into `jq` or scripting:

```bash
duvo agents list --json | jq '.agents[] | {id, name}'
```

## Command groups

The CLI is organized by resource. Use these guides to dig into each area:

* [Managing Connections](/cli/managing-connections.md) — `duvo connections`, `duvo integrations`
* [Managing Assignments](/cli/managing-assignments.md) — `duvo agents`, `duvo agent-folders`, `duvo builds`, `duvo revisions`
* [Running Jobs](/cli/running-jobs.md) — `duvo runs`, including human-in-the-loop responses
* [Managing Files and Skills](/cli/managing-files-and-skills.md) — `duvo files`, `duvo skills`
* [Cases and Queues](/cli/cases-and-queues.md) — `duvo cases`, `duvo queues`, `duvo queue-labels`
* [Advanced commands](/cli/advanced.md) — `duvo api`, `duvo sandboxes`, `duvo plugins`, `duvo revision-integrations`, `duvo build-integrations`

Each guide includes the exact commands, flags, and a few realistic examples.

## Tips

* Run `duvo <command> --help` to see every available flag for any command.
* Combine `--json` with `jq` to script complex workflows — for example, list all Jobs that are waiting for human approval.
* Set `DUVO_PROFILE` in your shell config to default to a non-default profile per project.
* The CLI follows your Duvo team's permissions — if you can't see something in the UI, you can't see it via the CLI either.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.duvo.ai/cli/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
