AIM - AI Model Manager

A unified CLI tool for managing multiple AI tools and model providers
English | ็ฎไฝไธญๆ
๐ Overview
AIM (AI Model Manager) is a powerful command-line tool designed to simplify the management of multiple AI CLI tools (like Claude Code) and their model providers. It provides a unified interface for switching between AI models, managing API keys, and configuring your development environment.
Why AIM?
- ๐ Unified Management: Switch between different AI models with a single command
- ๐ Secure Key Management: Safely store and manage API keys for multiple providers
- โ๏ธ Flexible Configuration: Support for global and project-level configurations
- ๐ Shell Integration: Native support for Bash, Zsh, and Fish shells
- ๐ Fast & Lightweight: Built with Go for optimal performance
Current Status
โ
Design phase completed. The project is now in active development. See V2 Design Documentation for details.
๐ญ Foreword
After many years in software development, the pace of AI development in recent years has consistently exceeded my imagination. I never thought years ago that AI would so profoundly change our development methods and lifestyles.
This is a project almost entirely completed (99%) with AI assistanceโI'm responsible for communicating requirements with AI, architectural design, and code review, while AI serves as my development partner, handling most of the coding work. This entirely new collaboration model has given me a deep appreciation that we're entering a new era of co-creation between developers and AI.
Welcome to experience this tool completed through human "manual labor" and AI "mental labor" :)
๐ Quick Start
Installation
One-line install:
curl -fsSL https://raw.githubusercontent.com/fakecore/aim/main/scripts/setup-tool.sh | bash
User installation (no sudo):
curl -fsSL https://raw.githubusercontent.com/fakecore/aim/main/scripts/setup-tool.sh | bash -s -- --user
Basic Usage
# Initialize configuration (creates ~/.config/aim/config.yaml)
aim init
# Validate your configuration
aim config validate
# Run AI tool with default account
aim run cc
# Run AI tool with specific account
aim run cc -a deepseek
aim run codex -a glm
# Show resolved configuration for an account
aim config show -a deepseek
# Edit configuration file
aim config edit
# Launch TUI (Terminal UI)
aim tui
๐ Commands
Core Commands
| Command |
Status |
Description |
aim init |
โ
|
Initialize configuration with built-in vendors |
aim run <tool> |
โ
|
Run AI tool with environment configured |
aim config show |
โ
|
Display configuration for all accounts or specific account |
aim config edit |
โ
|
Edit configuration in $EDITOR |
aim config validate |
โ
|
Validate configuration file |
aim tui |
๐ง |
Terminal UI (5/6 tabs implemented) |
aim extension list |
๐ง |
List installed extensions (basic) |
aim migrate |
๐ง |
v1 to v2 migration (planned) |
Run Command Options
aim run <tool> [flags] [-- <args>...]
Flags:
-a, --account string Account to use
-m, --model string Model to use (override)
--dry-run Show what would be executed
--native Run without env injection
Examples:
aim run cc -a deepseek
aim run codex -a glm -- file.txt
aim run cc -a deepseek --dry-run
Config Show Command
Display configuration. When no account is specified, shows summary and detailed configuration for all accounts:
# Show all accounts configuration
aim config show
# Show configuration for specific account
aim config show -a deepseek
Output includes:
- Configuration summary (account count, vendor count, key count, default account)
- For each account:
- Account name and referenced key
- Vendor information
- Resolved API key (masked for security)
- Available endpoints for each protocol
- Model overrides (if any)
โ๏ธ Configuration
AIM uses a provider-centric v2 configuration system:
version: "2"
# Tool protocol mappings
tools:
cc:
protocol: anthropic
codex:
protocol: openai
# Vendor definitions
vendors:
deepseek:
endpoints:
openai:
url: https://api.deepseek.com/v1
default_model: deepseek-chat
anthropic:
url: https://api.deepseek.com/anthropic
# API keys
keys:
deepseek-main:
value: ${DEEPSEEK_API_KEY}
vendor: deepseek
# Accounts reference keys
accounts:
deepseek:
key: deepseek-main
# Global settings
settings:
default_account: deepseek
command_timeout: 5m
Key Features
- Environment Variables: Use
${VAR_NAME} syntax for secure key storage
- Base64 Encoding: Use
base64:ENCODED_STRING for obfuscated storage
- Protocol Adaptation: One account serves multiple CLI tools via automatic protocol mapping
- Endpoint Overrides: Customize endpoints per account or key
โจ Features
Implemented โ
- โ๏ธ Provider-Centric Configuration - Unified account and vendor management
- ๐ Secure Key Management - Environment variables, base64 encoding support
- ๐ Protocol Adaptation - One account serves multiple CLI tools
- โฑ๏ธ Timeout & Signal Handling - Configurable command timeouts
- ๐จ TUI Interface - Interactive terminal UI with Tokyo Night theme
- ๐ Config Validation - Comprehensive validation with helpful error messages
- ๐ ๏ธ Development Environment - Makefile commands, isolated testing
- ๐ Fish Shell Integration - Native Fish function support
In Development ๐ง
- ๐ Internationalization - Multi-language support (English, Chinese)
- ๐ฃ๏ธ Routes Tab - Traffic routing chain visualization
- ๐ Usage Tab - API usage statistics and charts
- ๐ Enhanced Logs - Advanced log filtering
- ๐ Extension System - Local YAML extensions for custom vendors
- ๐ง Migration Tools - v1 to v2 configuration migration
๐ฅ๏ธ TUI (Terminal UI)
The TUI provides an interactive way to manage your AIM configuration:
aim tui # Launch the TUI
Features:
- ๐ Multi-Tab Navigation: Config, Status, Routes, Usage, Logs tabs
- ๐ Responsive Layout:
- Split Mode (โฅ80 cols): Side-by-side list and preview panels
- Single Mode (40-79 cols): Tab-switched compact view
- Minimum: 40ร10 terminal size
- ๐จ Tokyo Night Theme: Beautiful dark theme
- โจ๏ธ Keyboard Navigation:
Tab / Shift+Tab - Switch between tabs
โโ / jk - Navigate lists
Enter - Select / Confirm
n - New account
e - Edit selected item
d - Delete selected item
q / Ctrl+C - Quit
๐ Documentation
V2 Design Documentation
General Documentation
๐ฏ Supported Providers
- DeepSeek - High-performance reasoning models
- GLM (Zhipu AI) - Chinese AI models
- KIMI (Moonshot AI) - Long-context AI models
- Qwen (Alibaba Cloud) - Qwen series models
- Continuously expanding
๐งช Compatibility Testing
Operating System Support
| Operating System |
Architecture |
Test Status |
Notes |
| macOS |
ARM64 |
โ
Tested |
Primary development platform |
| macOS |
Intel |
โณ Pending |
Planned for future releases |
| Linux |
x86_64 |
โณ Pending |
Planned for future releases |
| Linux |
ARM64 |
โณ Pending |
Planned for future releases |
| Windows |
x86_64 |
โณ Pending |
Planned for future releases |
LLM Provider Testing
| Provider |
Test Status |
Notes |
| DeepSeek |
โ
Tested |
API connection working |
| GLM |
โ
Tested |
API connection working |
| KIMI |
โ
Tested |
API connection working |
| Qwen |
โ
Tested |
API connection working |
๐ก Note: If you encounter issues, please submit an Issue.
๐๏ธ Local Development
# Clone repository
git clone https://github.com/fakecore/aim.git
cd aim
# Build and install
make build
make install
# Load development environment
source test/local-dev-setup/dev-setup.sh # Bash/Zsh
source test/local-dev-setup/dev-setup.fish # Fish
# Run tests
make test
# Run TUI for testing
aim tui
๐บ๏ธ Roadmap
V2 Implementation Status
Future Enhancements
- TUI mouse support
- TUI accessibility (screen readers)
Currently supported AI CLI tools:
| Tool |
Command |
Protocol |
Status |
| Claude Code |
aim run cc |
anthropic |
โ
Available |
| Codex |
aim run codex |
openai |
โ
Available |
| OpenCode |
aim run opencode |
openai |
โ
Available |
| Tool |
Protocol |
Status |
| Gemini CLI |
openai |
โณ Planned |
๐ค Contributing
We welcome contributions! Please see our Development Guide for details.
- Fork this repository
- Create a feature branch (
git checkout -b feature/amazing-feature)
- Make your changes
- Commit your changes (
git commit -m "feat: add amazing feature")
- Push to your fork (
git push origin feature/amazing-feature)
- Create a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.