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
2 changes: 2 additions & 0 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@
"homepage": "https://www.hotdata.dev",
"repository": "https://github.com/hotdata-dev/hotdata-cli",
"license": "MIT",
"privacyPolicyUrl": "https://www.hotdata.dev/privacy-policy",
"termsOfServiceUrl": "https://www.hotdata.dev/terms-of-service",
"icon": "./.claude-plugin/icon.png"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ What the plugin runs, sends, and fetches:
- **SessionStart hook** (`hooks/check-cli.sh`, Claude Code and Cowork only):
checks whether `hotdata` is on `PATH` or in `~/.hotdata/cli`. If it's only in
`~/.hotdata/cli`, it adds that folder to `PATH` for the session. If it's
missing, it asks Claude to offer the installer. The hook makes no network
requests, installs nothing, and sends no data.
missing, it asks Claude to offer to install the CLI. The hook makes no
network requests, installs nothing, and sends no data.
- **Installer**, only after you agree: `curl -fsSL https://hotdata.dev/install |
HOTDATA_NO_SKILLS=1 sh` downloads the CLI from this repository's GitHub
releases, or installs it with Homebrew if `brew` is present.
Expand Down
16 changes: 7 additions & 9 deletions hooks/check-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
#
# 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
# offer an install rather than run one: installing software on every session
# start is not something users agreed to by installing a skill.
#
# The install command itself lives in the skill, not here, so this hook runs
# nothing and fetches nothing that the directory's validator has to follow.

set -u

Expand All @@ -23,15 +26,10 @@ if [ -x "$DIST_BIN_DIR/hotdata" ]; then
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.
user and ask whether to install it. If they agree, follow the install steps in
the hotdata skill (the "Upgrade" section of skills/hotdata/SKILL.md), and set
HOTDATA_NO_SKILLS=1 because this plugin already provides the skill.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Restore the instruction to call the binary as ~/.hotdata/cli/hotdata after an install (not blocking).

The hook adds ~/.hotdata/cli to PATH only at session start. A prebuilt install during the session leaves hotdata off PATH until the next session. The removed text covered this case. The "Upgrade" section of skills/hotdata/SKILL.md (lines 492-498) does not cover it. Without the instruction, Claude runs hotdata and gets "command not found" right after a successful install.

Suggested replacement for the message body:

HOTDATA_NO_SKILLS=1 because this plugin already provides the skill. If the
binary lands in ~/.hotdata/cli, call it as ~/.hotdata/cli/hotdata for the rest
of this session.

This text has no curl or sh, so the validator change still holds.

EOF
exit 0
Loading