swarm repositories / source
aboutsummaryrefslogtreecommitdiff
path: root/scripts/install-local.sh
diff options
context:
space:
mode:
authormain <main@swarm.moe>2026-03-19 22:57:46 -0400
committermain <main@swarm.moe>2026-03-19 22:57:46 -0400
commit07588a86bc7dc66f6dbef7f87fbfaf9772cc0eda (patch)
tree50edd400e17dd9c1b2c817deb70587c9b1e46d38 /scripts/install-local.sh
parentf706910944ee8abe7b27a248596f7705059969d9 (diff)
downloadfidget_spinner-07588a86bc7dc66f6dbef7f87fbfaf9772cc0eda.zip
Install local CLI and skill links
Diffstat (limited to 'scripts/install-local.sh')
-rwxr-xr-xscripts/install-local.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/install-local.sh b/scripts/install-local.sh
new file mode 100755
index 0000000..b087f70
--- /dev/null
+++ b/scripts/install-local.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+SKILL_SOURCE_ROOT="${ROOT_DIR}/assets/codex-skills"
+LOCAL_ROOT="${1:-$HOME/.local}"
+SKILL_DEST_ROOT="${2:-$HOME/.codex/skills}"
+LOCAL_BIN_DIR="${LOCAL_ROOT}/bin"
+
+install_skill_link() {
+ local name="$1"
+ local source_dir="${SKILL_SOURCE_ROOT}/${name}"
+ local dest_dir="${SKILL_DEST_ROOT}/${name}"
+ mkdir -p "${SKILL_DEST_ROOT}"
+ rm -rf "${dest_dir}"
+ ln -s "${source_dir}" "${dest_dir}"
+ printf 'installed skill symlink: %s -> %s\n' "${dest_dir}" "${source_dir}"
+}
+
+mkdir -p "${LOCAL_BIN_DIR}"
+
+cargo build --release -p fidget-spinner-cli --manifest-path "${ROOT_DIR}/Cargo.toml"
+install -m 0755 \
+ "${ROOT_DIR}/target/release/fidget-spinner-cli" \
+ "${LOCAL_BIN_DIR}/fidget-spinner-cli"
+
+printf 'installed binary: %s\n' "${LOCAL_BIN_DIR}/fidget-spinner-cli"
+
+install_skill_link "fidget-spinner"
+install_skill_link "frontier-loop"
+
+printf 'mcp command: %s\n' "${LOCAL_BIN_DIR}/fidget-spinner-cli mcp serve"