Repository navigation
Releases
v1.4.0
Install
Homebrew (macOS):
brew tap Vytral/tap
brew install apimanagerOne-liner:
curl -fsSL https://raw.githubusercontent.com/Vytral/apimanager/main/install.sh | bashSourced one-liner (applies instantly, no terminal restart):
source <(curl -fsSL https://raw.githubusercontent.com/Vytral/apimanager/main/install.sh)Then type api.
What's new
Sourced installer
Run the installer sourced and your shell picks up api() immediately — no restart, no manual source ~/.zshrc. Executed normally (including curl | bash) it prints the right command for you instead. The installer also detects your login shell (zsh, bash, or fish) and now exits cleanly without closing your terminal when everything is already up to date.
Health-check — api check [name]
Pings a provider before you trust it: GET /v1/models with bearer auth, then x-api-key fallback, then a minimal POST /v1/messages probe that just asks for an ok in one sentence. Reports the winning method, latency in ms, and model count or reply. No name given? It checks your active provider. Exit code tells scripts the truth (0 = alive, 1 = dead).
api check freemodel
# ✅ freemodel: GET /v1/models (bearer) — 12 models (231ms)Doctor — api doctor
Finds hygiene issues in your provider store and helps you fix them on the spot:
- exact duplicates (same token + URL) → multi-select delete, first copy kept
- entries with empty token/URL
- URLs not starting with
http(s) - fragile docker-bridge IPs (
172.17.0.2, changes on restart) → one-confirm rewrite tolocalhost - shell credentials matching no stored provider
Clean store? ✅ All good. Piped/CI usage gets a plain report with exit 1 when issues exist.
Also in this release
- Non-interactive CLI from v1.3.0 keeps working:
api use <name>,api list,api current,api export/api import - 48 unit tests (
npm test), GitHub Actions matrix (Node 18/20/22 × Ubuntu/macOS) plus an end-to-end installer smoke test
Upgrading
Re-run any install method — the installer compares versions, updates only when the repo is newer, keeps your providers, and backs up your rc files. --force reinstalls regardless.
v1.3.0 — CLI, fish, import/export
Install
curl -fsSL https://raw.githubusercontent.com/Vytral/apimanager/main/install.sh | bashThen type api.
What's new
- Scriptable CLI —
api use <name>,api list,api current,api help(no picker needed, alias-friendly) - Import/export —
api export > backup.json/api import backup.json(stdin pipe supported) - Fish support — shell detection now covers zsh, bash, and fish (
API_MANAGER_SHELLoverrides) - Smart installer — detects the installed version and updates only when the repo is newer (
--forceto reinstall); detects your login shell - Uninstaller —
./uninstall.sh(--purgealso removes providers) - Tests + CI — 41 unit tests (
npm test), GitHub Actions matrix (Node 18/20/22 × Ubuntu/macOS) plus an end-to-end installer smoke test
Re-running the installer keeps your providers and backs up your rc files.