forked from Gitlink/gitlink-cli
feat: include skills in npm package, update README with AI Agent quick start
- Bundle skills/ directory into npm package for local installation - Add npx skills add instructions for both human users and AI agents - Update README installation section to match larksuite/cli style - Bump npm version to 0.1.1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
381a32a49f
commit
3c2e8f0580
|
|
@ -18,4 +18,5 @@ vendor/
|
|||
npm/bin/gitlink-cli
|
||||
npm/*.tgz
|
||||
npm/README.md
|
||||
npm/skills/
|
||||
dist/
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -54,7 +54,11 @@ Choose **one** of the following methods:
|
|||
**Option 1 — From npm (recommended):**
|
||||
|
||||
```bash
|
||||
# Install CLI
|
||||
npm install -g @gitlink-ai/cli
|
||||
|
||||
# Install CLI SKILL (required)
|
||||
npx skills add "$(npm root -g)/@gitlink-ai/cli/skills" -y -g
|
||||
```
|
||||
|
||||
**Option 2 — From source:**
|
||||
|
|
@ -65,6 +69,9 @@ Requires Go 1.21+.
|
|||
git clone https://www.gitlink.org.cn/Gitlink/gitlink-cli.git
|
||||
cd gitlink-cli
|
||||
make install
|
||||
|
||||
# Install CLI SKILL (required)
|
||||
npx skills add ./skills -y -g
|
||||
```
|
||||
|
||||
#### Configure & Use
|
||||
|
|
@ -87,7 +94,11 @@ gitlink-cli repo +list
|
|||
**Step 1 — Install**
|
||||
|
||||
```bash
|
||||
# Install CLI
|
||||
npm install -g @gitlink-ai/cli
|
||||
|
||||
# Install CLI SKILL (required)
|
||||
npx skills add "$(npm root -g)/@gitlink-ai/cli/skills" -y -g
|
||||
```
|
||||
|
||||
**Step 2 — Configure**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@gitlink-ai/cli",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"description": "GitLink 平台官方命令行工具 — 代码托管、协作开发和自动化",
|
||||
"bin": {
|
||||
"gitlink-cli": "bin/cli.js"
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
"files": [
|
||||
"bin/",
|
||||
"scripts/",
|
||||
"skills/",
|
||||
"README.md"
|
||||
],
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -58,8 +58,10 @@ ls -lh "$DIST_DIR"/*.tar.gz
|
|||
echo ""
|
||||
echo "=== Packaging npm ==="
|
||||
|
||||
# Copy README to npm dir
|
||||
# Copy README and skills to npm dir
|
||||
cp "$PROJECT_DIR/README.md" "$NPM_DIR/README.md"
|
||||
rm -rf "$NPM_DIR/skills"
|
||||
cp -r "$PROJECT_DIR/skills" "$NPM_DIR/skills"
|
||||
|
||||
# Ensure bin dir exists and wrapper is executable
|
||||
chmod +x "$NPM_DIR/bin/gitlink-cli"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o "$NPM_DIR/bin/${BINARY}" .
|
|||
chmod +x "$NPM_DIR/bin/${BINARY}"
|
||||
cp "$PROJECT_DIR/README.md" "$NPM_DIR/README.md"
|
||||
|
||||
# Copy skills directory
|
||||
rm -rf "$NPM_DIR/skills"
|
||||
cp -r "$PROJECT_DIR/skills" "$NPM_DIR/skills"
|
||||
|
||||
echo "Binary size: $(du -h "$NPM_DIR/bin/${BINARY}" | cut -f1)"
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue