- Go 96.6%
- Shell 3.4%
|
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
ClinePass catalog updated with Kimi K3. Co-Authored-By: Zed with ollama/kimi-k2.7-code |
||
|---|---|---|
| .forgejo/workflows | ||
| internal/aims | ||
| providers | ||
| .claudeignore | ||
| .clineignore | ||
| .codexignore | ||
| .gitignore | ||
| .opencodeignore | ||
| AGENTS.md | ||
| config.example.json | ||
| config.go | ||
| config_test.go | ||
| go.mod | ||
| go.sum | ||
| install.sh | ||
| keychain.go | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
| ui.go | ||
| ui_test.go | ||
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:
- 1Password CLI (
op read <api_key_ref>) — ifapi_key_refis set - Environment variable —
AIMS_<PROVIDER>_API_KEY(e.g.AIMS_CLINE_API_KEY)
Adding a new provider
- Create a package under
providers/<name>/ - Implement the
aims.Providerinterface:
type Provider interface {
Name() string
DisplayName() string
FetchModels(ctx context.Context, opts FetchOptions) ([]Model, error)
DefaultCacheTTL() time.Duration
RequiresAPIKey() bool
}
- Register it in an
init()function:
func init() {
aims.RegisterProvider(Provider{})
}
- Add a blank import in
main.go:
_ "aims/providers/yourprovider"
- 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