Skip to content

nanxiaobei/ai-global

Repository files navigation

AI Global

English · 简体中文 · 繁體中文 · 日本語 · 한국어


Unified Config Manager for AI Coding Tools.

Edit one file, sync to all your AI tools.

Works both System Mode & Project Mode.

Supported Tools

Tool Key AGENTS.md Rules Commands Skills
Claude Code claude
OpenAI Codex codex
Cursor cursor
Factory Droid droid
Amp amp
Antigravity antigravity
Gemini CLI gemini
Kiro kiro
OpenCode opencode
Qoder qoder
Qodo qodo
GitHub Copilot copilot
Continue continue
Windsurf windsurf
Roo Code roo
Cline cline
Blackbox AI blackbox
Goose AI goose
Augment augment
OpenClaw openclaw
Command Code commandcode
Kilo Code kilocode
Neovate neovate
OpenHands openhands
TRAE trae
Zencoder zencoder

Installation

Install with curl or npm:

curl

curl -fsSL https://raw.githubusercontent.com/nanxiaobei/ai-global/main/install.sh | bash

npm

npm install -g ai-global
# or
pnpm add -g ai-global
# or
yarn global add ai-global
# or
bun add -g ai-global

Usage

Run:

ai-global

This will:

  1. Detect the current directory context (system or project)
  2. Scan for installed AI tools
  3. Back up original configs to .ai-global/backups
  4. Merge AGENTS.md skills rules commands from detected tools to .ai-global shared configs
  5. Create symlinks from each tool to .ai-global shared configs

Context

  • System Mode: When run from ~ directory, unified configs for system-wide
  • Project Mode: When run from any project directory (not ~), unified configs for project-specific

Commands

ai-global                   # Update symlinks (default)
ai-global status            # Show symlinks status
ai-global list              # List all supported AI tools
ai-global backups           # List available backups
ai-global unlink <key>      # Restore a tool's original config
ai-global unlink all        # Restore all tools
ai-global add <user/repo>   # Add skills from GitHub repo
ai-global upgrade           # Upgrade to latest version
ai-global uninstall         # Completely remove ai-global
ai-global version           # Show version
ai-global help              # Show help

Context-aware: Command behavior depends on the current directory (system or project)

Add Skills

ai-global add user/repo
ai-global add https://github.com/user/repo

Skills will be added to your .ai-global/skills, and automatically shared to each tool (because of symlinks).

How It Works

System Mode Structure

~/.ai-global/
├── AGENTS.md        <- System shared AGENTS.md
├── skills/          <- System shared skills
├── rules/           <- System shared rules
├── commands/        <- System shared commands
└── backups/         <- Original tool configs' backups

~/.claude/
├── CLAUDE.md -> ~/.ai-global/AGENTS.md        (symlink)
├── skills/   -> ~/.ai-global/skills/          (symlink)
└── commands/ -> ~/.ai-global/commands/        (symlink)

~/.cursor/
├── AGENTS.md -> ~/.ai-global/AGENTS.md        (symlink)
└── skills/   -> ~/.ai-global/skills/          (symlink)

... and more tools

Project Mode Structure

my-project/
├── .ai-global/
│   ├── AGENTS.md        <- Project shared AGENTS.md
│   ├── skills/          <- Project shared skills
│   ├── rules/           <- Project shared rules
│   ├── commands/        <- Project shared commands
│   └── backups/         <- Original tool configs' backups
└── .cursor/
    ├── AGENTS.md -> ../.ai-global/AGENTS.md   (symlink)
    └── skills/   -> ../.ai-global/skills/     (symlink)

    ... and more tools

Mode Behavior

  • System Mode: Manages AI tool configs for the system
  • Project Mode: Manages AI tool configs for a project
  • Automatic Detection: No commands needed to switch
  • Context-Aware: Commands will show which context they're operating in

Merge behavior

When you run ai-global, it merges items from all tools by filename:

  • Cursor has skills: react/, typescript/
  • Claude has skills: typescript/, python/
  • Result in .ai-global/skills: react/, typescript/, python/

Last file wins (later tools overwrite earlier tools with the same filename).

Uninstall

ai-global uninstall

This will:

  1. Unlink all tools, restore to their original configs
  2. Remove all .ai-global directory
  3. Remove ai-global command

License

MIT

About

Unified Config Manager for AI Coding Tools

Resources

Stars

Watchers

Forks

Packages