ai-global 2.7.0 → 2.9.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.
Files changed (3) hide show
  1. package/README.md +80 -88
  2. package/ai-global +5 -9
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AI Global
2
2
 
3
- English · [简体中文](README_CN.md) · [繁體中文](README_TW.md) · [日本語](README_JP.md)· [한국어](README_KR.md)
3
+ English · [简体中文](README_CN.md) · [繁體中文](README_TW.md) · [日本語](README_JP.md) · [한국어](README_KR.md)
4
4
 
5
5
  ---
6
6
 
@@ -10,6 +10,37 @@ Edit one file, sync to all your AI tools.
10
10
 
11
11
  Works both **System Mode** & **Project Mode**.
12
12
 
13
+ ## Supported Tools
14
+
15
+ | Tool | Key | AGENTS.md | Rules | Commands | Skills |
16
+ | ----------------------------------------------------- | ------------- | :-------: | :---: | :------: | :----: |
17
+ | [Claude Code](https://claude.com/product/claude-code) | `claude` | ✓ | | ✓ | ✓ |
18
+ | [OpenAI Codex](https://openai.com/codex/) | `codex` | ✓ | ✓ | | ✓ |
19
+ | [Cursor](https://cursor.com/) | `cursor` | ✓ | ✓ | ✓ | ✓ |
20
+ | [Factory Droid](https://factory.ai/) | `droid` | ✓ | ✓ | ✓ | ✓ |
21
+ | [Amp](https://ampcode.com/) | `amp` | ✓ | ✓ | ✓ | ✓ |
22
+ | [Antigravity](https://antigravity.google/) | `antigravity` | ✓ | | | ✓ |
23
+ | [Gemini CLI](https://geminicli.com/) | `gemini` | ✓ | | | ✓ |
24
+ | [Kiro](https://kiro.dev/) | `kiro` | ✓ | ✓ | | ✓ |
25
+ | [OpenCode](https://opencode.ai/) | `opencode` | ✓ | | ✓ | ✓ |
26
+ | [Qoder](https://qoder.com/) | `qoder` | ✓ | ✓ | ✓ | ✓ |
27
+ | [Qodo](https://www.qodo.ai/) | `qodo` | ✓ | | | |
28
+ | [GitHub Copilot](https://github.com/features/copilot) | `copilot` | ✓ | | | ✓ |
29
+ | [Continue](https://www.continue.dev/) | `continue` | ✓ | ✓ | | |
30
+ | [Windsurf](https://windsurf.com/) | `windsurf` | ✓ | ✓ | | ✓ |
31
+ | [Roo Code](https://roocode.com/) | `roo` | ✓ | ✓ | ✓ | ✓ |
32
+ | [Cline](https://cline.bot/) | `cline` | ✓ | ✓ | | ✓ |
33
+ | [Blackbox AI](https://www.blackbox.ai/) | `blackbox` | | | | ✓ |
34
+ | [Goose AI](https://goose.ai/) | `goose` | ✓ | | | ✓ |
35
+ | [Augment](https://www.augmentcode.com/) | `augment` | ✓ | ✓ | ✓ | |
36
+ | [OpenClaw](https://openclaw.ai/) | `openclaw` | ✓ | | | ✓ |
37
+ | [Command Code](https://commandcode.ai/) | `commandcode` | ✓ | | ✓ | ✓ |
38
+ | [Kilo Code](https://kilo.ai/) | `kilocode` | ✓ | ✓ | ✓ | ✓ |
39
+ | [Neovate](https://neovateai.dev/) | `neovate` | ✓ | | ✓ | ✓ |
40
+ | [OpenHands](https://openhands.dev/) | `openhands` | ✓ | | | ✓ |
41
+ | [TRAE](https://www.trae.ai/) | `trae` | ✓ | ✓ | | ✓ |
42
+ | [Zencoder](https://zencoder.ai/) | `zencoder` | ✓ | ✓ | | ✓ |
43
+
13
44
  ## Installation
14
45
 
15
46
  Install with `curl` or `npm`:
@@ -34,14 +65,7 @@ bun add -g ai-global
34
65
 
35
66
  ## Usage
36
67
 
37
- ### Automatic Mode Detection
38
-
39
- AI Global automatically detects your context:
40
-
41
- - **System Mode**: When run from `~` directory, unified configs for system-wide
42
- - **Project Mode**: When run from any project directory (not `~`), unified configs for project-specific
43
-
44
- ### First run
68
+ Run:
45
69
 
46
70
  ```bash
47
71
  ai-global
@@ -49,50 +73,55 @@ ai-global
49
73
 
50
74
  This will:
51
75
 
52
- 1. Detect current directory (system or project)
76
+ 1. Detect the current directory context (system or project)
53
77
  2. Scan for installed AI tools
54
- 3. Backup original configs to `.ai-global/backups/`
55
- 4. Merge AGENTS.md/skills/rules/commands from detected tools
56
- 5. Create symlinks from each tool's config to shared directories
78
+ 3. Back up original configs to `.ai-global/backups`
79
+ 4. Merge `AGENTS.md` `skills` `rules` `commands` from detected tools to `.ai-global` shared configs
80
+ 5. Create symlinks from each tool to `.ai-global` shared configs
81
+
82
+ ### Context
83
+
84
+ - **System Mode**: When run from `~` directory, unified configs for system-wide
85
+ - **Project Mode**: When run from any project directory (not `~`), unified configs for project-specific
57
86
 
58
87
  ## Commands
59
88
 
60
- | Command | Description | Context-aware |
61
- | --------------------------- | -------------------------------------- | ------------- |
62
- | `ai-global` | Scan, merge, update symlinks (default) | Yes |
63
- | `ai-global status` | Show symlinks status | Yes |
64
- | `ai-global list` | List all supported AI tools | Yes |
65
- | `ai-global backups` | List available backups | Yes |
66
- | `ai-global unlink <key>` | Restore a tool's original config | Yes |
67
- | `ai-global unlink all` | Restore all tools | Yes |
68
- | `ai-global add <user/repo>` | Add skills from GitHub repository | Yes |
69
- | `ai-global upgrade` | Upgrade to latest version | |
70
- | `ai-global uninstall` | Completely remove ai-global | |
71
- | `ai-global version` | Show version | |
72
- | `ai-global help` | Show help | |
89
+ | Command | Description | Context-aware |
90
+ | --------------------------- | -------------------------------- | ------------- |
91
+ | `ai-global` | Update symlinks (default) | Yes |
92
+ | `ai-global status` | Show symlinks status | Yes |
93
+ | `ai-global list` | List all supported AI tools | Yes |
94
+ | `ai-global backups` | List available backups | Yes |
95
+ | `ai-global unlink <key>` | Restore a tool's original config | Yes |
96
+ | `ai-global unlink all` | Restore all tools | Yes |
97
+ | `ai-global add <user/repo>` | Add skills from GitHub repo | Yes |
98
+ | `ai-global upgrade` | Upgrade to latest version | |
99
+ | `ai-global uninstall` | Completely remove ai-global | |
100
+ | `ai-global version` | Show version | |
101
+ | `ai-global help` | Show help | |
73
102
 
74
- **Context-aware**: Command behavior depends on current directory (system vs project)
103
+ **Context-aware**: Command behavior depends on the current directory (system or project)
75
104
 
76
- ### Add skills
105
+ ### Add Skills
77
106
 
78
107
  ```bash
79
108
  ai-global add user/repo
80
109
  ai-global add https://github.com/user/repo
81
110
  ```
82
111
 
83
- Skills will be downloaded and added to your `.ai-global/skills/` directory.
112
+ Skills will be added to your `.ai-global/skills`, and automatically shared to each tool (because of symlinks).
84
113
 
85
- ## How it works
114
+ ## How It Works
86
115
 
87
116
  ### System Mode Structure
88
117
 
89
118
  ```
90
119
  ~/.ai-global/
91
- ├── AGENTS.md <- Shared AGENTS.md (edit this)
92
- ├── skills/ <- Shared skills (merged from all tools)
93
- ├── rules/ <- Shared rules
94
- ├── commands/ <- Shared slash commands
95
- └── backups/ <- Original configs (backups)
120
+ ├── AGENTS.md <- System shared AGENTS.md
121
+ ├── skills/ <- System shared skills
122
+ ├── rules/ <- System shared rules
123
+ ├── commands/ <- System shared commands
124
+ └── backups/ <- Original tool configs' backups
96
125
 
97
126
  ~/.claude/
98
127
  ├── CLAUDE.md -> ~/.ai-global/AGENTS.md (symlink)
@@ -110,22 +139,24 @@ Skills will be downloaded and added to your `.ai-global/skills/` directory.
110
139
 
111
140
  ```
112
141
  my-project/
113
- ├── .ai-global/ <- Project-specific configs
114
- │ ├── AGENTS.md <- Project AGENTS.md
115
- │ ├── skills/ <- Project skills
116
- │ ├── rules/ <- Project rules
117
- │ ├── commands/ <- Project commands
118
- │ └── backups/ <- Project backups
119
- └── .cursor/ <- AI tool config
142
+ ├── .ai-global/
143
+ │ ├── AGENTS.md <- Project shared AGENTS.md
144
+ │ ├── skills/ <- Project shared skills
145
+ │ ├── rules/ <- Project shared rules
146
+ │ ├── commands/ <- Project shared commands
147
+ │ └── backups/ <- Original tool configs' backups
148
+ └── .cursor/
120
149
  ├── AGENTS.md -> ../.ai-global/AGENTS.md (symlink)
121
150
  └── skills/ -> ../.ai-global/skills/ (symlink)
151
+
152
+ ... and more tools
122
153
  ```
123
154
 
124
155
  ### Mode Behavior
125
156
 
126
- - **System Mode**: Manages AI configs across your entire system
127
- - **Project Mode**: Manages AI configs for a specific project only
128
- - **Automatic Detection**: No commands needed to switch between modes
157
+ - **System Mode**: Manages AI tool configs for the system
158
+ - **Project Mode**: Manages AI tool configs for a project
159
+ - **Automatic Detection**: No commands needed to switch
129
160
  - **Context-Aware**: Commands will show which context they're operating in
130
161
 
131
162
  ### Merge behavior
@@ -134,40 +165,9 @@ When you run `ai-global`, it merges items from all tools by filename:
134
165
 
135
166
  - Cursor has skills: `react/`, `typescript/`
136
167
  - Claude has skills: `typescript/`, `python/`
137
- - Result in `.ai-global/skills/`: `react/`, `typescript/`, `python/`
138
-
139
- **Last file wins** (later tools overwrite earlier tools with same filename).
168
+ - Result in `.ai-global/skills`: `react/`, `typescript/`, `python/`
140
169
 
141
- ## Supported Tools
142
-
143
- | Tool | Key | AGENTS.md | Rules | Commands | Skills |
144
- | -------------- | ------------- | :-------: | :---: | :------: | :----: |
145
- | Claude Code | `claude` | ✓ | | ✓ | ✓ |
146
- | OpenAI Codex | `codex` | ✓ | ✓ | | ✓ |
147
- | Cursor | `cursor` | ✓ | ✓ | ✓ | ✓ |
148
- | Factory Droid | `droid` | ✓ | ✓ | ✓ | ✓ |
149
- | Amp | `amp` | ✓ | ✓ | ✓ | ✓ |
150
- | Antigravity | `antigravity` | ✓ | | | ✓ |
151
- | Gemini CLI | `gemini` | ✓ | | | ✓ |
152
- | Kiro CLI | `kiro` | ✓ | ✓ | | ✓ |
153
- | OpenCode | `opencode` | ✓ | | ✓ | ✓ |
154
- | Qoder | `qoder` | ✓ | ✓ | ✓ | ✓ |
155
- | Qodo | `qodo` | ✓ | | | |
156
- | GitHub Copilot | `copilot` | ✓ | | | ✓ |
157
- | Continue | `continue` | ✓ | ✓ | | |
158
- | Windsurf | `windsurf` | ✓ | ✓ | | ✓ |
159
- | Roo Code | `roo` | ✓ | ✓ | ✓ | ✓ |
160
- | Cline | `cline` | ✓ | ✓ | | ✓ |
161
- | Blackbox AI | `blackbox` | | | | ✓ |
162
- | Goose AI | `goose` | ✓ | | | ✓ |
163
- | Augment | `augment` | ✓ | ✓ | ✓ | |
164
- | Clawdbot Code | `clawdbot` | ✓ | | | ✓ |
165
- | Command Code | `commandcode` | ✓ | | ✓ | ✓ |
166
- | Kilo Code | `kilocode` | ✓ | ✓ | ✓ | ✓ |
167
- | Neovate | `neovate` | ✓ | | ✓ | ✓ |
168
- | OpenHands | `openhands` | ✓ | | | ✓ |
169
- | TRAE | `trae` | ✓ | ✓ | | ✓ |
170
- | Zencoder | `zencoder` | ✓ | ✓ | | ✓ |
170
+ **Last file wins** (later tools overwrite earlier tools with the same filename).
171
171
 
172
172
  ## Uninstall
173
173
 
@@ -177,18 +177,10 @@ ai-global uninstall
177
177
 
178
178
  This will:
179
179
 
180
- 1. Unlink all tools to original configuration
181
- 2. Remove `~/.ai-global` directory
180
+ 1. Unlink all tools, restore to their original configs
181
+ 2. Remove all `.ai-global` directory
182
182
  3. Remove `ai-global` command
183
183
 
184
- If installed via npm:
185
-
186
- ```bash
187
- ai-global uninstall
188
-
189
- npm uninstall -g ai-global
190
- ```
191
-
192
184
  ## License
193
185
 
194
186
  MIT
package/ai-global CHANGED
@@ -4,7 +4,7 @@
4
4
  # https://github.com/nanxiaobei/ai-global
5
5
 
6
6
  # Version
7
- VERSION="2.7.0"
7
+ VERSION="2.9.0"
8
8
 
9
9
  # Known AI tool patterns
10
10
  # Format: nodes|key|name|agents_md|rules|commands|skills|color
@@ -14,7 +14,7 @@ declare -a KNOWN_PATTERNS=(
14
14
  ".blackbox|blackbox|Blackbox AI|.|.|.|skills|\\033[38;5;51m"
15
15
  ".claude|claude|Claude Code|CLAUDE.md|.|commands|skills|\\033[38;5;180m"
16
16
  ".cline|cline|Cline|AGENTS.md|rules|.|skills|\\033[38;5;201m"
17
- ".clawdbot|clawdbot|Clawdbot Code|AGENTS.md|.|.|skills|\\033[38;5;208m"
17
+ ".openclaw|openclaw|OpenClaw|AGENTS.md|.|.|skills|\\033[38;5;208m"
18
18
  ".codex|codex|OpenAI Codex|AGENTS.md|rules|.|skills|\\033[38;5;9m"
19
19
  ".commandcode|commandcode|Command Code|AGENTS.md|.|.|skills|\\033[38;5;11m"
20
20
  ".continue|continue|Continue|AGENTS.md|rules|.|.|\\033[38;5;10m"
@@ -24,7 +24,7 @@ declare -a KNOWN_PATTERNS=(
24
24
  ".gemini|antigravity|Antigravity|GEMINI.md|.|.|antigravity/skills|\\033[38;5;214m"
25
25
  ".gemini|gemini|Gemini CLI|GEMINI.md|.|.|skills|\\033[38;5;220m"
26
26
  ".goose|goose|Goose AI|AGENTS.md|.|.|skills|\\033[38;5;82m"
27
- ".kiro|kiro|Kiro CLI|AGENTS.md|steering|.|skills|\\033[38;5;117m"
27
+ ".kiro|kiro|Kiro|AGENTS.md|steering|.|skills|\\033[38;5;117m"
28
28
  ".kilocode|kilocode|Kilo Code|AGENTS.md|rules|commands|skills|\\033[38;5;165m"
29
29
  ".neovate|neovate|Neovate|AGENTS.md|.|commands|skills|\\033[38;5;118m"
30
30
  ".opencode, .config/opencode|opencode|OpenCode|AGENTS.md|.|commands|skills|\\033[38;5;225m"
@@ -157,13 +157,9 @@ update_links() {
157
157
  echo "" >> "$target_dir"
158
158
  fi
159
159
  else
160
- # Copy all files (overwrite if exists), excluding hidden files and files in hidden dirs
161
- find "$type_dir" -type f -not -name '.*' -print0 2> /dev/null | while IFS= read -r -d '' file_dir; do
160
+ # Copy all files (overwrite if exists)
161
+ find "$type_dir" -type f -print0 2> /dev/null | while IFS= read -r -d '' file_dir; do
162
162
  local rel_path="${file_dir#$type_dir/}"
163
- # Skip if path contains any hidden directory component (at start or after /)
164
- if [[ "$rel_path" =~ (^|/)\.[^/]+(/|$) ]]; then
165
- continue
166
- fi
167
163
  local target_file="$target_dir/$rel_path"
168
164
  mkdir -p "$(dirname "$target_file")" 2> /dev/null
169
165
  cp "$file_dir" "$target_file" 2> /dev/null || true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-global",
3
- "version": "2.7.0",
3
+ "version": "2.9.0",
4
4
  "description": "Unified configuration manager for AI coding assistants",
5
5
  "author": "nanxiaobei",
6
6
  "homepage": "https://github.com/nanxiaobei/ai-global#readme",