dremio-cli 2.1.2__tar.gz → 2.1.3__tar.gz
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.
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/DISCOVERY_SERVICE_PLAN.md +15 -2
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/PKG-INFO +84 -5
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/README.md +80 -3
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/.claude-plugin/plugin.json +1 -1
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/pyproject.toml +4 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/scripts/parse_jssdk.py +7 -2
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/_version.py +2 -2
- dremio_cli-2.1.3/src/drs/auth.py +172 -0
- dremio_cli-2.1.3/src/drs/chat_gantt.py +407 -0
- dremio_cli-2.1.3/src/drs/chat_gantt_html.py +1199 -0
- dremio_cli-2.1.3/src/drs/chat_gantt_tui.py +615 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/chat_render.py +150 -23
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/cli.py +27 -2
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/client.py +82 -3
- dremio_cli-2.1.3/src/drs/commands/auth.py +318 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/chat.py +340 -22
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/folder.py +47 -24
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/setup.py +40 -0
- dremio_cli-2.1.3/src/drs/commands/space.py +183 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/introspect.py +71 -4
- dremio_cli-2.1.3/src/drs/oauth.py +267 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/output.py +5 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/utils.py +26 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_auth.py +91 -0
- dremio_cli-2.1.3/tests/test_chat_gantt_html.py +249 -0
- dremio_cli-2.1.3/tests/test_chat_gantt_tui.py +39 -0
- dremio_cli-2.1.3/tests/test_chat_render.py +67 -0
- dremio_cli-2.1.3/tests/test_cli.py +251 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_client.py +41 -0
- dremio_cli-2.1.3/tests/test_client_retry.py +335 -0
- dremio_cli-2.1.3/tests/test_commands/test_chat.py +561 -0
- dremio_cli-2.1.3/tests/test_commands/test_folder.py +158 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_setup.py +68 -0
- dremio_cli-2.1.3/tests/test_commands/test_space.py +164 -0
- dremio_cli-2.1.3/tests/test_trust_store.py +68 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/uv.lock +240 -3
- dremio_cli-2.1.2/src/drs/auth.py +0 -86
- dremio_cli-2.1.2/tests/test_client_retry.py +0 -156
- dremio_cli-2.1.2/tests/test_commands/test_chat.py +0 -115
- dremio_cli-2.1.2/tests/test_commands/test_folder.py +0 -84
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/.claude-plugin/marketplace.json +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/.github/workflows/ci.yml +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/.github/workflows/release.yml +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/.gitignore +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/.license-header.txt +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/.pre-commit-config.yaml +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/.python-version +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/CODE_OF_CONDUCT.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/CONTRIBUTING.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/LICENSE +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/SPIKE_NOTES.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/TESTING.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/skills/audit-dataset-access/SKILL.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/skills/document-dataset/SKILL.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/skills/dremio/SKILL.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/skills/dremio-dbt/SKILL.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/skills/dremio-setup/SKILL.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/skills/investigate-data-quality/SKILL.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/skills/investigate-slow-query/SKILL.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/plugins/dremio/skills/onboard-new-source/SKILL.md +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/scripts/validate_api_coverage.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/__init__.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/__init__.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/engine.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/grant.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/job.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/project.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/query.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/reflection.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/role.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/schema.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/tag.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/user.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/commands/wiki.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/src/drs/sse.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/__init__.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/conftest.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/__init__.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_engine.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_grant.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_project.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_query.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_reflection.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_role.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_tag.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_user.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_commands/test_wiki.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_output.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_sse.py +0 -0
- {dremio_cli-2.1.2 → dremio_cli-2.1.3}/tests/test_utils.py +0 -0
|
@@ -6,7 +6,9 @@ The drs CLI currently hand-maintains 18 client methods mapping to Dremio Cloud R
|
|
|
6
6
|
|
|
7
7
|
## Source of Truth: `dremio/js-sdk`
|
|
8
8
|
|
|
9
|
-
The [dremio/js-sdk](https://
|
|
9
|
+
The [@dremio/js-sdk](https://www.npmjs.com/package/@dremio/js-sdk) TypeScript SDK is the canonical, auto-maintained representation of the Dremio API surface. It covers all three SKUs (OSS, Enterprise, Cloud) and is regenerated by the SDK team. **It is more reliable than the OpenAPI YAML specs in the monorepo**, which were never correctly exposed as public docs.
|
|
10
|
+
|
|
11
|
+
The SDK is distributed publicly as the npm package `@dremio/js-sdk`, with per-SKU entry points (`@dremio/js-sdk/oss`, `/enterprise`, `/cloud`). The SDK's TypeScript source repository is internal to Dremio and not publicly available.
|
|
10
12
|
|
|
11
13
|
### Why js-sdk over OpenAPI specs
|
|
12
14
|
|
|
@@ -30,12 +32,23 @@ Current results from the parser:
|
|
|
30
32
|
- **5 drs-only** (SQL-based commands with no REST equivalent)
|
|
31
33
|
|
|
32
34
|
Run it:
|
|
35
|
+
|
|
36
|
+
> **Note (internal-only prerequisite):** `scripts/parse_jssdk.py` requires the SDK's TypeScript source (`src/*.ts`), which is only available from Dremio's internal SDK repository. The public npm package `@dremio/js-sdk` ships compiled `dist/` output only and cannot be parsed by this script.
|
|
37
|
+
|
|
33
38
|
```bash
|
|
34
|
-
|
|
39
|
+
# <internal-js-sdk-repo> is Dremio's internal SDK source repository (not public).
|
|
40
|
+
git clone --depth 1 <internal-js-sdk-repo> /tmp/js-sdk
|
|
35
41
|
python scripts/parse_jssdk.py --sdk-path /tmp/js-sdk # generate registry
|
|
36
42
|
python scripts/parse_jssdk.py --sdk-path /tmp/js-sdk --compare # compare vs drs
|
|
37
43
|
```
|
|
38
44
|
|
|
45
|
+
### Exploring the API today (for external users)
|
|
46
|
+
|
|
47
|
+
Until `discovery.json` exists, the recommended public ways to explore the Dremio API across all three SKUs are:
|
|
48
|
+
|
|
49
|
+
- **Official Dremio API documentation:** <https://docs.dremio.com>
|
|
50
|
+
- **The npm package `@dremio/js-sdk`:** install it and read the bundled `.d.ts` type declarations to see the available resources and endpoints per SKU (`@dremio/js-sdk/oss`, `/enterprise`, `/cloud`).
|
|
51
|
+
|
|
39
52
|
## Requirement: `discovery.json` Export from js-sdk
|
|
40
53
|
|
|
41
54
|
The production path requires the js-sdk team to export a structured **`discovery.json`** manifest as part of their build. The js-sdk already has all the information we need in its TypeScript types and Zod schemas — we're asking them to serialize it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: dremio-cli
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
4
4
|
Summary: Official developer CLI for Dremio Cloud — install with: pipx install dremio-cli
|
|
5
5
|
Project-URL: Homepage, https://github.com/dremio/cli
|
|
6
6
|
Project-URL: Repository, https://github.com/dremio/cli
|
|
@@ -20,11 +20,13 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
21
21
|
Classifier: Topic :: Database
|
|
22
22
|
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: certifi>=2026.10.19
|
|
23
24
|
Requires-Dist: httpx>=0.27
|
|
24
25
|
Requires-Dist: prompt-toolkit>=3.0
|
|
25
26
|
Requires-Dist: pydantic>=2
|
|
26
27
|
Requires-Dist: pyyaml>=6
|
|
27
28
|
Requires-Dist: rich>=13
|
|
29
|
+
Requires-Dist: textual>=0.79
|
|
28
30
|
Requires-Dist: typer>=0.9
|
|
29
31
|
Description-Content-Type: text/markdown
|
|
30
32
|
|
|
@@ -145,7 +147,8 @@ If this returns `{"job_id": "...", "state": "COMPLETED", "rowCount": 1, "rows":
|
|
|
145
147
|
| Group | Commands | What it does |
|
|
146
148
|
|-------|----------|--------------|
|
|
147
149
|
| `dremio query` | `run`, `status`, `cancel` | Execute SQL, check job status, cancel running jobs |
|
|
148
|
-
| `dremio
|
|
150
|
+
| `dremio space` | `list`, `get`, `create`, `delete` | Manage top-level spaces in the catalog |
|
|
151
|
+
| `dremio folder` | `list`, `get`, `create`, `delete`, `grants` | Browse top-level catalog entities and manage nested folders, view ACLs |
|
|
149
152
|
| `dremio schema` | `describe`, `lineage`, `sample` | Column types, dependency graph, preview rows |
|
|
150
153
|
| `dremio wiki` | `get`, `update` | Read and update wiki documentation on entities |
|
|
151
154
|
| `dremio tag` | `get`, `update` | Read and update tags on entities |
|
|
@@ -156,6 +159,7 @@ If this returns `{"job_id": "...", "state": "COMPLETED", "rowCount": 1, "rows":
|
|
|
156
159
|
| `dremio role` | `list`, `get`, `create`, `update`, `delete` | Full CRUD for organization roles |
|
|
157
160
|
| `dremio grant` | `get`, `update`, `delete` | Manage grants on projects, engines, org resources |
|
|
158
161
|
| `dremio project` | `list`, `get`, `create`, `update`, `delete` | Full CRUD for Dremio Cloud projects |
|
|
162
|
+
| `dremio chat` | `list`, `history`, `gantt`, `html`, interactive chat | Work with AI agent conversations, tool traces, timelines, and standalone reports |
|
|
159
163
|
| `dremio search` | *(top-level)* | Full-text search across all catalog entities |
|
|
160
164
|
| `dremio describe` | *(top-level)* | Machine-readable schema for any command |
|
|
161
165
|
|
|
@@ -168,6 +172,12 @@ dremio query run "SELECT * FROM myspace.orders LIMIT 5" --output pretty
|
|
|
168
172
|
# Search the catalog for anything matching "revenue"
|
|
169
173
|
dremio search "revenue"
|
|
170
174
|
|
|
175
|
+
# Search only jobs and limit the first page size
|
|
176
|
+
dremio search "revenue" --filter 'category in ["JOB"]' --max-results 20
|
|
177
|
+
|
|
178
|
+
# Fetch the next page using the nextPageToken from a prior response
|
|
179
|
+
dremio search "revenue" --next-page-token 'eyJwYWdlVG9rZW4iOiJ...'
|
|
180
|
+
|
|
171
181
|
# Create a space, then a folder inside it
|
|
172
182
|
dremio folder create "Analytics"
|
|
173
183
|
dremio folder create Analytics.reports
|
|
@@ -201,6 +211,16 @@ dremio job list --status FAILED --output pretty
|
|
|
201
211
|
|
|
202
212
|
# Audit what roles and permissions a user has
|
|
203
213
|
dremio user audit rahim.bhojani
|
|
214
|
+
|
|
215
|
+
# Show a conversation transcript with tool timestamps, durations, and detailed results
|
|
216
|
+
dremio chat history CONVERSATION_ID --show-tool-details
|
|
217
|
+
|
|
218
|
+
# Render a terminal Gantt timeline for a saved chat history dump
|
|
219
|
+
dremio chat gantt ./history.json --ascii --think-time
|
|
220
|
+
|
|
221
|
+
# Export one or more conversations to a standalone HTML report
|
|
222
|
+
dremio chat html conv-1 conv-2 -o report.html
|
|
223
|
+
dremio chat html -o report.html --dump-file ./history.json --dump-file ./history-2.json
|
|
204
224
|
```
|
|
205
225
|
|
|
206
226
|
### Output formats
|
|
@@ -238,13 +258,71 @@ dremio describe reflection.list
|
|
|
238
258
|
|
|
239
259
|
Returns a JSON schema with parameter names, types, required/optional, and descriptions. Useful for building automation on top of `dremio`.
|
|
240
260
|
|
|
261
|
+
## Chat debugging workflows
|
|
262
|
+
|
|
263
|
+
The `dremio chat` command group includes tools for investigating AI agent runs after the fact, both in the terminal and in a standalone HTML report.
|
|
264
|
+
|
|
265
|
+
### Detailed transcript output
|
|
266
|
+
|
|
267
|
+
Use `--show-tool-details` with one-shot chat or chat history to include:
|
|
268
|
+
|
|
269
|
+
- Tool start and finish timestamps
|
|
270
|
+
- Per-tool duration
|
|
271
|
+
- Full tool results instead of a compact `done` line
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# One-shot chat with full tool details
|
|
275
|
+
dremio chat -m "who reports to Myra Richmond" --show-tool-details
|
|
276
|
+
|
|
277
|
+
# Existing conversation transcript with full tool details
|
|
278
|
+
dremio chat history CONVERSATION_ID --show-tool-details
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Terminal Gantt timelines
|
|
282
|
+
|
|
283
|
+
Use `dremio chat gantt` for a saved history dump, or `dremio chat history --gantt` for a live conversation history.
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
# Render plain ASCII output
|
|
287
|
+
dremio chat gantt ./history.json --ascii
|
|
288
|
+
|
|
289
|
+
# Include synthetic think-time gaps between steps
|
|
290
|
+
dremio chat history CONVERSATION_ID --gantt --ascii --think-time
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
The Textual Gantt viewer adapts its foreground colors to light and dark terminal themes and uses transparent backgrounds so it blends into the terminal instead of forcing its own surface color.
|
|
294
|
+
|
|
295
|
+
### Standalone HTML report
|
|
296
|
+
|
|
297
|
+
Use `dremio chat html` to export a self-contained report with all data embedded in the page.
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# Export multiple conversation IDs
|
|
301
|
+
dremio chat html conv-1 conv-2 conv-3 -o report.html
|
|
302
|
+
|
|
303
|
+
# Export one or more local history dumps
|
|
304
|
+
dremio chat html -o report.html --dump-file ./history.json --dump-file ./history-2.json
|
|
305
|
+
|
|
306
|
+
# Include think-time spans in the report
|
|
307
|
+
dremio chat html conv-1 -o report.html --think-time
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
The HTML report includes:
|
|
311
|
+
|
|
312
|
+
- An overview page with aggregate stats across all included conversations
|
|
313
|
+
- Mean, median, standard deviation, min, max, and totals for run time, tool time, think time, and tool durations
|
|
314
|
+
- Navigation from the overview page into each individual conversation timeline
|
|
315
|
+
- Conversation summary and result content
|
|
316
|
+
- Selected-span payload and tool result details
|
|
317
|
+
|
|
241
318
|
## CRUD design principle
|
|
242
319
|
|
|
243
320
|
Every Dremio object has consistent CLI commands using standard CRUD verbs (`list`, `get`, `create`, `update`, `delete`):
|
|
244
321
|
|
|
245
322
|
| Object | List | Get | Create | Update | Delete |
|
|
246
323
|
|--------|------|-----|--------|--------|--------|
|
|
247
|
-
| **Spaces
|
|
324
|
+
| **Spaces** | `space list` | `space get` | `space create` | — | `space delete` |
|
|
325
|
+
| **Folders** | — | `folder get` | `folder create` | — | `folder delete` |
|
|
248
326
|
| **Tables/Views** | `folder get` | `schema describe/sample` | `query run` (DDL) | `query run` (DDL) | `folder delete` |
|
|
249
327
|
| **Wiki** | — | `wiki get` | `wiki update` | `wiki update` | — |
|
|
250
328
|
| **Tags** | — | `tag get` | `tag update` | `tag update` | — |
|
|
@@ -256,7 +334,7 @@ Every Dremio object has consistent CLI commands using standard CRUD verbs (`list
|
|
|
256
334
|
| **Projects** | `project list` | `project get` | `project create` | `project update` | `project delete` |
|
|
257
335
|
| **Jobs** | `job list` | `job get/profile` | `query run` | — | `query cancel` |
|
|
258
336
|
|
|
259
|
-
`
|
|
337
|
+
`space create` uses SQL (`CREATE SPACE`) for top-level space creation. `folder create` uses `CREATE FOLDER` for all paths; single-component paths are deprecated and may fail on Space-Plugin-enabled clusters — use `dremio space create` instead. All other mutations use the REST API.
|
|
260
338
|
|
|
261
339
|
## How it works
|
|
262
340
|
|
|
@@ -390,6 +468,7 @@ src/drs/
|
|
|
390
468
|
introspect.py # Command schema registry for dremio describe
|
|
391
469
|
commands/
|
|
392
470
|
query.py # run, status, cancel
|
|
471
|
+
space.py # list, get, create, delete
|
|
393
472
|
folder.py # list, get, create, delete, grants
|
|
394
473
|
schema.py # describe, lineage, sample
|
|
395
474
|
wiki.py # get, update
|
|
@@ -115,7 +115,8 @@ If this returns `{"job_id": "...", "state": "COMPLETED", "rowCount": 1, "rows":
|
|
|
115
115
|
| Group | Commands | What it does |
|
|
116
116
|
|-------|----------|--------------|
|
|
117
117
|
| `dremio query` | `run`, `status`, `cancel` | Execute SQL, check job status, cancel running jobs |
|
|
118
|
-
| `dremio
|
|
118
|
+
| `dremio space` | `list`, `get`, `create`, `delete` | Manage top-level spaces in the catalog |
|
|
119
|
+
| `dremio folder` | `list`, `get`, `create`, `delete`, `grants` | Browse top-level catalog entities and manage nested folders, view ACLs |
|
|
119
120
|
| `dremio schema` | `describe`, `lineage`, `sample` | Column types, dependency graph, preview rows |
|
|
120
121
|
| `dremio wiki` | `get`, `update` | Read and update wiki documentation on entities |
|
|
121
122
|
| `dremio tag` | `get`, `update` | Read and update tags on entities |
|
|
@@ -126,6 +127,7 @@ If this returns `{"job_id": "...", "state": "COMPLETED", "rowCount": 1, "rows":
|
|
|
126
127
|
| `dremio role` | `list`, `get`, `create`, `update`, `delete` | Full CRUD for organization roles |
|
|
127
128
|
| `dremio grant` | `get`, `update`, `delete` | Manage grants on projects, engines, org resources |
|
|
128
129
|
| `dremio project` | `list`, `get`, `create`, `update`, `delete` | Full CRUD for Dremio Cloud projects |
|
|
130
|
+
| `dremio chat` | `list`, `history`, `gantt`, `html`, interactive chat | Work with AI agent conversations, tool traces, timelines, and standalone reports |
|
|
129
131
|
| `dremio search` | *(top-level)* | Full-text search across all catalog entities |
|
|
130
132
|
| `dremio describe` | *(top-level)* | Machine-readable schema for any command |
|
|
131
133
|
|
|
@@ -138,6 +140,12 @@ dremio query run "SELECT * FROM myspace.orders LIMIT 5" --output pretty
|
|
|
138
140
|
# Search the catalog for anything matching "revenue"
|
|
139
141
|
dremio search "revenue"
|
|
140
142
|
|
|
143
|
+
# Search only jobs and limit the first page size
|
|
144
|
+
dremio search "revenue" --filter 'category in ["JOB"]' --max-results 20
|
|
145
|
+
|
|
146
|
+
# Fetch the next page using the nextPageToken from a prior response
|
|
147
|
+
dremio search "revenue" --next-page-token 'eyJwYWdlVG9rZW4iOiJ...'
|
|
148
|
+
|
|
141
149
|
# Create a space, then a folder inside it
|
|
142
150
|
dremio folder create "Analytics"
|
|
143
151
|
dremio folder create Analytics.reports
|
|
@@ -171,6 +179,16 @@ dremio job list --status FAILED --output pretty
|
|
|
171
179
|
|
|
172
180
|
# Audit what roles and permissions a user has
|
|
173
181
|
dremio user audit rahim.bhojani
|
|
182
|
+
|
|
183
|
+
# Show a conversation transcript with tool timestamps, durations, and detailed results
|
|
184
|
+
dremio chat history CONVERSATION_ID --show-tool-details
|
|
185
|
+
|
|
186
|
+
# Render a terminal Gantt timeline for a saved chat history dump
|
|
187
|
+
dremio chat gantt ./history.json --ascii --think-time
|
|
188
|
+
|
|
189
|
+
# Export one or more conversations to a standalone HTML report
|
|
190
|
+
dremio chat html conv-1 conv-2 -o report.html
|
|
191
|
+
dremio chat html -o report.html --dump-file ./history.json --dump-file ./history-2.json
|
|
174
192
|
```
|
|
175
193
|
|
|
176
194
|
### Output formats
|
|
@@ -208,13 +226,71 @@ dremio describe reflection.list
|
|
|
208
226
|
|
|
209
227
|
Returns a JSON schema with parameter names, types, required/optional, and descriptions. Useful for building automation on top of `dremio`.
|
|
210
228
|
|
|
229
|
+
## Chat debugging workflows
|
|
230
|
+
|
|
231
|
+
The `dremio chat` command group includes tools for investigating AI agent runs after the fact, both in the terminal and in a standalone HTML report.
|
|
232
|
+
|
|
233
|
+
### Detailed transcript output
|
|
234
|
+
|
|
235
|
+
Use `--show-tool-details` with one-shot chat or chat history to include:
|
|
236
|
+
|
|
237
|
+
- Tool start and finish timestamps
|
|
238
|
+
- Per-tool duration
|
|
239
|
+
- Full tool results instead of a compact `done` line
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# One-shot chat with full tool details
|
|
243
|
+
dremio chat -m "who reports to Myra Richmond" --show-tool-details
|
|
244
|
+
|
|
245
|
+
# Existing conversation transcript with full tool details
|
|
246
|
+
dremio chat history CONVERSATION_ID --show-tool-details
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Terminal Gantt timelines
|
|
250
|
+
|
|
251
|
+
Use `dremio chat gantt` for a saved history dump, or `dremio chat history --gantt` for a live conversation history.
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
# Render plain ASCII output
|
|
255
|
+
dremio chat gantt ./history.json --ascii
|
|
256
|
+
|
|
257
|
+
# Include synthetic think-time gaps between steps
|
|
258
|
+
dremio chat history CONVERSATION_ID --gantt --ascii --think-time
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
The Textual Gantt viewer adapts its foreground colors to light and dark terminal themes and uses transparent backgrounds so it blends into the terminal instead of forcing its own surface color.
|
|
262
|
+
|
|
263
|
+
### Standalone HTML report
|
|
264
|
+
|
|
265
|
+
Use `dremio chat html` to export a self-contained report with all data embedded in the page.
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# Export multiple conversation IDs
|
|
269
|
+
dremio chat html conv-1 conv-2 conv-3 -o report.html
|
|
270
|
+
|
|
271
|
+
# Export one or more local history dumps
|
|
272
|
+
dremio chat html -o report.html --dump-file ./history.json --dump-file ./history-2.json
|
|
273
|
+
|
|
274
|
+
# Include think-time spans in the report
|
|
275
|
+
dremio chat html conv-1 -o report.html --think-time
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The HTML report includes:
|
|
279
|
+
|
|
280
|
+
- An overview page with aggregate stats across all included conversations
|
|
281
|
+
- Mean, median, standard deviation, min, max, and totals for run time, tool time, think time, and tool durations
|
|
282
|
+
- Navigation from the overview page into each individual conversation timeline
|
|
283
|
+
- Conversation summary and result content
|
|
284
|
+
- Selected-span payload and tool result details
|
|
285
|
+
|
|
211
286
|
## CRUD design principle
|
|
212
287
|
|
|
213
288
|
Every Dremio object has consistent CLI commands using standard CRUD verbs (`list`, `get`, `create`, `update`, `delete`):
|
|
214
289
|
|
|
215
290
|
| Object | List | Get | Create | Update | Delete |
|
|
216
291
|
|--------|------|-----|--------|--------|--------|
|
|
217
|
-
| **Spaces
|
|
292
|
+
| **Spaces** | `space list` | `space get` | `space create` | — | `space delete` |
|
|
293
|
+
| **Folders** | — | `folder get` | `folder create` | — | `folder delete` |
|
|
218
294
|
| **Tables/Views** | `folder get` | `schema describe/sample` | `query run` (DDL) | `query run` (DDL) | `folder delete` |
|
|
219
295
|
| **Wiki** | — | `wiki get` | `wiki update` | `wiki update` | — |
|
|
220
296
|
| **Tags** | — | `tag get` | `tag update` | `tag update` | — |
|
|
@@ -226,7 +302,7 @@ Every Dremio object has consistent CLI commands using standard CRUD verbs (`list
|
|
|
226
302
|
| **Projects** | `project list` | `project get` | `project create` | `project update` | `project delete` |
|
|
227
303
|
| **Jobs** | `job list` | `job get/profile` | `query run` | — | `query cancel` |
|
|
228
304
|
|
|
229
|
-
`
|
|
305
|
+
`space create` uses SQL (`CREATE SPACE`) for top-level space creation. `folder create` uses `CREATE FOLDER` for all paths; single-component paths are deprecated and may fail on Space-Plugin-enabled clusters — use `dremio space create` instead. All other mutations use the REST API.
|
|
230
306
|
|
|
231
307
|
## How it works
|
|
232
308
|
|
|
@@ -360,6 +436,7 @@ src/drs/
|
|
|
360
436
|
introspect.py # Command schema registry for dremio describe
|
|
361
437
|
commands/
|
|
362
438
|
query.py # run, status, cancel
|
|
439
|
+
space.py # list, get, create, delete
|
|
363
440
|
folder.py # list, get, create, delete, grants
|
|
364
441
|
schema.py # describe, lineage, sample
|
|
365
442
|
wiki.py # get, update
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "1.0",
|
|
3
3
|
"name": "dremio",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"description": "Dremio Cloud developer skills — SQL reference, setup wizard, dbt integration, and workflow automations powered by the drs CLI.",
|
|
6
6
|
"skills": [
|
|
7
7
|
"skills/dremio",
|
|
@@ -20,11 +20,13 @@ classifiers = [
|
|
|
20
20
|
]
|
|
21
21
|
keywords = ["dremio", "dremio-cloud", "cli", "data-lake", "sql", "official"]
|
|
22
22
|
dependencies = [
|
|
23
|
+
"certifi>=2026.10.19",
|
|
23
24
|
"typer>=0.9",
|
|
24
25
|
"httpx>=0.27",
|
|
25
26
|
"pyyaml>=6",
|
|
26
27
|
"pydantic>=2",
|
|
27
28
|
"rich>=13",
|
|
29
|
+
"textual>=0.79",
|
|
28
30
|
"prompt-toolkit>=3.0",
|
|
29
31
|
]
|
|
30
32
|
|
|
@@ -42,6 +44,7 @@ build-backend = "hatchling.build"
|
|
|
42
44
|
|
|
43
45
|
[tool.hatch.version]
|
|
44
46
|
source = "vcs"
|
|
47
|
+
fallback-version = "0.0.0"
|
|
45
48
|
|
|
46
49
|
[tool.hatch.build.hooks.vcs]
|
|
47
50
|
version-file = "src/drs/_version.py"
|
|
@@ -51,6 +54,7 @@ packages = ["src/drs"]
|
|
|
51
54
|
|
|
52
55
|
[dependency-groups]
|
|
53
56
|
dev = [
|
|
57
|
+
"cryptography>=46",
|
|
54
58
|
"pytest>=9.0.2",
|
|
55
59
|
"pytest-asyncio>=1.3.0",
|
|
56
60
|
"ruff>=0.8",
|
|
@@ -19,9 +19,14 @@
|
|
|
19
19
|
Generates api_registry.json — a machine-readable map of every Dremio API
|
|
20
20
|
endpoint the js-sdk calls, grouped by resource and SKU (oss/enterprise/cloud).
|
|
21
21
|
|
|
22
|
+
This parser needs the SDK's TypeScript source (src/*.ts), which is only
|
|
23
|
+
available from Dremio's internal SDK repository. The public npm package
|
|
24
|
+
@dremio/js-sdk ships compiled dist/ output only and cannot be parsed here.
|
|
25
|
+
|
|
22
26
|
Usage:
|
|
23
|
-
# Clone js-sdk first (or point to existing checkout)
|
|
24
|
-
|
|
27
|
+
# Clone the internal js-sdk source first (or point to existing checkout).
|
|
28
|
+
# <internal-js-sdk-repo> is Dremio's internal SDK repository (not public).
|
|
29
|
+
git clone <internal-js-sdk-repo> /tmp/js-sdk
|
|
25
30
|
|
|
26
31
|
# Generate registry
|
|
27
32
|
python scripts/parse_jssdk.py --sdk-path /tmp/js-sdk
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.1.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 1,
|
|
21
|
+
__version__ = version = '2.1.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 1, 3)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (C) 2017-2026 Dremio Corporation
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
"""Configuration and authentication for Dremio Cloud."""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import logging
|
|
21
|
+
import os
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
from typing import Any
|
|
24
|
+
|
|
25
|
+
import yaml
|
|
26
|
+
from pydantic import BaseModel
|
|
27
|
+
|
|
28
|
+
logger = logging.getLogger(__name__)
|
|
29
|
+
|
|
30
|
+
DEFAULT_CONFIG_PATH = Path.home() / ".config" / "dremioai" / "config.yaml"
|
|
31
|
+
DEFAULT_URI = "https://api.dremio.cloud"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class OAuthConfig(BaseModel):
|
|
35
|
+
"""OAuth token state stored in the config file."""
|
|
36
|
+
|
|
37
|
+
access_token: str | None = None
|
|
38
|
+
refresh_token: str | None = None
|
|
39
|
+
client_id: str | None = None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class DrsConfig(BaseModel):
|
|
43
|
+
uri: str = DEFAULT_URI
|
|
44
|
+
pat: str
|
|
45
|
+
project_id: str
|
|
46
|
+
oauth: OAuthConfig | None = None
|
|
47
|
+
auth_source: str = "file" # "oauth" | "file" | "env" | "cli"
|
|
48
|
+
config_path: Path = DEFAULT_CONFIG_PATH
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def load_config(
|
|
52
|
+
config_path: Path | None = None,
|
|
53
|
+
*,
|
|
54
|
+
cli_token: str | None = None,
|
|
55
|
+
cli_project_id: str | None = None,
|
|
56
|
+
cli_uri: str | None = None,
|
|
57
|
+
) -> DrsConfig:
|
|
58
|
+
"""Load config with resolution order: CLI args > env vars > config file > defaults.
|
|
59
|
+
|
|
60
|
+
Authentication priority:
|
|
61
|
+
1. --token CLI arg
|
|
62
|
+
2. DREMIO_TOKEN / DREMIO_PAT env var
|
|
63
|
+
3. Config file oauth.access_token (from OAuth login)
|
|
64
|
+
4. Config file pat/token field
|
|
65
|
+
"""
|
|
66
|
+
# -- Config file (lowest priority) --
|
|
67
|
+
file_values: dict[str, Any] = {}
|
|
68
|
+
oauth_config: OAuthConfig | None = None
|
|
69
|
+
path = config_path or DEFAULT_CONFIG_PATH
|
|
70
|
+
if path.exists():
|
|
71
|
+
with path.open() as f:
|
|
72
|
+
raw = yaml.safe_load(f) or {}
|
|
73
|
+
file_values = {
|
|
74
|
+
"uri": raw.get("uri", raw.get("endpoint")),
|
|
75
|
+
"pat": raw.get("pat", raw.get("token")),
|
|
76
|
+
"project_id": raw.get("project_id", raw.get("projectId")),
|
|
77
|
+
}
|
|
78
|
+
file_values = {k: v for k, v in file_values.items() if v is not None}
|
|
79
|
+
|
|
80
|
+
# Load OAuth section if present
|
|
81
|
+
if "oauth" in raw and isinstance(raw["oauth"], dict):
|
|
82
|
+
oauth_config = OAuthConfig(
|
|
83
|
+
access_token=raw["oauth"].get("access_token"),
|
|
84
|
+
refresh_token=raw["oauth"].get("refresh_token"),
|
|
85
|
+
client_id=raw["oauth"].get("client_id"),
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
# -- Determine auth source: OAuth access_token overrides file PAT --
|
|
89
|
+
auth_source = "file"
|
|
90
|
+
if oauth_config and oauth_config.access_token:
|
|
91
|
+
file_values["pat"] = oauth_config.access_token
|
|
92
|
+
auth_source = "oauth"
|
|
93
|
+
|
|
94
|
+
# -- Env vars (override file + oauth) --
|
|
95
|
+
env_values: dict[str, Any] = {}
|
|
96
|
+
if v := os.environ.get("DREMIO_URI"):
|
|
97
|
+
env_values["uri"] = v
|
|
98
|
+
if (v := os.environ.get("DREMIO_TOKEN")) or (v := os.environ.get("DREMIO_PAT")):
|
|
99
|
+
env_values["pat"] = v
|
|
100
|
+
if v := os.environ.get("DREMIO_PROJECT_ID"):
|
|
101
|
+
env_values["project_id"] = v
|
|
102
|
+
|
|
103
|
+
# -- Merge: defaults < file < env --
|
|
104
|
+
merged: dict[str, Any] = {"uri": DEFAULT_URI}
|
|
105
|
+
merged.update(file_values)
|
|
106
|
+
if "pat" in env_values:
|
|
107
|
+
auth_source = "env"
|
|
108
|
+
merged.update(env_values)
|
|
109
|
+
|
|
110
|
+
# -- CLI args (highest priority, override everything) --
|
|
111
|
+
if cli_uri:
|
|
112
|
+
merged["uri"] = cli_uri
|
|
113
|
+
if cli_project_id:
|
|
114
|
+
merged["project_id"] = cli_project_id
|
|
115
|
+
if cli_token:
|
|
116
|
+
merged["pat"] = cli_token
|
|
117
|
+
auth_source = "cli"
|
|
118
|
+
|
|
119
|
+
config = DrsConfig(**merged, auth_source=auth_source, config_path=path)
|
|
120
|
+
config.oauth = oauth_config
|
|
121
|
+
return config
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def save_oauth_tokens(
|
|
125
|
+
access_token: str,
|
|
126
|
+
refresh_token: str | None,
|
|
127
|
+
client_id: str,
|
|
128
|
+
config_path: Path | None = None,
|
|
129
|
+
) -> None:
|
|
130
|
+
"""Write OAuth tokens to the config file (preserves other fields)."""
|
|
131
|
+
path = config_path or DEFAULT_CONFIG_PATH
|
|
132
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
133
|
+
|
|
134
|
+
# Read existing config
|
|
135
|
+
raw: dict[str, Any] = {}
|
|
136
|
+
if path.exists():
|
|
137
|
+
with path.open() as f:
|
|
138
|
+
raw = yaml.safe_load(f) or {}
|
|
139
|
+
|
|
140
|
+
# Update oauth section
|
|
141
|
+
raw["oauth"] = {
|
|
142
|
+
"access_token": access_token,
|
|
143
|
+
"refresh_token": refresh_token,
|
|
144
|
+
"client_id": client_id,
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
# Write back
|
|
148
|
+
header = "# Dremio CLI config — generated by 'dremio setup' / 'dremio auth login'\n"
|
|
149
|
+
path.write_text(header + yaml.dump(raw, default_flow_style=False, sort_keys=False))
|
|
150
|
+
path.chmod(0o600)
|
|
151
|
+
logger.debug("OAuth tokens saved to %s", path)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def clear_oauth_tokens(config_path: Path | None = None) -> None:
|
|
155
|
+
"""Remove OAuth tokens from the config file."""
|
|
156
|
+
path = config_path or DEFAULT_CONFIG_PATH
|
|
157
|
+
if not path.exists():
|
|
158
|
+
return
|
|
159
|
+
|
|
160
|
+
with path.open() as f:
|
|
161
|
+
raw = yaml.safe_load(f) or {}
|
|
162
|
+
|
|
163
|
+
if "oauth" in raw:
|
|
164
|
+
del raw["oauth"]
|
|
165
|
+
header = "# Dremio CLI config — generated by 'dremio setup' / 'dremio auth login'\n"
|
|
166
|
+
path.write_text(header + yaml.dump(raw, default_flow_style=False, sort_keys=False))
|
|
167
|
+
path.chmod(0o600)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def get_config_path_from_context(config_path: Path | None = None) -> Path:
|
|
171
|
+
"""Return the effective config path."""
|
|
172
|
+
return config_path or DEFAULT_CONFIG_PATH
|