aim

module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: MIT

README ยถ

AIM - AI Model Manager

Go Version PRs Welcome

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
  • Phase 1: Core Foundation โœ…

    • Config parsing and validation
    • Basic aim run command
    • Built-in vendors (deepseek, glm, kimi, qwen)
  • Phase 2: CLI Commands โœ…

    • Config management commands
    • Error handling with structured codes
    • Config validation
  • Phase 3: TUI MVP โœ… (Partial)

    • Basic layout and navigation
    • Config tab (Account list + Preview)
    • Status tab (Basic health check)
    • ๐Ÿšง Settings, Routes, Usage tabs planned
  • Phase 4: Extensions ๐Ÿšง

    • Local YAML extensions
    • Extension registry
  • Phase 5: Migration

    • v1 to v2 config migration
  • Phase 6: Polish

    • Documentation
    • Performance optimization
Future Enhancements
  • TUI mouse support
  • TUI accessibility (screen readers)
Supported CLI Tools

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
Planned CLI Tools
Tool Protocol Status
Gemini CLI openai โณ Planned

๐Ÿค Contributing

We welcome contributions! Please see our Development Guide for details.

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Commit your changes (git commit -m "feat: add amazing feature")
  5. Push to your fork (git push origin feature/amazing-feature)
  6. Create a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“ž Contact & Support

โฌ† Back to Top

Made with โค๏ธ by fakecore

Directories ยถ

Path Synopsis
cmd
aim command
internal
cli
tui
pkg
test
e2e

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL