Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nextchanges/cli/aitools-install-print-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `databricks aitools install` now prints the directory it installed skills into (for example `Installed 1 skill in ~/.databricks/aitools/skills.`), so agents can open the installed `SKILL.md` files without searching for them. ([#7668](https://github.com/databricks/cli/pull/7668))
2 changes: 1 addition & 1 deletion acceptance/cmd/aitools/install-host-metadata/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

=== --debug still shows the hostmetadata line, at debug level
6 changes: 3 additions & 3 deletions acceptance/cmd/aitools/telemetry/install/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

>>> print_telemetry
{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}}
Expand All @@ -23,7 +23,7 @@ Installed 1 skill.
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

>>> print_telemetry
{"command":"aitools_install","exit_code":0,"aitools_command_event":{"command":"INSTALL","stage":"STARTED","interactive":false,"install_mode":"SKILLS_ONLY"}}
Expand All @@ -41,7 +41,7 @@ Installed 1 skill.
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

>>> print_requests.py //oidc/v1/token //telemetry-ext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Installing Databricks skills for Cursor...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

=== update: the background auth resolution prints nothing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Warn: --experimental was set but the manifest at test-ref exposes no experimental skills. Set DATABRICKS_SKILLS_REF to a release or ref that includes them.
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Skipped the plugin for Claude Code: 'claude' is not on PATH. Installing skill fi
Installing Databricks skills for Claude Code, Cursor...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.
Claude Code has skill files

=== a plugin installed with Claude Code itself is kept, without skill files next to it
Expand All @@ -16,7 +16,7 @@ Claude Code already has the databricks plugin; it was not refreshed because 'cla
Installing Databricks skills for Cursor...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.
Claude Code has no skill files

>>> [CLI] aitools update --force
Expand All @@ -38,7 +38,7 @@ Error: Claude Code: 'claude' is not on PATH
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

=== project scope: a personal plugin does not replace the project's skill files

Expand All @@ -47,7 +47,7 @@ Skipped the plugin for Claude Code: 'claude' is not on PATH. Installing skill fi
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/project/.databricks/aitools/skills.
Skipped Cursor: does not support project-scoped skills
To set up Cursor in the global scope, run: databricks aitools install --scope=global --agents=cursor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Flag --global has been deprecated, use --scope=global
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

=== install a specific experimental skill

Expand All @@ -17,7 +17,7 @@ Flag --global has been deprecated, use --scope=global
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

=== asking for an experimental skill without --experimental flag errors out

Expand Down
6 changes: 3 additions & 3 deletions acceptance/experimental/aitools/skills/install/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Flag --global has been deprecated, use --scope=global
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 1 skill.
Installed 1 skill in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

=== re-run with --experimental installs the experimental one too

Expand All @@ -17,7 +17,7 @@ Flag --global has been deprecated, use --scope=global
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 2 skills.
Installed 2 skills in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

=== no-op re-run is idempotent (no new fetches, no errors)

Expand All @@ -27,4 +27,4 @@ Flag --global has been deprecated, use --scope=global
Installing Databricks skills for Claude Code...
Using skills version test-ref
Fetching skills manifest...
Installed 2 skills.
Installed 2 skills in [TEST_TMP_DIR]/home/.databricks/aitools/skills.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Flag --global has been deprecated, use --scope=global
Installing Databricks skills for Cursor...
Using skills version test-ref
Fetching skills manifest...
Installed 2 skills.
Installed 2 skills in [TEST_TMP_DIR]/home/.databricks/aitools/skills.

=== update against a release where beta is gone: alpha updates, beta is pruned

Expand Down
4 changes: 3 additions & 1 deletion libs/aitools/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,9 @@ func InstallSkillsForAgents(ctx context.Context, src ManifestSource, targetAgent
if len(targetSkills) == 1 {
noun = "skill"
}
cmdio.LogProgress(ctx, fmt.Sprintf("Installed %d %s.", len(targetSkills), noun))
// Name the directory so an agent can open the installed SKILL.md files
// instead of searching the filesystem for them.
cmdio.LogProgress(ctx, fmt.Sprintf("Installed %d %s in %s.", len(targetSkills), noun, filepath.ToSlash(baseDir)))
return nil
}

Expand Down
16 changes: 8 additions & 8 deletions libs/aitools/installer/installer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ func TestInstallSkillsForAgentsWritesState(t *testing.T) {
// non-interactive test, so only these plain lines remain.
assert.Contains(t, stderr.String(), "Using skills version")
assert.Contains(t, stderr.String(), "Fetching skills manifest...")
assert.Contains(t, stderr.String(), "Installed 2 skills.")
assert.Contains(t, stderr.String(), "Installed 2 skills in ")
}

func setupSkillsFallback(t *testing.T, latestErr error) (ManifestSource, string) {
Expand Down Expand Up @@ -782,7 +782,7 @@ func TestInstallSkillForSingleWritesState(t *testing.T) {
assert.Len(t, state.Skills, 1)
assert.Equal(t, "0.1.0", state.Skills["databricks-sql"])

assert.Contains(t, stderr.String(), "Installed 1 skill.")
assert.Contains(t, stderr.String(), "Installed 1 skill in ")
}

func TestInstallSkillsSpecificNotFound(t *testing.T) {
Expand Down Expand Up @@ -827,7 +827,7 @@ func TestExperimentalSkillsSkippedByDefault(t *testing.T) {
assert.Len(t, state.Skills, 2)
assert.NotContains(t, state.Skills, "databricks-iceberg")

assert.Contains(t, stderr.String(), "Installed 2 skills.")
assert.Contains(t, stderr.String(), "Installed 2 skills in ")
}

func TestExperimentalSkillsIncludedWithFlag(t *testing.T) {
Expand Down Expand Up @@ -858,7 +858,7 @@ func TestExperimentalSkillsIncludedWithFlag(t *testing.T) {
assert.Contains(t, state.Skills, "databricks-iceberg")
assert.True(t, state.IncludeExperimental)

assert.Contains(t, stderr.String(), "Installed 3 skills.")
assert.Contains(t, stderr.String(), "Installed 3 skills in ")
}

func TestMinCLIVersionSkipWithWarningForInstallAll(t *testing.T) {
Expand Down Expand Up @@ -893,7 +893,7 @@ func TestMinCLIVersionSkipWithWarningForInstallAll(t *testing.T) {
assert.Len(t, state.Skills, 2)
assert.NotContains(t, state.Skills, "databricks-future")

assert.Contains(t, stderr.String(), "Installed 2 skills.")
assert.Contains(t, stderr.String(), "Installed 2 skills in ")
assert.Contains(t, logBuf.String(), "requires CLI version 0.300.0")
}

Expand Down Expand Up @@ -1105,7 +1105,7 @@ func TestLegacyFullInstallAllowed(t *testing.T) {
err := InstallSkillsForAgents(ctx, src, []*agents.Agent{agent}, InstallOptions{})
require.NoError(t, err)

assert.Contains(t, stderr.String(), "Installed 2 skills.")
assert.Contains(t, stderr.String(), "Installed 2 skills in ")

state, err := LoadState(globalDir)
require.NoError(t, err)
Expand Down Expand Up @@ -1190,7 +1190,7 @@ func TestInstallProjectScopeWritesState(t *testing.T) {
assert.Equal(t, testSkillsRef, state.Release)
assert.Len(t, state.Skills, 2)

assert.Contains(t, stderr.String(), "Installed 2 skills.")
assert.Contains(t, stderr.String(), "Installed 2 skills in "+filepath.ToSlash(projectSkillsDir)+".")
}

func TestInstallProjectScopeCreatesSymlinks(t *testing.T) {
Expand Down Expand Up @@ -1261,7 +1261,7 @@ func TestInstallProjectScopeFiltersIncompatibleAgents(t *testing.T) {
require.NoError(t, err)

assert.Contains(t, stderr.String(), "Skipped No Project Agent: does not support project-scoped skills.")
assert.Contains(t, stderr.String(), "Installed 2 skills.")
assert.Contains(t, stderr.String(), "Installed 2 skills in ")
}

func TestInstallProjectScopeZeroCompatibleAgentsReturnsError(t *testing.T) {
Expand Down
Loading