A TUI for selecting AI models from OpenRouter, Ollama Cloud and ClinePass
  • Go 96.6%
  • Shell 3.4%
Find a file
Paul Git a742ecf5b5
All checks were successful
CI / Lint (push) Successful in 1m1s
CI / Test (push) Successful in 1m3s
Release / Vulnerability Scan (release) Successful in 49s
Release / linux/amd64 (release) Successful in 1m18s
Release / darwin/amd64 (release) Successful in 1m19s
Release / windows/amd64 (release) Successful in 1m21s
Release / darwin/arm64 (release) Successful in 1m21s
Release / linux/arm64 (release) Successful in 1m17s
Release / Checksums (release) Successful in 11s
Release / Notify (release) Successful in 6s
Bump version to 0.3.1
ClinePass catalog updated with Kimi K3.

Co-Authored-By: Zed with ollama/kimi-k2.7-code
2026-07-22 21:46:54 +08:00
.forgejo/workflows ci: use fully-qualified URL for Forgejo artifact action forks 2026-07-16 21:29:15 +08:00
internal/aims Add OpenCode Zen provider for AI model selection 2026-07-16 22:47:05 +08:00
providers Update ClinePass catalog: add Kimi K3 2026-07-22 21:45:48 +08:00
.claudeignore Add AI agent ignore files 2026-07-16 23:21:17 +08:00
.clineignore Add AI agent ignore files 2026-07-16 23:21:17 +08:00
.codexignore Add AI agent ignore files 2026-07-16 23:21:17 +08:00
.gitignore Add AI agent ignore files 2026-07-16 23:21:17 +08:00
.opencodeignore Add AI agent ignore files 2026-07-16 23:21:17 +08:00
AGENTS.md feat: add Cline recommended/free model tagging with UI filter shortcuts 2026-07-16 20:20:22 +08:00
config.example.json Add OpenCode Zen provider for AI model selection 2026-07-16 22:47:05 +08:00
config.go feat: initial release of aims v0.1.0 2026-07-14 08:14:35 +08:00
config_test.go feat: initial release of aims v0.1.0 2026-07-14 08:14:35 +08:00
go.mod fix: harden provider and release security 2026-07-16 03:25:03 +08:00
go.sum fix: harden provider and release security 2026-07-16 03:25:03 +08:00
install.sh Fix install.sh issues flagged by code review 2026-07-15 22:00:31 +08:00
keychain.go feat: initial release of aims v0.1.0 2026-07-14 08:14:35 +08:00
LICENSE feat: initial release of aims v0.1.0 2026-07-14 08:14:35 +08:00
main.go Bump version to 0.3.1 2026-07-22 21:46:54 +08:00
README.md fix: harden provider and release security 2026-07-16 03:25:03 +08:00
ui.go Add OpenRouter free model tags 2026-07-16 21:04:25 +08:00
ui_test.go Add OpenRouter free model tags 2026-07-16 21:04:25 +08:00

aims — AI Model Selector

A terminal UI for selecting AI models from multiple providers. Browse, search, and select models from Ollama, OpenRouter, Cline, and more — all in one place.

Features

  • Multi-provider: Ollama, OpenRouter, Cline, and ClinePass in one unified list
  • Provider tabs: Switch between providers or view all models at once
  • Fuzzy search: Filter by model name, description, provider, or metadata
  • Detail panel: See context length, pricing, modality, and more
  • Caching: Per-provider filesystem cache with configurable TTL
  • Clipboard: Copy the selected model ID to the clipboard
  • Extensible: Add new providers by implementing a single interface

Installation

Pre-built binary (macOS / Linux)

curl -fsSL https://code.paulg.it/paulgit/ai-model-selector/raw/branch/main/install.sh | sh

The script detects your OS and architecture, downloads the matching binary from the latest release, verifies it against the published SHA256SUMS, and installs it to /usr/local/bin (or ~/.local/bin if you don't have sudo).

To review the script before running it:

curl -fsSL https://code.paulg.it/paulgit/ai-model-selector/raw/branch/main/install.sh | less

To install to a custom directory:

curl -fsSL https://code.paulg.it/paulgit/ai-model-selector/raw/branch/main/install.sh | sh -s -- --prefix ~/.local/bin

Build from source

Requires Go 1.26 or later.

git clone https://code.paulg.it/paulgit/ai-model-selector.git
cd ai-model-selector
go build -o aims .

Usage

# Interactive model selection (prints model ID to stdout)
aims

# Copy selected model to clipboard
aims -c

# Force refresh from all providers (bypass cache)
aims -r

# Force refresh a specific provider only
aims -refresh-provider ollama

# Disable caching
aims -cache-ttl 0

# Custom cache TTL for all providers
aims -cache-ttl 6h

Using with command substitution

MODEL=$(aims)
echo "Selected: $MODEL"

Configuration

aims reads its config from $XDG_CONFIG_HOME/aims/config.json (or ~/.config/aims/config.json on Linux/macOS, %AppData%\aims\config.json on Windows):

{
  "providers": {
    "ollama": {
      "enabled": true
    },
    "openrouter": {
      "enabled": true
    },
    "cline": {
      "enabled": true,
      "api_key_ref": "op://AIMS/Cline/credential"
    },
    "clinepass": {
      "enabled": true
    }
  }
}

If no config file is found, aims will prompt:

No configuration file found at /home/user/.config/aims/config.json
Would you like to create a default configuration? [y/N]

Answering y creates a default config (with Ollama and OpenRouter enabled, Cline disabled) with 0600 permissions. Answering n exits.

Provider options

Field Description
enabled Whether the provider is active
api_key_ref 1Password reference (e.g. op://AIMS/Key/credential)
base_url Override the default API endpoint
cache_ttl Per-provider cache TTL (Go duration, e.g. "6h")

Authenticated providers require an HTTPS base_url. Plain HTTP is accepted only for explicit loopback hosts such as localhost, 127.0.0.1, and ::1.

API key resolution

API keys are resolved in order:

  1. 1Password CLI (op read <api_key_ref>) — if api_key_ref is set
  2. Environment variableAIMS_<PROVIDER>_API_KEY (e.g. AIMS_CLINE_API_KEY)

Adding a new provider

  1. Create a package under providers/<name>/
  2. Implement the aims.Provider interface:
type Provider interface {
    Name() string
    DisplayName() string
    FetchModels(ctx context.Context, opts FetchOptions) ([]Model, error)
    DefaultCacheTTL() time.Duration
    RequiresAPIKey() bool
}
  1. Register it in an init() function:
func init() {
    aims.RegisterProvider(Provider{})
}
  1. Add a blank import in main.go:
_ "aims/providers/yourprovider"
  1. Add the provider to the config file

Architecture

aims/
├── main.go              # Entry point, CLI flags, provider orchestration
├── ui.go                # Bubble Tea TUI (list, tabs, detail panel)
├── config.go            # JSON config loading
├── keychain.go          # API key resolution (1Password + env vars)
├── install.sh           # One-line install script (curl | sh)
├── internal/aims/       # Shared types and cache logic
│   ├── aims.go          # Model, Provider, FetchOptions types
│   ├── cache.go         # CacheProvider, DefaultCacheProvider
│   ├── fetch.go         # FetchWithCache (shared cache-aware fetch)
│   └── registry.go      # Provider registry
└── providers/
    ├── ollama/          # Ollama Cloud provider
    ├── openrouter/      # OpenRouter provider
    ├── cline/           # Cline API provider
    └── clinepass/       # ClinePass subscription provider (static catalog)

License

MIT