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_URL and 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

  1. Uninstall any previous version (skip if not installed):
npm uninstall -g @anthropic-ai/claude-code
  1. Install the official npm package:
npm install -g @anthropic-ai/claude-code
  1. Configure environment variables. Add to ~/.zshrc or ~/.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.

  1. Restart your terminal and verify:
claude -v

Windows

  1. Install git (keep default options, do not change paths)
  2. Install Node.js (keep default options, do not change paths)
  3. 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.exe to your system environment variables, restart the terminal, and try again. If it still fails, reinstall git.

  1. Uninstall any previous version (skip if not installed):
npm uninstall -g @anthropic-ai/claude-code
  1. Install the official npm package:
npm install -g @anthropic-ai/claude-code
  1. Set the following system environment variables:
VariableValue
ANTHROPIC_BASE_URLhttps://your-api-host/claudecode
ANTHROPIC_API_KEYyour key
ANTHROPIC_AUTH_TOKENyour key
  1. Restart PowerShell and verify:
claude -v

Config paths

ScopePath
Global~/.claude/
Project.claude/
MemoryCLAUDE.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

  1. Install the official npm package:
npm install -g @openai/codex
# or
brew install codex
  1. Create the config directory:
rm -rf ~/.codex
mkdir ~/.codex
  1. Create ~/.codex/auth.json:
{
  "OPENAI_API_KEY": "your_API_KEY"
}
  1. 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 model and model_reasoning_effort depend on your API provider — adjust accordingly.

  1. Restart your terminal and verify:
codex -V

Windows

  1. Install git and Node.js (keep default options)
  2. Open PowerShell and install the official npm package:
npm install -g @openai/codex
  1. Create the config directory C:\Users\YourUser\.codex (delete any existing one first)
  2. Create auth.json (same content as above)
  3. Create config.toml (same content as above)
  4. Restart PowerShell and verify:
codex -V

Config paths

ScopePath
Global~/.codex/
Project.codex/
MemoryAGENTS.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

  1. Install the official npm package:
npm install -g @google/gemini-cli
# or
brew install gemini-cli
  1. Check your current shell:
echo $SHELL
# /zsh → zsh; /bash → bash
  1. Add environment variables to ~/.zshrc or ~/.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
  1. 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 ~/.bashrc manually.

  1. 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).

  1. Switch model: type /model, select Manual mode, then choose a supported model.

Windows

  1. Install Node.js
  2. 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

  1. Set the following system environment variables:
VariableValue
GOOGLE_GEMINI_BASE_URLhttps://your-api-host/gemini
GEMINI_API_KEYyour key
  1. Verify the environment variable:
echo $env:GOOGLE_GEMINI_BASE_URL
  1. Restart your terminal and launch:
gemini

On first launch, select Trust folderUse Gemini API Key, then use /model to switch to Manual mode.

Config paths

ScopePath
Global~/.gemini/
Project.gemini/
MemoryGEMINI.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

ScopePath
Global~/.config/opencode/
Project.opencode/
MemoryAGENTS.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.