Skip to content

Commit 4b97368

Browse files
committed
Remove npm dependency, streamline curl installer, and update doctor playground
1 parent 73960dd commit 4b97368

14 files changed

Lines changed: 74 additions & 767 deletions

File tree

.agents/skills/library-insight/SKILL.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ This tool extracts all classes, interfaces, methods, properties, and Javadoc/KDo
2020
## Command Reference
2121

2222
The command line tool `library-insight` can be executed globally by:
23-
* Installing via npm: `npm install -g library-insight`
24-
* Running instantly with npx: `npx library-insight <command> [options]`
25-
* Installing via shell: `~/.library-insight/bin/library-insight` (linked globally as `library-insight`)
23+
* Installing via installer script: `curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash`
24+
* Running local build: `~/.library-insight/bin/library-insight` (linked globally as `library-insight`)
2625

2726
## Available scripts
2827

.agents/skills/library-insight/scripts/install-cli.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,5 @@ if command -v library-insight &> /dev/null; then
55
exit 0
66
fi
77

8-
echo "library-insight not found. Installing..."
9-
if command -v npm &> /dev/null; then
10-
echo "npm found. Installing globally via npm..."
11-
npm install -g library-insight
12-
else
13-
echo "npm not found. Downloading and running the installer shell script..."
14-
curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash
15-
fi
8+
echo "library-insight not found. Installing via official installer script..."
9+
curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash

.github/workflows/release.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,3 @@ jobs:
5050
prerelease: false
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
54-
- name: Set up Node.js
55-
uses: actions/setup-node@v4
56-
with:
57-
node-version: '20'
58-
registry-url: 'https://registry.npmjs.org'
59-
60-
- name: Prepare npm package assets
61-
run: |
62-
# Copy dependent library jars
63-
mkdir -p npm/lib/
64-
cp -R library-insight-cli/build/install/library-insight/lib/* npm/lib/
65-
# Copy Custom AI Skill file
66-
cp .agents/skills/library-insight/SKILL.md npm/
67-
# Copy README file
68-
cp README.md npm/
69-
70-
- name: Publish to npm
71-
if: startsWith(github.ref, 'refs/tags/v')
72-
run: |
73-
cd npm
74-
# Synchronize package version with git tag
75-
VERSION=${GITHUB_REF#refs/tags/v}
76-
node -e "const fs = require('fs'); const pkg = require('./package.json'); pkg.version = '${VERSION}'; fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2));"
77-
# Publish to npm registry
78-
npm publish --access public
79-
env:
80-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -108,26 +108,17 @@ The system is composed of the following modules:
108108

109109
- JDK 17 or higher (Required to execute the Java/Kotlin runtime engine)
110110

111-
### Option A: Install via npm (Recommended)
111+
### Option A: Install via One-Line Shell Installer (Recommended)
112112

113-
You can install the CLI globally on your system instantly using Node Package Manager:
113+
You can install the CLI globally on your system instantly with zero Node.js/npm dependencies using the installer script:
114114

115115
```bash
116-
npm install -g library-insight
116+
curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash
117117
```
118118

119119
_(Once installed, you can execute the `library-insight` command directly from any folder)._
120120

121-
### Option B: Run installer script from local source
122-
123-
You can install and symlink the CLI globally from a local checkout:
124-
125-
```bash
126-
chmod +x install.sh
127-
./install.sh
128-
```
129-
130-
### Option C: Manual build from source
121+
### Option B: Manual build from source
131122

132123
If you just want to run a local build without global registration:
133124

@@ -148,7 +139,7 @@ The skill is designed around one rule: do not guess from web examples when the i
148139

149140
### 1. Global Auto-Integration
150141

151-
When you install the CLI globally via **Option A** (`npm install -g`) or **Option B** (`./install.sh`), a post-install script automatically copies the agent skill file into your user profile configurations:
142+
When you install the CLI globally via **Option A** (`install.sh`), the installer script automatically copies the agent skill file into your user profile configurations:
152143

153144
- `~/.cursor/skills/library-insight`
154145
- `~/.gemini/config/skills/library-insight`
@@ -176,7 +167,7 @@ This creates `.agents/skills/library-insight/SKILL.md` in the project root, enab
176167
## CLI Usage & Commands
177168

178169
> [!NOTE]
179-
> The examples below assume the executable has been installed globally (via npm or the installer script). You can execute it directly using:
170+
> The examples below assume the executable has been installed globally (via the installer script). You can execute it directly using:
180171
> `library-insight <command> [options]`
181172
182173
> [!IMPORTANT]
@@ -518,11 +509,7 @@ Library-Insight/
518509
│ │ └── search/
519510
│ │ └── SearchEngine.kt
520511
│ └── build.gradle.kts
521-
├── npm/ # npm package distribution packaging configuration
522-
│ ├── bin/
523-
│ │ ├── index.js # Global CLI entrypoint runner script
524-
│ │ └── postinstall.js # Auto skill registration script
525-
│ └── package.json # npm package metadata
512+
526513
├── sample/
527514
│ ├── src/
528515
│ │ └── main/

demo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# Requirements:
99
# - JDK 17+
10-
# - library-insight installed globally via: npm install -g library-insight
10+
# - library-insight installed globally via: curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash
1111
#
1212
# Usage:
1313
# chmod +x demo.sh

docs/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(() => {
22
'use strict';
33

4-
const INSTALL_CMD = 'npm install -g library-insight';
4+
const INSTALL_CMD = 'curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash';
55

66
/* ---------------------------------------------------------------------
77
Copy-to-clipboard

docs/index.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ <h1 class="hero__title">
7272
<div class="hero__actions">
7373
<div class="install-banner">
7474
<span class="install-banner__prompt">$</span>
75-
<code class="install-banner__cmd">npm install -g library-insight</code>
75+
<code class="install-banner__cmd">curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash</code>
7676
<button class="install-banner__copy" id="copyInstallBtn" aria-label="Copy install command">
7777
<svg class="icon-copy" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
7878
<svg class="icon-check" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M20 6 9 17l-5-5"/></svg>
@@ -323,7 +323,6 @@ <h2 class="section__title">Pick a command and see what it does.</h2>
323323
<pre class="terminal__panel" data-panel="doctor" role="tabpanel"><code><span class="tok-prompt">$</span> <span class="tok-cmd">library-insight doctor</span>
324324
<span class="tok-accent">Library Insight Diagnostics &amp; Doctor</span>
325325
<span class="tok-ok">Java Runtime Environment: OK (Java 17+ verified)</span>
326-
<span class="tok-ok">Node.js Environment: OK</span>
327326
<span class="tok-dim">Local Download Cache: Directory not created yet</span>
328327
<span class="tok-ok">Codex AI: INSTALLED (Verified)</span>
329328
<span class="tok-dim">Diagnostics completed.</span>
@@ -352,23 +351,23 @@ <h2 class="section__title">Start with the right workflow.</h2>
352351
<div class="step__index">01</div>
353352
<div class="step__content">
354353
<h3>Install the command</h3>
355-
<p>You need JDK 17 or newer. npm installs the <code>library-insight</code> command globally.</p>
354+
<p>You need JDK 17 or newer. Run the installer script to configure <code>library-insight</code> globally.</p>
356355
<div class="code-block">
357356
<span class="code-block__lang">bash</span>
358-
<pre><code><span class="tok-prompt">$</span> <span class="tok-cmd">npm install -g library-insight</span></code></pre>
357+
<pre><code><span class="tok-prompt">$</span> <span class="tok-cmd">curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash</span></code></pre>
359358
</div>
360359
</div>
361360
</article>
362361

363362
<article class="step">
364363
<div class="step__index">02</div>
365364
<div class="step__content">
366-
<h3>Check the workspace skill</h3>
367-
<p>The skill tells AI agents to verify real dependency APIs before writing code.</p>
365+
<h3>Initialize workspace skill</h3>
366+
<p>Scopes the agent skill to your current project root, creating <code>.agents/skills/library-insight/SKILL.md</code> for workspace-scoped AI agents.</p>
368367
<div class="code-block">
369368
<span class="code-block__lang">bash</span>
370-
<pre><code><span class="tok-prompt">$</span> <span class="tok-cmd">library-insight skills list</span>
371-
<span class="tok-ok">[Installed] library-insight</span></code></pre>
369+
<pre><code><span class="tok-prompt">$</span> <span class="tok-cmd">library-insight init</span>
370+
<span class="tok-ok">SUCCESS: AI Agent Skill initialized at .agents/skills/library-insight/SKILL.md</span></code></pre>
372371
</div>
373372
</div>
374373
</article>
@@ -483,7 +482,7 @@ <h3>Ready to understand a library faster?</h3>
483482
</div>
484483
<div class="install-banner install-banner--cta">
485484
<span class="install-banner__prompt">$</span>
486-
<code class="install-banner__cmd">npm install -g library-insight</code>
485+
<code class="install-banner__cmd">curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash</code>
487486
<button class="install-banner__copy" id="copyInstallBtnCta" aria-label="Copy install command">
488487
<svg class="icon-copy" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
489488
<svg class="icon-check" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M20 6 9 17l-5-5"/></svg>

install.sh

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/bash
22
set -e
33

4-
VERSION="1.0.0"
4+
# Fetch latest release version tag from GitHub API if not set
5+
if [ -z "$VERSION" ]; then
6+
LATEST_TAG=$(curl -s https://api.github.com/repos/Coding-Meet/Library-Insight/releases/latest | grep '"tag_name":' | sed -E 's/.*"v?([^"]+)".*/\1/')
7+
VERSION="${LATEST_TAG:-1.0.0}"
8+
fi
9+
510
INSTALL_DIR="$HOME/.library-insight"
611
ZIP_NAME="library-insight-cli-$VERSION.zip"
712
RELEASE_URL="https://github.com/Coding-Meet/Library-Insight/releases/download/v$VERSION/$ZIP_NAME"
@@ -59,28 +64,39 @@ fi
5964

6065
echo ""
6166
echo "=================================================="
62-
echo " Distributing AI Agent Skill to Global Configs..."
67+
echo " Distributing AI Agent Skill to Detected Configs..."
6368
echo "=================================================="
6469
SKILL_SOURCE=".agents/skills/library-insight/SKILL.md"
6570

6671
if [ -f "$SKILL_SOURCE" ]; then
67-
SKILL_PATHS=(
68-
"$HOME/.claude/skills/library-insight"
69-
"$HOME/.agents/skills/library-insight"
70-
"$HOME/.codex/skills/library-insight"
71-
"$HOME/.cursor/skills/library-insight"
72-
"$HOME/.gemini/skills/library-insight"
73-
"$HOME/.gemini/config/skills/library-insight"
74-
"$HOME/.copilot/skills/library-insight"
75-
"$HOME/.junie/skills/library-insight"
72+
PAIRS=(
73+
"$HOME/.claude:$HOME/.claude/skills/library-insight"
74+
"$HOME/.agents:$HOME/.agents/skills/library-insight"
75+
"$HOME/.codex:$HOME/.codex/skills/library-insight"
76+
"$HOME/.cursor:$HOME/.cursor/skills/library-insight"
77+
"$HOME/.gemini:$HOME/.gemini/skills/library-insight"
78+
"$HOME/.gemini:$HOME/.gemini/config/skills/library-insight"
79+
"$HOME/.copilot:$HOME/.copilot/skills/library-insight"
80+
"$HOME/.junie:$HOME/.junie/skills/library-insight"
7681
)
7782

78-
for path in "${SKILL_PATHS[@]}"; do
79-
mkdir -p "$path"
80-
cp "$SKILL_SOURCE" "$path/SKILL.md"
81-
echo " -> Copied AI Skill to: $path/SKILL.md"
83+
COPIED_COUNT=0
84+
for pair in "${PAIRS[@]}"; do
85+
base_dir="${pair%%:*}"
86+
skill_dir="${pair#*:}"
87+
if [ -d "$base_dir" ]; then
88+
mkdir -p "$skill_dir"
89+
cp "$SKILL_SOURCE" "$skill_dir/SKILL.md"
90+
echo " -> Detected $base_dir - Copied AI Skill to: $skill_dir/SKILL.md"
91+
COPIED_COUNT=$((COPIED_COUNT + 1))
92+
fi
8293
done
83-
echo "SUCCESS: AI Agent Skill distributed successfully!"
94+
95+
if [ $COPIED_COUNT -gt 0 ]; then
96+
echo "SUCCESS: AI Agent Skill distributed to $COPIED_COUNT detected config(s)!"
97+
else
98+
echo "Note: No global AI agent config folders detected in home directory."
99+
fi
84100
else
85101
echo "Note: Local SKILL.md source file not found. Skipping global skill installation."
86102
fi

library-insight-cli/src/main/kotlin/com/meet/libraryinsight/cli/commands/DoctorCommand.kt

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,10 @@ class DoctorCommand : CliktCommand(
2727
}
2828
echo("")
2929

30-
// 2. Node Check
31-
echo("2. Node.js Environment:")
32-
try {
33-
val process = Runtime.getRuntime().exec(arrayOf("node", "-v"))
34-
val version = process.inputStream.bufferedReader().use { it.readText() }.trim()
35-
echo(" - Version: $version")
36-
echo(" - Status: OK")
37-
} catch (e: Exception) {
38-
echo(" - Version: Not found on system PATH")
39-
echo(" - Status: Note (npm global install will not be available; use install.sh instead)")
40-
}
41-
echo("")
42-
43-
// 3. Local Cache Directory
30+
// 2. Local Cache Directory
4431
val userHome = System.getProperty("user.home") ?: ""
4532
val cacheDir = File(File(userHome, ".library-insight"), "cache")
46-
echo("3. Local Download Cache:")
33+
echo("2. Local Download Cache:")
4734
echo(" - Path: ${cacheDir.absolutePath}")
4835
if (cacheDir.exists()) {
4936
val fileCount = cacheDir.walkBottomUp().filter { it.isFile }.count()
@@ -53,20 +40,25 @@ class DoctorCommand : CliktCommand(
5340
}
5441
echo("")
5542

56-
// 4. Global AI Skills Registry Check
57-
echo("4. Global AI Agent Skill Configurations:")
58-
val paths = mapOf(
59-
"Cursor" to File(userHome, ".cursor/skills/library-insight/SKILL.md"),
60-
"Gemini Config" to File(userHome, ".gemini/config/skills/library-insight/SKILL.md"),
61-
"Claude Desktop" to File(userHome, ".claude/skills/library-insight/SKILL.md"),
62-
"Antigravity Agents" to File(userHome, ".agents/skills/library-insight/SKILL.md"),
63-
"GitHub Copilot" to File(userHome, ".copilot/skills/library-insight/SKILL.md"),
64-
"Junie Agent" to File(userHome, ".junie/skills/library-insight/SKILL.md"),
65-
"Codex AI" to File(userHome, ".codex/skills/library-insight/SKILL.md")
43+
// 3. Global AI Skills Registry Check
44+
echo("3. Global AI Agent Skill Configurations:")
45+
val agentPaths = mapOf(
46+
"Cursor" to Pair(File(userHome, ".cursor"), File(userHome, ".cursor/skills/library-insight/SKILL.md")),
47+
"Gemini Config" to Pair(File(userHome, ".gemini"), File(userHome, ".gemini/config/skills/library-insight/SKILL.md")),
48+
"Claude Desktop" to Pair(File(userHome, ".claude"), File(userHome, ".claude/skills/library-insight/SKILL.md")),
49+
"Antigravity Agents" to Pair(File(userHome, ".agents"), File(userHome, ".agents/skills/library-insight/SKILL.md")),
50+
"GitHub Copilot" to Pair(File(userHome, ".copilot"), File(userHome, ".copilot/skills/library-insight/SKILL.md")),
51+
"Junie Agent" to Pair(File(userHome, ".junie"), File(userHome, ".junie/skills/library-insight/SKILL.md")),
52+
"Codex AI" to Pair(File(userHome, ".codex"), File(userHome, ".codex/skills/library-insight/SKILL.md"))
6653
)
6754

68-
paths.forEach { (agent, file) ->
69-
val status = if (file.exists()) "INSTALLED (Verified)" else "NOT INSTALLED"
55+
agentPaths.forEach { (agent, pair) ->
56+
val (baseFolder, skillFile) = pair
57+
val status = when {
58+
skillFile.exists() -> "INSTALLED (Verified)"
59+
baseFolder.exists() -> "NOT INSTALLED (folder detected)"
60+
else -> "NOT INSTALLED (no base folder)"
61+
}
7062
echo(String.format(" %-22s : %s", "- $agent", status))
7163
}
7264
echo("")

library-insight-cli/src/main/resources/scripts/install-cli.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,5 @@ if command -v library-insight &> /dev/null; then
55
exit 0
66
fi
77

8-
echo "library-insight not found. Installing..."
9-
if command -v npm &> /dev/null; then
10-
echo "npm found. Installing globally via npm..."
11-
npm install -g library-insight
12-
else
13-
echo "npm not found. Downloading and running the installer shell script..."
14-
curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash
15-
fi
8+
echo "library-insight not found. Installing via official installer script..."
9+
curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash

0 commit comments

Comments
 (0)