From 07588a86bc7dc66f6dbef7f87fbfaf9772cc0eda Mon Sep 17 00:00:00 2001 From: main Date: Thu, 19 Mar 2026 22:57:46 -0400 Subject: Install local CLI and skill links --- README.md | 15 +++++++++++++++ scripts/install-codex-skill.sh | 21 --------------------- scripts/install-local.sh | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 21 deletions(-) delete mode 100755 scripts/install-codex-skill.sh create mode 100755 scripts/install-local.sh diff --git a/README.md b/README.md index 9e30b28..dbd78c6 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,21 @@ Not implemented yet: - strong markdown migration - cross-project indexing +## Local Install + +Install the release CLI into `~/.local/bin` and refresh the bundled skill +symlinks in `~/.codex/skills` with: + +```bash +./scripts/install-local.sh +``` + +Pass a different local install root or skill destination explicitly if needed: + +```bash +./scripts/install-local.sh /tmp/fidget-local /tmp/codex-skills +``` + ## Quickstart Initialize the current directory as a Fidget Spinner project: diff --git a/scripts/install-codex-skill.sh b/scripts/install-codex-skill.sh deleted file mode 100755 index dcd4121..0000000 --- a/scripts/install-codex-skill.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -SOURCE_ROOT="$ROOT_DIR/assets/codex-skills" -DEST_ROOT="${1:-$HOME/.codex/skills}" - -install_skill() { - local name="$1" - local source_dir="$SOURCE_ROOT/$name" - local dest_dir="$DEST_ROOT/$name" - mkdir -p "$DEST_ROOT" - rm -rf "$dest_dir" - ln -s "$source_dir" "$dest_dir" - printf 'installed skill symlink: %s -> %s\n' "$dest_dir" "$source_dir" -} - -install_skill "fidget-spinner" -install_skill "frontier-loop" - -printf 'mcp command: %s\n' "cargo run -p fidget-spinner-cli -- mcp serve" 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" -- cgit v1.2.3