skillpull 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/skillpull +18 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillpull",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Sync AI agent skills from Git repositories to Claude, Codex, Kiro, and Cursor",
5
5
  "bin": {
6
6
  "skillpull": "./skillpull"
package/skillpull CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- VERSION="0.3.2"
4
+ VERSION="0.3.3"
5
5
  MANIFEST_FILE=".skillpull.json"
6
6
  TMPDIR_PREFIX="skillpull"
7
7
  CONFIG_DIR="$HOME/.config/skillpull"
@@ -670,19 +670,18 @@ cmd_push() {
670
670
  }
671
671
 
672
672
  cmd_uninstall() {
673
- local global_bin="${SKILLPULL_INSTALL_DIR:-$HOME/.local/bin}/skillpull"
673
+ local self; self="$(realpath "$0" 2>/dev/null || echo "$0")"
674
+ local local_bin="${SKILLPULL_INSTALL_DIR:-$HOME/.local/bin}/skillpull"
674
675
 
675
676
  printf "\n ${CYAN}Uninstall skillpull${RESET}\n\n"
676
677
 
677
- # Remove binary
678
- if [[ -f "$global_bin" ]]; then
679
- rm -f "$global_bin"
680
- info "Removed $global_bin"
681
- else
682
- dim "Binary not found at $global_bin"
678
+ # Remove local binary if exists
679
+ if [[ -f "$local_bin" ]]; then
680
+ rm -f "$local_bin"
681
+ info "Removed $local_bin"
683
682
  fi
684
683
 
685
- # Ask about config
684
+ # Remove config
686
685
  if [[ -d "$CONFIG_DIR" ]]; then
687
686
  printf " Remove config (~/.config/skillpull)? (y/n) "
688
687
  read -r yn
@@ -694,13 +693,16 @@ cmd_uninstall() {
694
693
  fi
695
694
  fi
696
695
 
697
- # npm global
698
- if command -v npm &>/dev/null && npm ls -g skillpull &>/dev/null 2>&1; then
699
- printf " Also run 'npm uninstall -g skillpull'? (y/n) "
700
- read -r yn
701
- if [[ "$yn" == "y" || "$yn" == "Y" ]]; then
702
- npm uninstall -g skillpull
703
- info "npm global package removed"
696
+ # npm global uninstall
697
+ if command -v npm &>/dev/null; then
698
+ local npm_global; npm_global="$(npm root -g 2>/dev/null)/../bin/skillpull"
699
+ if [[ -f "$npm_global" ]] || npm ls -g skillpull &>/dev/null 2>&1; then
700
+ printf " Remove npm global package? (y/n) "
701
+ read -r yn
702
+ if [[ "$yn" == "y" || "$yn" == "Y" ]]; then
703
+ npm uninstall -g skillpull 2>/dev/null
704
+ info "npm global package removed"
705
+ fi
704
706
  fi
705
707
  fi
706
708