Skip to content

Commit c6a5e3f

Browse files
committed
Add standalone uninstall.sh script and update documentation
1 parent 6607392 commit c6a5e3f

3 files changed

Lines changed: 82 additions & 1 deletion

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ If you just want to run a local build without global registration:
129129
The executable binary will be generated at:
130130
`./library-insight-cli/build/install/library-insight/bin/library-insight`
131131

132+
### Uninstallation
133+
134+
To cleanly remove the global CLI binary, installation files, and registered AI agent skills from your system:
135+
136+
```bash
137+
curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/uninstall.sh | bash
138+
```
139+
132140
---
133141

134142
## AI Agent Skill Integration

docs/index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ <h3>skills</h3>
463463

464464
<article class="command-card">
465465
<h3>doctor</h3>
466-
<p>Checks Java, Node.js, cache, and AI skill setup.</p>
466+
<p>Checks Java, cache, and AI skill setup.</p>
467467
<pre><code>library-insight doctor</code></pre>
468468
</article>
469469

@@ -472,6 +472,12 @@ <h3>clear-cache</h3>
472472
<p>Deletes downloaded Maven artifacts from the local Library Insight cache.</p>
473473
<pre><code>library-insight clear-cache</code></pre>
474474
</article>
475+
476+
<article class="command-card">
477+
<h3>uninstall</h3>
478+
<p>Cleanly removes global binary symlink, installation files, and registered AI agent skills.</p>
479+
<pre><code>curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/uninstall.sh | bash</code></pre>
480+
</article>
475481
</div>
476482
</div>
477483

uninstall.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/bash
2+
# ==========================================================================
3+
# Library Insight - Uninstaller Script
4+
# ==========================================================================
5+
# This script removes the global library-insight binary symlink, the
6+
# installation directory ($HOME/.library-insight), and all registered AI skills.
7+
#
8+
# Usage:
9+
# curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/uninstall.sh | bash
10+
# or
11+
# ./uninstall.sh
12+
# ==========================================================================
13+
14+
set -e
15+
16+
INSTALL_DIR="$HOME/.library-insight"
17+
SYMLINK="/usr/local/bin/library-insight"
18+
19+
echo "=================================================="
20+
echo " Uninstalling Library Insight..."
21+
echo "=================================================="
22+
23+
# 1. Remove global symlink
24+
if [ -L "$SYMLINK" ] || [ -f "$SYMLINK" ]; then
25+
echo "Removing global symlink at $SYMLINK..."
26+
if [ -w "/usr/local/bin" ]; then
27+
rm -f "$SYMLINK"
28+
else
29+
sudo rm -f "$SYMLINK"
30+
fi
31+
echo " -> Symlink removed."
32+
fi
33+
34+
# 2. Remove installation directory and caches
35+
if [ -d "$INSTALL_DIR" ]; then
36+
echo "Removing installation directory ($INSTALL_DIR)..."
37+
rm -rf "$INSTALL_DIR"
38+
echo " -> Installation directory removed."
39+
fi
40+
41+
# 3. Remove global AI Agent Skill registrations
42+
echo "Removing registered global AI Agent Skills..."
43+
SKILL_PATHS=(
44+
"$HOME/.claude/skills/library-insight"
45+
"$HOME/.agents/skills/library-insight"
46+
"$HOME/.codex/skills/library-insight"
47+
"$HOME/.cursor/skills/library-insight"
48+
"$HOME/.gemini/skills/library-insight"
49+
"$HOME/.gemini/config/skills/library-insight"
50+
"$HOME/.copilot/skills/library-insight"
51+
"$HOME/.junie/skills/library-insight"
52+
)
53+
54+
REMOVED_SKILLS=0
55+
for path in "${SKILL_PATHS[@]}"; do
56+
if [ -d "$path" ]; then
57+
rm -rf "$path"
58+
echo " -> Removed AI Skill at: $path"
59+
REMOVED_SKILLS=$((REMOVED_SKILLS + 1))
60+
fi
61+
done
62+
63+
echo ""
64+
echo "=================================================="
65+
echo " SUCCESS: Library Insight has been completely uninstalled!"
66+
echo "=================================================="
67+
echo ""

0 commit comments

Comments
 (0)