AI tool installation
aic supports Claude Code, Codex CLI, Gemini CLI, and OpenCode. After installing any of them, use aic to unify their Skills, Context, MCP, and Provider configurations.
The steps below integrate each tool’s official npm package with practical install experience. If a command changes with a new release, defer to the official documentation.
Replace the
BASE_URLand API key in the configuration below with your actual API service address and key. If you can access the official APIs directly, use the official endpoints; if you access them through a third-party relay or proxy, use the address provided by your service.
Claude Code
System requirements
- macOS 10.15+ or Linux
- Windows 10 (version 1809 / build 17763) or above
macOS / Linux
- Uninstall any previous version (skip if not installed):
npm uninstall -g @anthropic-ai/claude-code
- Install the official npm package:
npm install -g @anthropic-ai/claude-code
- Configure environment variables. Add to
~/.zshrcor~/.bashrc:
export ANTHROPIC_BASE_URL="https://your-api-host/claudecode"
export ANTHROPIC_API_KEY="your_API_KEY"
export ANTHROPIC_AUTH_TOKEN="your_API_KEY"
Then source ~/.zshrc (or source ~/.bashrc) to apply.
- Restart your terminal and verify:
claude -v
Windows
- Install git (keep default options, do not change paths)
- Install Node.js (keep default options, do not change paths)
- Open PowerShell and verify prerequisites:
node -v
npm -v
If you see “No suitable shell found”, add
CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\git\bin\bash.exeto your system environment variables, restart the terminal, and try again. If it still fails, reinstall git.
- Uninstall any previous version (skip if not installed):
npm uninstall -g @anthropic-ai/claude-code
- Install the official npm package:
npm install -g @anthropic-ai/claude-code
- Set the following system environment variables:
| Variable | Value |
|---|---|
ANTHROPIC_BASE_URL | https://your-api-host/claudecode |
ANTHROPIC_API_KEY | your key |
ANTHROPIC_AUTH_TOKEN | your key |
- Restart PowerShell and verify:
claude -v
Config paths
| Scope | Path |
|---|---|
| Global | ~/.claude/ |
| Project | .claude/ |
| Memory | CLAUDE.md |
Official docs: https://code.claude.com/docs/en/cli-reference
Codex CLI
System requirements
- macOS 10.15+ or Linux
- Windows 10 (version 1809 / build 17763) or above
macOS / Linux
- Install the official npm package:
npm install -g @openai/codex
# or
brew install codex
- Create the config directory:
rm -rf ~/.codex
mkdir ~/.codex
- Create
~/.codex/auth.json:
{
"OPENAI_API_KEY": "your_API_KEY"
}
- Create
~/.codex/config.toml:
model_provider = "your_provider"
model = "your-model-name"
model_reasoning_effort = "xhigh"
disable_response_storage = true
preferred_auth_method = "apikey"
[model_providers.your_provider]
name = "your_provider"
base_url = "https://your-api-host/codex/backend-api/codex"
wire_api = "responses"
The available values for
modelandmodel_reasoning_effortdepend on your API provider — adjust accordingly.
- Restart your terminal and verify:
codex -V
Windows
- Install git and Node.js (keep default options)
- Open PowerShell and install the official npm package:
npm install -g @openai/codex
- Create the config directory
C:\Users\YourUser\.codex(delete any existing one first) - Create
auth.json(same content as above) - Create
config.toml(same content as above) - Restart PowerShell and verify:
codex -V
Config paths
| Scope | Path |
|---|---|
| Global | ~/.codex/ |
| Project | .codex/ |
| Memory | AGENTS.md |
Official docs: https://learn.chatgpt.com/docs/codex/cli
Gemini CLI
System requirements
- macOS 10.15+ or Linux
- Windows 10 (version 1809 / build 17763) or above
- Node.js and npm
macOS / Linux
- Install the official npm package:
npm install -g @google/gemini-cli
# or
brew install gemini-cli
- Check your current shell:
echo $SHELL
# /zsh → zsh; /bash → bash
- Add environment variables to
~/.zshrcor~/.bashrc:
# GEMINI Environment Variables
export GOOGLE_GEMINI_BASE_URL="https://your-api-host/gemini"
export GEMINI_API_KEY="your_key"
Or run directly (zsh example):
echo '# GEMINI Environment Variables' >> ~/.zshrc
echo 'export GOOGLE_GEMINI_BASE_URL="https://your-api-host/gemini"' >> ~/.zshrc
echo 'export GEMINI_API_KEY="your_key"' >> ~/.zshrc
source ~/.zshrc
- Verify the environment variable:
echo "$GOOGLE_GEMINI_BASE_URL"
# Should output the BASE_URL you configured
Modified the config file but it didn’t take effect? Close and reopen the terminal, or run
source ~/.zshrc/source ~/.bashrcmanually.
- Restart your terminal and launch Gemini:
gemini
On first launch, select Trust folder, then use the arrow keys to select Use Gemini API Key (the key is pre-filled, just press Enter).
- Switch model: type
/model, select Manual mode, then choose a supported model.
Windows
- Install Node.js
- Open PowerShell and install the official npm package:
npm install -g @google/gemini-cli
You can also install via Anaconda:
conda create -y -n gemini_env -c conda-forge nodejs && conda activate gemini_env && npm install -g @google/gemini-cli
- Set the following system environment variables:
| Variable | Value |
|---|---|
GOOGLE_GEMINI_BASE_URL | https://your-api-host/gemini |
GEMINI_API_KEY | your key |
- Verify the environment variable:
echo $env:GOOGLE_GEMINI_BASE_URL
- Restart your terminal and launch:
gemini
On first launch, select Trust folder → Use Gemini API Key, then use /model to switch to Manual mode.
Config paths
| Scope | Path |
|---|---|
| Global | ~/.gemini/ |
| Project | .gemini/ |
| Memory | GEMINI.md |
Official docs: https://geminicli.com/docs/
OpenCode
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/opencode-ai/opencode/refs/heads/main/install | bash
Homebrew alternative:
brew install opencode-ai/tap/opencode
Config paths
| Scope | Path |
|---|---|
| Global | ~/.config/opencode/ |
| Project | .opencode/ |
| Memory | AGENTS.md |
Official docs: https://opencode.ai/docs/
After installing
Once any tool is installed, run aic in your project root to enter the TUI. aic auto-detects installed tools and manages their configurations:
- Skills: one declaration, distributed to
.claude//.codex//.gemini//.opencode/ - Context: rendered into managed blocks in
CLAUDE.md/AGENTS.md/GEMINI.md - MCP: unified manifest, distributed to each tool’s config file
- Provider: switch profiles without restarting the tool
See Shortcuts and commands and Core concepts.
Deep dive: configuration systems
The aic repository contains detailed configuration system surveys for all four tools (project vs global scopes, load order, path differences) under docs/clis_ide/. These are internal reference docs and are not deployed on this website.