From f60d46c4f5ebe128a6a1393cbbfa9f44d767e3c3 Mon Sep 17 00:00:00 2001 From: Willie Hung Date: Wed, 21 Jan 2026 01:11:07 +0800 Subject: [PATCH] feat: remove ss symlink, add alias docs - Remove automatic ss symlink creation from install.sh and upgrade - Add optional alias setup instructions to README - Update skill version to 0.6.4 --- README.md | 16 +++++++---- cmd/skillshare/upgrade.go | 37 +------------------------- install.sh | 12 ++------- skills/skillshare/SKILL.md | 4 +-- skills/skillshare/references/status.md | 4 +-- tests/integration/upgrade_test.go | 1 + 6 files changed, 18 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 68eee2a29..8ad673673 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,6 @@ AI reads skillshare skill → runs: skillshare sync curl -fsSL https://raw.githubusercontent.com/runkids/skillshare/main/install.sh | sh ``` -> **Shorthand:** After install, use `ss` instead of `skillshare` (e.g., `ss status`) - ### Homebrew (macOS) ```bash @@ -78,9 +76,17 @@ brew install runkids/tap/skillshare ### Uninstall ```bash -brew uninstall skillshare # Homebrew -sudo rm /usr/local/bin/skillshare /usr/local/bin/ss # Manual install -rm -rf ~/.config/skillshare # Config & data (optional) +brew uninstall skillshare # Homebrew +sudo rm /usr/local/bin/skillshare # Manual install +rm -rf ~/.config/skillshare # Config & data (optional) +``` + +### Shorthand (Optional) + +Add an alias to your shell config (`~/.zshrc` or `~/.bashrc`): + +```bash +alias ss='skillshare' ``` ## Quick Start diff --git a/cmd/skillshare/upgrade.go b/cmd/skillshare/upgrade.go index 357fcc9ca..f74fa57c5 100644 --- a/cmd/skillshare/upgrade.go +++ b/cmd/skillshare/upgrade.go @@ -95,12 +95,7 @@ func upgradeCLIBinary(dryRun, force bool) error { return nil } ui.Info("Running: brew upgrade runkids/tap/skillshare") - if err := runBrewUpgrade(); err != nil { - return err - } - // Ensure symlink after brew upgrade - ensureShorthandSymlink(execPath) - return nil + return runBrewUpgrade() } // Get current version @@ -117,8 +112,6 @@ func upgradeCLIBinary(dryRun, force bool) error { if currentVersion == latestVersion && !force { ui.Success("Already up to date") - // Still ensure symlink exists - ensureShorthandSymlink(execPath) return nil } @@ -145,9 +138,6 @@ func upgradeCLIBinary(dryRun, force bool) error { return fmt.Errorf("failed to upgrade: %w", err) } - // Create ss symlink - ensureShorthandSymlink(execPath) - ui.Success("Upgraded to %s", latestVersion) return nil } @@ -359,28 +349,3 @@ Examples: skillshare upgrade --skill # Upgrade skill only skillshare upgrade --dry-run # Preview upgrades`) } - -// ensureShorthandSymlink creates ss -> skillshare symlink if not exists -func ensureShorthandSymlink(skillsharePath string) { - dir := filepath.Dir(skillsharePath) - ssPath := filepath.Join(dir, "ss") - - // Check if ss already exists and points to skillshare - if target, err := os.Readlink(ssPath); err == nil { - if filepath.Base(target) == "skillshare" { - return // Already correct - } - } - - // Remove existing ss (file or wrong symlink) - os.Remove(ssPath) - - // Create symlink - if err := os.Symlink(skillsharePath, ssPath); err != nil { - // Try with sudo hint - ui.Warning("Could not create 'ss' shorthand: %v", err) - ui.Info(" Run: sudo ln -sf %s %s", skillsharePath, ssPath) - } else { - ui.Success("Created 'ss' shorthand") - } -} diff --git a/install.sh b/install.sh index 030d704a9..af77dc48f 100755 --- a/install.sh +++ b/install.sh @@ -83,13 +83,6 @@ install() { fi chmod +x "$INSTALL_DIR/$BINARY_NAME" - - # Create shorthand symlink (ss -> skillshare) - if [ -w "$INSTALL_DIR" ]; then - ln -sf "$INSTALL_DIR/$BINARY_NAME" "$INSTALL_DIR/ss" - else - sudo ln -sf "$INSTALL_DIR/$BINARY_NAME" "$INSTALL_DIR/ss" - fi } # Verify installation @@ -97,13 +90,12 @@ verify() { if command -v "$BINARY_NAME" >/dev/null 2>&1; then info "" info "Successfully installed skillshare to $INSTALL_DIR/$BINARY_NAME" - info "Shorthand 'ss' also available" info "" "$BINARY_NAME" version info "" info "Get started:" - info " ss init # Initialize (or: skillshare init)" - info " ss --help # Show help" + info " skillshare init" + info " skillshare --help" else warn "Installed but '$BINARY_NAME' not in PATH. Add $INSTALL_DIR to your PATH." fi diff --git a/skills/skillshare/SKILL.md b/skills/skillshare/SKILL.md index 4312b5fd0..61d180bf0 100644 --- a/skills/skillshare/SKILL.md +++ b/skills/skillshare/SKILL.md @@ -1,14 +1,12 @@ --- name: skillshare -version: 0.6.3 +version: 0.6.4 description: Syncs skills across AI CLI tools from a single source of truth. Use when asked to "sync skills", "pull skills", "show status", "list skills", "install skill", "initialize skillshare", or manage skill targets. argument-hint: "[command] [target] [--dry-run]" --- # Skillshare CLI -> **Shorthand:** `ss` = `skillshare` (e.g., `ss status`, `ss sync`) - ``` Source: ~/.config/skillshare/skills ← Edit here (single source of truth) ↓ sync diff --git a/skills/skillshare/references/status.md b/skills/skillshare/references/status.md index 2c2e21a66..a1a5e070c 100644 --- a/skills/skillshare/references/status.md +++ b/skills/skillshare/references/status.md @@ -17,8 +17,8 @@ Targets: cursor ⚠ 1 diff ~/.cursor/skills Version: - ✓ CLI: 0.6.3 - ✓ Skill: 0.6.3 (up to date) + ✓ CLI: 0.6.4 + ✓ Skill: 0.6.4 (up to date) ``` ## diff diff --git a/tests/integration/upgrade_test.go b/tests/integration/upgrade_test.go index b97685f29..3b0aeb1a7 100644 --- a/tests/integration/upgrade_test.go +++ b/tests/integration/upgrade_test.go @@ -118,3 +118,4 @@ targets: {} // Source is github.com/runkids/skillshare/skills/skillshare result.AssertOutputContains(t, "github.com/runkids/skillshare") } +