Commit 3f95e11
authored
feat: add execute/executions CLI commands and refactor generate (#180)
## Summary
- **New `vlmrun execute` command** — runs agent executions via
`/v1/agent/execute` with support for skills (`--skill`, `--skill-id`),
toolsets (`--toolset`), file inputs (`-i`), schema (`--schema`), and
full agent name (`--name <agent>:<version>`). Supports `--wait` with
polling and `--format json` output.
- **New `vlmrun executions list/get` subcommands** — list and retrieve
agent execution results with rich formatted output (panel layout,
colorized status, duration computed from timestamps).
- **Refactored `vlmrun generate`** — replaced separate `image` and
`document` subcommands with a single unified command (`vlmrun generate
-i <file>`) that auto-detects file type from extension and routes to the
appropriate API endpoint (`/v1/document/generate` for images/documents,
`/v1/video/generate`, `/v1/audio/generate`). Supports skills, schema,
batch/wait modes, and JSON output.
- **Improved `vlmrun predictions list`** — formatted output matching
executions style with panel layout, colorized status, and duration
computed from timestamps. Removed N+1 API call overhead (no longer
fetches each prediction individually).
- **Fixed truthiness checks** in `predictions get` and `executions get`
to correctly display `0` values for usage fields (elements_processed,
credits_used, etc.).
- **Updated `CreditUsage` model** with `steps`, `message`, and
`duration_seconds` fields.
- **Version bump** to 0.6.0.
## Test plan
- [ ] `vlmrun execute -i <file> --skill-id <skill> --wait` completes and
displays result
- [ ] `vlmrun executions list` shows formatted table with duration
- [ ] `vlmrun executions get <id>` shows full details including credits
- [ ] `vlmrun generate -i photo.jpg --domain image.caption` auto-detects
image type
- [ ] `vlmrun generate -i doc.pdf --domain document.invoice` routes to
document endpoint
- [ ] `vlmrun predictions list` is fast (no N+1 API calls) and shows
formatted output
- [ ] `vlmrun predictions get <id>` shows 0 values correctly (not
hidden)
Made with [Cursor](https://cursor.com)
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/vlm-run/vlmrun-python-sdk/pull/180"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->1 parent f870419 commit 3f95e11
8 files changed
Lines changed: 1184 additions & 71 deletions
File tree
- tests/cli
- vlmrun
- client
- cli
- _cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
0 commit comments