ai-global 1.5.0 → 1.7.0

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.
package/README.md CHANGED
@@ -105,48 +105,48 @@ The first file found wins (dedup by filename).
105
105
 
106
106
  ## Supported Tools
107
107
 
108
- | Name | Key | Global | Skills | Agents | Rules | Commands | Prompts |
109
- | ----------------- | :-----------------: | :----: | :----: | :----: | :---: | :------: | :-----: |
110
- | Claude Code | `claude` | ✓ | ✓ | | | ✓ | |
111
- | Cursor | `cursor` | ✓ | ✓ | | | | ✓ |
112
- | GitHub Copilot | `github-copilot` | | | | | | |
113
- | Factory Droid | `factory` | | | | | | |
114
- | Gemini CLI | `gemini` | ✓ | ✓ | | | ✓ | |
115
- | Windsurf | `windsurf` | | ✓ | ✓ | ✓ | | |
116
- | Kiro | `kiro` | ✓ | | ✓ | | | |
117
- | Qodo | `qodo` | ✓ | | ✓ | | | |
118
- | Antigravity | `antigravity` | | ✓ | | | ✓ | |
119
- | Continue | `continue` | | | | ✓ | | ✓ |
120
- | Cline | `cline` | ✓ | | | ✓ | | ✓ |
121
- | Roo Code | `roo` | | | | ✓ | | |
122
- | Sourcegraph Cody | `sourcegraph` | | | | | ✓ | |
123
- | CodeGPT | `codegpt` | | | | | | ✓ |
124
- | GPT Engineer | `gpt-engineer` | | | | | | ✓ |
125
- | Smol Developer | `smol` | ✓ | | | | | ✓ |
126
- | Amp | `amp` | | | | | | |
127
- | Trae | `trae` | ✓ | | | | | |
128
- | OpenCode | `opencode` | | | | | | |
129
- | OpenAI Codex | `codex` | ✓ | | | | | |
130
- | Aider | `aider` | ✓ | | | | | |
131
- | Codeium | `codeium` | | | | | | |
132
- | TabNine | `tabnine` | | | | | | |
133
- | Zed | `zed` | | | | | | |
134
- | Aide | `aide` | ✓ | | | | | |
135
- | PearAI | `pear` | ✓ | | | | | |
136
- | Supermaven | `supermaven` | | | | | | |
137
- | CodeStory | `codestory` | | | | | | |
138
- | Double | `double` | ✓ | | | | | |
139
- | Blackbox AI | `blackbox` | | | | | | |
140
- | Amazon Q | `amazonq` | | | | | | |
141
- | Copilot Workspace | `copilot-workspace` | | | | | | |
142
- | Goose AI | `goose` | ✓ | | | | | |
143
- | Mentat | `mentat` | ✓ | | | | | |
144
- | Melty | `melty` | ✓ | | | | | |
145
- | Void | `void` | ✓ | | | | | |
146
- | Qoder | `qoder` | ✓ | | | | | |
147
- | Augment | `augment` | | | ✓ | ✓ | | |
148
- | Codebuff | `agents` | ✓ | | ✓ | | | |
149
- | CodeBuddy | `codebuddy` | | | ✓ | | | |
108
+ | Tool | Instructions | Skills | Agents | Rules | Commands | Prompts |
109
+ | ----------------- | :----------: | :----: | :----: | :---: | :------: | :-----: |
110
+ | Claude Code | | ✓ | | | ✓ | |
111
+ | Cursor | | ✓ | | | | ✓ |
112
+ | GitHub Copilot | | | | | | |
113
+ | Factory Droid | ✓ | | | | | |
114
+ | Gemini CLI | | ✓ | | | ✓ | |
115
+ | Windsurf | ✓ | ✓ | ✓ | ✓ | | |
116
+ | Kiro | | | ✓ | | | |
117
+ | Qodo | | | ✓ | | | |
118
+ | Antigravity | | ✓ | | | ✓ | |
119
+ | Continue | ✓ | | | ✓ | | ✓ |
120
+ | Cline | | | | ✓ | | ✓ |
121
+ | Roo Code | | | | ✓ | | |
122
+ | Sourcegraph Cody | | | | | ✓ | |
123
+ | CodeGPT | ✓ | | | | | ✓ |
124
+ | GPT Engineer | | | | | | ✓ |
125
+ | Smol Developer | | | | | | ✓ |
126
+ | Amp | | | | | | |
127
+ | Trae | | | | | | |
128
+ | OpenCode | ✓ | | | | | |
129
+ | OpenAI Codex | | | | | | |
130
+ | Aider | | | | | | |
131
+ | Codeium | ✓ | | | | | |
132
+ | TabNine | ✓ | | | | | |
133
+ | Zed | | | | | | |
134
+ | Aide | | | | | | |
135
+ | PearAI | | | | | | |
136
+ | Supermaven | | | | | | |
137
+ | CodeStory | | | | | | |
138
+ | Double | | | | | | |
139
+ | Blackbox AI | ✓ | | | | | |
140
+ | Amazon Q | ✓ | | | | | |
141
+ | Copilot Workspace | | | | | | |
142
+ | Goose AI | | | | | | |
143
+ | Mentat | | | | | | |
144
+ | Melty | | | | | | |
145
+ | Void | | | | | | |
146
+ | Qoder | | | | | | |
147
+ | Augment | ✓ | | ✓ | ✓ | | |
148
+ | Codebuff | | | ✓ | | | |
149
+ | CodeBuddy | ✓ | | ✓ | | | |
150
150
 
151
151
  ## Uninstall
152
152
 
package/ai-global CHANGED
@@ -20,7 +20,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
20
20
  PACKAGE_JSON="$SCRIPT_DIR/package.json"
21
21
 
22
22
  if [[ -f "$PACKAGE_JSON" ]]; then
23
- VERSION=$(grep '"version"' "$PACKAGE_JSON" 2>/dev/null | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/')
23
+ # More robust version extraction
24
+ VERSION=$(grep -m 1 '"version"' "$PACKAGE_JSON" 2>/dev/null | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/' | sed 's/[[:space:]]*,$//')
24
25
  fi
25
26
 
26
27
  if [[ -z "$VERSION" ]]; then
@@ -86,7 +87,7 @@ extract_meta_name() {
86
87
  return
87
88
  fi
88
89
  # Match name: "value" or name: value
89
- local extracted=$(grep -m 1 "^name:" "$file" | sed -E 's/^name:[[:space:]]*["'"'"'"'']?([^"'"'"'"'']+)["'"'"'"'']?/\1/' | xargs 2>/dev/null || true)
90
+ local extracted=$(grep -m 1 "^name:" "$file" | sed -E 's/^name:[[:space:]]*["'\'']?([^"'\'']+)["'\'']?/\1/' | xargs 2>/dev/null || true)
90
91
  if [[ -n "$extracted" ]]; then
91
92
  echo "$extracted"
92
93
  else
@@ -141,7 +142,7 @@ declare -a KNOWN_PATTERNS=(
141
142
  ".smol|Smol Developer|instructions.md|skills|agents|rules|.|prompts"
142
143
  ".config/opencode|OpenCode Config|instructions.md|.|.|.|.|."
143
144
  ".augment|Augment|instructions.md|.|agents|rules|.|."
144
- ".agents|Codebuff|knowledge.md|.|agents|.|.|."
145
+ ".codebuff|Codebuff|instructions.md|.|agents|.|.|."
145
146
  ".codebuddy|CodeBuddy|settings.json|.|agents|.|.|."
146
147
  )
147
148
 
@@ -938,13 +939,21 @@ upgrade() {
938
939
  current_script=$(readlink "$current_script")
939
940
  fi
940
941
 
941
- local tmp_file=$(mktemp)
942
- if curl -fsSL "https://raw.githubusercontent.com/nanxiaobei/ai-global/main/ai-global" -o "$tmp_file" 2>/dev/null; then
943
- chmod +x "$tmp_file"
944
- mv "$tmp_file" "$current_script"
942
+ local exec_temp=$(mktemp)
943
+ local pkg_json_tmp=$(mktemp)
944
+ if curl -fsSL "https://raw.githubusercontent.com/nanxiaobei/ai-global/main/ai-global" -o "$exec_temp" 2>/dev/null && \
945
+ curl -fsSL "https://raw.githubusercontent.com/nanxiaobei/ai-global/main/package.json" -o "$pkg_json_tmp" 2>/dev/null; then
946
+ chmod +x "$exec_temp"
947
+ mv "$exec_temp" "$current_script"
948
+
949
+ # Also update package.json in the same directory as the script
950
+ local script_dir=$(dirname "$current_script")
951
+ mv "$pkg_json_tmp" "$script_dir/package.json"
952
+
945
953
  log_ok "Upgraded to v$remote_version"
946
954
  else
947
- rm -f "$tmp_file"
955
+ rm -f "$exec_temp"
956
+ rm -f "$pkg_json_tmp"
948
957
  log_error "Failed to download update"
949
958
  return 1
950
959
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-global",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "Unified configuration manager for AI coding assistants",
5
5
  "bin": {
6
6
  "ai-global": "ai-global"
@@ -15,6 +15,7 @@
15
15
  "copilot",
16
16
  "gemini",
17
17
  "coding-assistant",
18
+ "coding-assistant",
18
19
  "config",
19
20
  "symlink"
20
21
  ],
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const fs = require('fs');
4
- const path = require('path');
5
- const os = require('os');
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ const os = require("os");
6
6
 
7
- const configDir = path.join(os.homedir(), '.ai-global');
7
+ const configDir = path.join(os.homedir(), ".ai-global");
8
8
 
9
9
  // Create config directory
10
10
  if (!fs.existsSync(configDir)) {
11
11
  fs.mkdirSync(configDir, { recursive: true });
12
12
  }
13
13
 
14
- console.log('');
15
- console.log('\x1b[32m[OK]\x1b[0m AI-Link installed!');
16
- console.log('');
17
- console.log('Run \x1b[36mai-link\x1b[0m to scan and link all your AI tools');
18
- console.log('');
14
+ console.log("");
15
+ console.log("\x1b[32m[OK]\x1b[0m AI Global installed!");
16
+ console.log("");
17
+ console.log("Run \x1b[36mai-global\x1b[0m to scan and link all your AI tools");
18
+ console.log("");