Repository navigation
feat(plugin): ship the hotdata skill as the hotdata-cli Claude Code plugin #353
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
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,12 @@ | ||
| { | ||
| "name": "hotdata-cli", | ||
| "description": "Teach Claude the Hotdata CLI: workspaces, databases, SQL, ingest, search, analytics, and geospatial", | ||
| "version": "0.43.0", | ||
| "author": { | ||
| "name": "Hotdata", | ||
| "url": "https://www.hotdata.dev" | ||
| }, | ||
| "homepage": "https://www.hotdata.dev", | ||
| "repository": "https://github.com/hotdata-dev/hotdata-cli", | ||
| "license": "MIT" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,21 @@ checks for a new release before API commands and offers to upgrade (set | |
| `HOTDATA_NO_UPDATE_CHECK=1` to skip). Enable tab completion with | ||
| `hotdata manage completions bash|zsh|fish`. | ||
|
|
||
| ### Claude Code plugin | ||
|
|
||
| To get the agent skill through Claude Code's plugin manager instead, which | ||
| updates it with each release: | ||
|
|
||
| ``` | ||
| /plugin marketplace add hotdata-dev/claude-plugins | ||
| /plugin install hotdata-cli@hotdata | ||
| ``` | ||
|
|
||
| The plugin checks for the CLI when a session starts and offers to install it if | ||
| it's missing. Use either the plugin or the installer's skill, not both: if you | ||
| installed the CLI with the script above, install it with `HOTDATA_NO_SKILLS=1` | ||
| or Claude Code will list the skill twice. | ||
|
Contributor
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: Tell users who already ran the installer how to remove the existing skill copy (not blocking). Suggested fix: name the command or path that removes the installer's copy, for example Consequence: |
||
|
|
||
| ## Quickstart | ||
|
|
||
| ```sh | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #!/usr/bin/env bash | ||
| # SessionStart hook for the hotdata-cli Claude Code plugin. | ||
| # | ||
| # The plugin ships the skill, not the binary. Stay silent when the CLI is | ||
| # reachable. When it isn't, stdout becomes session context asking Claude to | ||
| # offer the installer rather than run it: piping curl into sh on every session | ||
| # start is not something users agreed to by installing a skill. | ||
|
|
||
| set -u | ||
|
|
||
| DIST_BIN_DIR="$HOME/.hotdata/cli" | ||
|
|
||
| if command -v hotdata >/dev/null 2>&1; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Without Homebrew the installer puts the binary in ~/.hotdata/cli, which is | ||
| # not on PATH until the user's shell profile is reloaded. | ||
| if [ -x "$DIST_BIN_DIR/hotdata" ]; then | ||
| if [ -n "${CLAUDE_ENV_FILE:-}" ]; then | ||
| echo "export PATH=\"$DIST_BIN_DIR:\$PATH\"" >> "$CLAUDE_ENV_FILE" | ||
| fi | ||
|
Contributor
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: Print a context line when Suggested fix: add an Consequence: with no |
||
| exit 0 | ||
| fi | ||
|
|
||
| # HOTDATA_NO_SKILLS=1: the plugin already provides the skill, so the installer | ||
| # must not add a second copy to ~/.claude/skills. | ||
| cat <<'EOF' | ||
| The hotdata CLI is not installed. Before running any hotdata command, tell the | ||
| user and ask whether to install it. If they agree, run: | ||
|
|
||
| curl -fsSL https://hotdata.dev/install | HOTDATA_NO_SKILLS=1 sh | ||
|
|
||
| If the binary lands in ~/.hotdata/cli, call it as ~/.hotdata/cli/hotdata for the | ||
| rest of this session. | ||
| EOF | ||
| exit 0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "hooks": { | ||
| "SessionStart": [ | ||
| { | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "\"${CLAUDE_PLUGIN_ROOT}\"/hooks/check-cli.sh" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } |
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: Merge this section only after
hotdata-dev/claude-pluginsis public on GitHub (not blocking).Consequence: the PR description states that the marketplace repo does not exist yet. Until the marketplace repo exists,
/plugin marketplace add hotdata-dev/claude-pluginsfails for every README reader.