You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
`databricks aitools list` learns `--output json`, emitting a structured
document so coding agents and CI can consume the
skill/version/installation matrix without scraping the tabwriter text
output. Text rendering is unchanged.
**Stacked on #4917** (uses `--scope` and the moved-to-top-level
`aitools/` package). Base will rebase to `main` once #4917 merges.
## JSON shape
```json
{
"release": "0.1.0",
"skills": [
{
"name": "databricks-jobs",
"latest_version": "1.0.0",
"experimental": false,
"installed": { "global": "1.0.0", "project": "0.9.0" }
}
],
"summary": {
"global": { "installed": 5, "total": 10 },
"project": { "installed": 3, "total": 10 }
}
}
```
- `installed` is keyed by scope; absent key = not installed in that
scope; empty map = not installed anywhere.
- `summary` only includes scopes that were queried, so `--scope=global`
narrows it to one key.
- `release` is the version string without the `v` prefix.
This is the documented public contract — field names and types should
not change without a major version bump.
## Why
`aitools list` is one of the surfaces an agent reaches for first
("what's installed, what's available, what's stale"). Scraping tabwriter
columns from stderr is fragile; a stable JSON contract makes the command
declarative for non-human callers. Matches the convention used by other
CLI commands that already honor `--output json` (`bundle validate`,
`pipelines run`, etc.).
## Test plan
- [ ] `databricks aitools list --output json` against a workspace with a
mix of installed/uninstalled skills, both scopes — JSON validates
against the shape above.
- [ ] `databricks aitools list --output json --scope=global` — `summary`
only contains `global`.
- [ ] `databricks aitools list` (no `--output`) — output is
byte-for-byte unchanged from main.
- [ ] Unit: `TestRenderListJSON`,
`TestRenderListJSONScopeFiltersSummary`, `TestInstalledStatusFromEntry`
cover the rendering paths.
This pull request was AI-assisted by Isaac.
Copy file name to clipboardExpand all lines: NEXT_CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
*`[__settings__].default_profile` is now consulted as a fallback by `databricks api`, `databricks auth token`, and bundle commands when neither `--profile` nor `DATABRICKS_CONFIG_PROFILE` is set. `databricks auth token` continues to give precedence to `DATABRICKS_HOST` over `default_profile`. For bundle commands, `default_profile` only applies when the bundle does not pin its own `workspace.host`.
13
13
*`databricks workspace import-dir` now skips `.git`, `.databricks`, and `node_modules` directories during recursive imports. To import one of these directories deliberately, pass it as `SOURCE_PATH` ([#5118](https://github.com/databricks/cli/pull/5118)).
14
14
*`databricks postgres create-role --help` now documents the `--json` body shape and rejects the common mistake of wrapping the body in `{"role": ...}` client-side with a hint pointing at the correct shape ([#5111](https://github.com/databricks/cli/pull/5111)).
15
+
*`databricks aitools list` honors `--output json`, emitting a structured `{release, skills[...], summary{}}` document so coding agents and CI can consume the skill/version/installation matrix without scraping the tabular text output ([#5233](https://github.com/databricks/cli/pull/5233)).
15
16
16
17
### Bundles
17
18
* Make sure warnings asking for approval are understood by agents ([#5239](https://github.com/databricks/cli/pull/5239))
0 commit comments