@duvoai/cli 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/bin/duvo.js +3245 -2750
- package/dist/bin/duvo.js.map +4 -4
- package/guides/duvo.md +116 -0
- package/guides/runs.md +76 -0
- package/package.json +2 -1
package/guides/duvo.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: duvo
|
|
3
|
+
description: Core usage guide for the Duvo CLI — auth, profiles, teams, global flags, JSON output, and the command map. Start here before guessing commands from flag docs alone.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Duvo CLI — Core Usage
|
|
7
|
+
|
|
8
|
+
The `duvo` CLI is a scriptable client for the Duvo public API — a single
|
|
9
|
+
`duvo` binary with resource-grouped subcommands.
|
|
10
|
+
|
|
11
|
+
If you are an AI agent driving this CLI, read this guide first, then load a
|
|
12
|
+
specialized guide with `duvo guide get <name>` (see `duvo guide list`).
|
|
13
|
+
|
|
14
|
+
## First moves
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
duvo --help # full command map
|
|
18
|
+
duvo whoami # who am I, which team, which auth type
|
|
19
|
+
duvo guide list # bundled guides shipped with this CLI version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Authentication
|
|
23
|
+
|
|
24
|
+
`duvo login` signs you in via **OAuth** (opens a browser) by default, or
|
|
25
|
+
stores a team **API key** with `--api-key`. Either way the credential is
|
|
26
|
+
saved as a **named profile** — one per login — the same shape as AWS CLI
|
|
27
|
+
profiles, so you can switch between teams.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
duvo login [--name <profile>] # OAuth browser sign-in (default)
|
|
31
|
+
duvo login --api-key <key> [--name <p>] # store an API key instead
|
|
32
|
+
duvo logout [--name <profile>] # remove a profile
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Non-interactive auth (CI, agents): set `DUVO_API_KEY` and skip `login`
|
|
36
|
+
entirely. The key's team is fixed, so team-scoped commands resolve
|
|
37
|
+
automatically.
|
|
38
|
+
|
|
39
|
+
Precedence:
|
|
40
|
+
|
|
41
|
+
- **Profile**: `--profile <name>` > `DUVO_PROFILE` env > default profile.
|
|
42
|
+
- **Credential**: `DUVO_API_KEY` env (always an API key) > the selected
|
|
43
|
+
profile's stored credential (OAuth token or API key).
|
|
44
|
+
- **Base URL**: `DUVO_API_BASE_URL` env > profile's `apiBaseUrl` >
|
|
45
|
+
`https://api.duvo.ai`. The value is an origin only (no path prefix).
|
|
46
|
+
|
|
47
|
+
## Teams
|
|
48
|
+
|
|
49
|
+
Most commands act on a single team. Resolve order: `--team <id>` flag >
|
|
50
|
+
`DUVO_TEAM_ID` env > the profile's default team. API-key profiles are pinned
|
|
51
|
+
to the key's team. Check the active team with `duvo whoami`.
|
|
52
|
+
|
|
53
|
+
## Global flags
|
|
54
|
+
|
|
55
|
+
| Flag | Effect |
|
|
56
|
+
| ------------------ | ------------------------------------------------------ |
|
|
57
|
+
| `--profile <name>` | use a specific profile for this invocation |
|
|
58
|
+
| `--team <id>` | use a specific team for this invocation |
|
|
59
|
+
| `--json` | (per command) raw JSON to stdout — the stable contract |
|
|
60
|
+
|
|
61
|
+
## Output modes
|
|
62
|
+
|
|
63
|
+
- **Single resource** → a labelled key/value block.
|
|
64
|
+
- **Collection** → a fixed-column table with a trailing `Showing N` summary.
|
|
65
|
+
- **`--json`** → raw API JSON, never coloured or truncated. Pipe it to `jq`.
|
|
66
|
+
This is the stable contract; table/text formatting can change, JSON will not.
|
|
67
|
+
|
|
68
|
+
Prefer `--json` whenever you parse output programmatically.
|
|
69
|
+
|
|
70
|
+
## Exit codes
|
|
71
|
+
|
|
72
|
+
`0` success · `1` generic error · `2` auth error (missing/invalid key or
|
|
73
|
+
unknown profile) · `3` not found · `4` forbidden.
|
|
74
|
+
|
|
75
|
+
## Command map
|
|
76
|
+
|
|
77
|
+
Duvo UI labels and CLI/API names refer to the same concepts:
|
|
78
|
+
|
|
79
|
+
- **Assignment** (UI) = an agent → the `agents` command.
|
|
80
|
+
- **Job** (UI) = a run → the `runs` command.
|
|
81
|
+
- **Connections** (UI) = integrations → the `connections` / `integrations` commands.
|
|
82
|
+
- **Files** (UI) = knowledge base → the `files` command.
|
|
83
|
+
- **MCP**: Connections are surfaced to an Assignment as **MCP** tool servers;
|
|
84
|
+
a custom MCP server URL is itself one kind of Connection.
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
duvo login | logout | whoami | profiles # auth & local config
|
|
88
|
+
duvo agents | agent-folders | builds # Assignments and their revisions
|
|
89
|
+
duvo runs | queues | queue-labels | cases # Jobs and work queues
|
|
90
|
+
duvo connections | integrations | oauth # Connections
|
|
91
|
+
duvo files | skills | plugins # Files, Skills, plugins
|
|
92
|
+
duvo secrets | credentials # secrets & logins
|
|
93
|
+
duvo team | teams | clarity | sandboxes # team, Clarity, sandboxes
|
|
94
|
+
duvo api <METHOD> <path> # low-level escape hatch
|
|
95
|
+
duvo guide # these bundled guides
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Escape hatch — `duvo api`
|
|
99
|
+
|
|
100
|
+
Any public endpoint is reachable before it has a dedicated command, modelled
|
|
101
|
+
on `gh api`:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
duvo api GET /v1/agents -F limit=20 -F offset=0
|
|
105
|
+
duvo api POST /v1/agents -f name="Ops bot"
|
|
106
|
+
cat body.json | duvo api POST /v1/agents --input -
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`-f key=value` always sends a string; `-F key=value` parses booleans, numbers,
|
|
110
|
+
JSON null, or `@file`. Run `duvo api --help` for the full flag set.
|
|
111
|
+
|
|
112
|
+
## Discoverability
|
|
113
|
+
|
|
114
|
+
Every command and subcommand supports `--help`. When in doubt, run
|
|
115
|
+
`duvo <group> --help` rather than guessing flags — and prefer these bundled
|
|
116
|
+
guides, which are always matched to the installed CLI version.
|
package/guides/runs.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: runs
|
|
3
|
+
description: Start, watch, and steer Jobs (runs) from the CLI — starting work on an Assignment, reading messages, responding to human-in-the-loop requests, and stopping a Job.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Working with Jobs (runs)
|
|
7
|
+
|
|
8
|
+
In Duvo, a **Job** is a single execution of an **Assignment**. The CLI and API
|
|
9
|
+
call these `run` and `agent` respectively. This guide covers the Job
|
|
10
|
+
lifecycle. For the basics (auth, teams, `--json`) read `duvo guide get duvo`
|
|
11
|
+
first.
|
|
12
|
+
|
|
13
|
+
## Start work
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
duvo runs start --agent <agent-id> [--follow] [--json]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`--agent` is the Assignment (agent) ID — list candidates with
|
|
20
|
+
`duvo agents list`. The response includes the new Job ID; capture it with
|
|
21
|
+
`--json` and `jq -r '.id'` for scripting. Pass `--follow` to stream the Job's
|
|
22
|
+
messages live until it completes, instead of just printing the new Job ID.
|
|
23
|
+
|
|
24
|
+
## Inspect a Job
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
duvo runs get <run-id> # status and metadata
|
|
28
|
+
duvo runs messages <run-id> # full message history
|
|
29
|
+
duvo runs messages <run-id> --follow # poll for new messages until it finishes
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Use `--json` on `get` or `messages` to parse the result. Job status tells you whether the
|
|
33
|
+
Job is still working, waiting on a human, finished, or stopped.
|
|
34
|
+
|
|
35
|
+
## Talk to a running Job
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
duvo runs send-message <run-id> --message "Use the EU supplier list"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This appends a user message to an in-flight Job — the way to add context or
|
|
42
|
+
correct course without restarting.
|
|
43
|
+
|
|
44
|
+
## Human-in-the-loop requests
|
|
45
|
+
|
|
46
|
+
When a Job needs a human decision it pauses with a pending request. Respond
|
|
47
|
+
with one of:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
duvo runs respond <run-id> --approve
|
|
51
|
+
duvo runs respond <run-id> --deny
|
|
52
|
+
duvo runs respond <run-id> --answer question=answer
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The request ID defaults to the Job's current pending request, so you usually
|
|
56
|
+
only pass the Job ID. Pass an explicit request ID as the second positional
|
|
57
|
+
argument when disambiguating.
|
|
58
|
+
|
|
59
|
+
## Stop a Job
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
duvo runs stop <run-id> # destructive — prompts unless --yes
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Stopping interrupts the Job and pauses its sandbox. In non-interactive
|
|
66
|
+
contexts pass `--yes`/`-y`; the CLI refuses to infer consent from piped stdin.
|
|
67
|
+
|
|
68
|
+
## A minimal scripted loop
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
RUN_ID=$(duvo runs start --agent "$AGENT_ID" --json | jq -r '.id')
|
|
72
|
+
duvo runs get "$RUN_ID" --json | jq -r '.status'
|
|
73
|
+
# ...poll, respond to human requests, or send-message as needed...
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Always prefer `--json` in scripts — it is the stable output contract.
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duvoai/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Command-line interface for the Duvo public API",
|
|
5
5
|
"bin": {
|
|
6
6
|
"duvo": "./dist/bin/duvo.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
+
"guides",
|
|
10
11
|
"README.md"
|
|
11
12
|
],
|
|
12
13
|
"type": "module",
|