Repository navigation
aitools: emit Claude Code's native plugin install hint #7585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * When Claude Code runs the CLI without the Databricks plugin or skills, the CLI now also prints Claude Code's native `<claude-code-hint>` line, at most once per hour per Claude Code session together with the text hint, so Claude Code offers a one-click install of the Databricks plugin. Skills stored only in `~/.databricks/aitools/skills` or the legacy `~/.databricks/agent-skills` no longer count as installed for Claude Code, and `databricks auth token`, `databricks auth docker token` and the CLI commands that `databricks air images push` and `databricks apps init` run as subprocesses no longer print install hints. ([#7585](https://github.com/databricks/cli/pull/7585)) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| export CLAUDECODE=1 | ||
| # Claude Code sets CLAUDE_CODE_CHILD_SESSION in the commands it runs, which | ||
| # enables the native <claude-code-hint> line; CI suppresses it. | ||
| export CLAUDE_CODE_CHILD_SESSION=1 | ||
| unset CLAUDE_CODE_SESSION_ID | ||
| # CI and the CI/CD provider markers the SDK detects (GitHub Actions sets both). | ||
| unset CI GITHUB_ACTIONS GITLAB_CI JENKINS_URL TF_BUILD CIRCLECI TRAVIS BITBUCKET_BUILD_NUMBER PROJECT_ID CODEBUILD_BUILD_ARN TFC_RUN_ID | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] The same |
||
|
|
||
| # aitools commands skip the install hint; version exercises it without auth or network. | ||
| sethome ./empty-home | ||
|
|
@@ -16,3 +21,15 @@ trace CLAUDE_CONFIG_DIR= $CLI version | |
| title "Unset override uses the default installation" | ||
| unset CLAUDE_CONFIG_DIR | ||
| trace $CLI version | ||
|
|
||
| sethome ./empty-home | ||
| title "Outside a Claude Code subprocess only the text hint prints" | ||
| trace CLAUDE_CODE_CHILD_SESSION= $CLI version | ||
|
|
||
| # The session throttle lives in the file cache, which a host could disable. | ||
| export DATABRICKS_CACHE_ENABLED=true | ||
| title "Within one session both lines print once, so 2>&1 pipelines see them only on the first command" | ||
| export CLAUDE_CODE_SESSION_ID=session-1 | ||
| trace $CLI version | ||
| trace $CLI version | ||
| unset CLAUDE_CODE_SESSION_ID | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit]
.agents/skills/pr-checklist/SKILL.mdasks for entries that start with a verb, or with the affected command followed by "now". This one opens with a "When…" clause. At 678 characters it is also the longest fragment in.nextchanges/cliand puts four changes in one line. Suggest leading with the change, e.g. "Print Claude Code's native plugin install hint when…", and keeping the detection andauth tokennotes short.