main
Caleb
Publish 0.4.0
2fca110
#!/bin/bash
# install.sh for hardware-calculator (app): links the hwcalc CLI and installs the user skill. Runs from the module dir.
set -euo pipefail
DIR="$(cd "$(dirname "$0")" && pwd)"
command -v node >/dev/null || { echo "hwcalc needs Node.js 18+ on PATH" >&2; exit 1; }
BIN_DIR="${HOME}/.local/bin"; mkdir -p "$BIN_DIR"
chmod 0755 "$DIR/bin/hwcalc"
ln -sfn "$DIR/bin/hwcalc" "$BIN_DIR/hwcalc" # a link, not a copy: the CLI loads calcs.js/server.js beside it
echo "Linked hwcalc -> $BIN_DIR/hwcalc"
mkdir -p "${HOME}/.claude/skills/hwcalc"
install -m 0644 "$DIR/skills/hwcalc/SKILL.md" "${HOME}/.claude/skills/hwcalc/SKILL.md"
echo "Installed skill -> ~/.claude/skills/hwcalc/SKILL.md"
echo "Hardware Calculator installed. Try: hwcalc --ai-thread \"<name>\" start or hwcalc calc crystal CL=12p Cs=4p"