Skip to content

Releases: samestrin/llm-env

v1.3.5

22 Mar 18:54

Choose a tag to compare

Bug Fixes

  • Set ANTHROPIC_API_KEY from auth_token - When using providers with auth_token_var instead of api_key_var, ANTHROPIC_API_KEY is now set from the auth token as a fallback, ensuring Claude Code works correctly with these providers.

v1.3.4

22 Mar 18:46

Choose a tag to compare

Bug Fix

  • Fixed Claude Code model variables not updating when switching providers - ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL, and CLAUDE_CODE_SUBAGENT_MODEL were preserving stale values from previous sessions instead of updating to the new provider's model.

v1.3.3 - Fix zsh section_name output bug

21 Mar 19:14

Choose a tag to compare

Bug Fix

Fixed a Zsh compatibility issue where section_name=... was printed for every config section during llm-env set.

The Problem

When running llm-env set default in Zsh, spurious debug output appeared:

section_name=zai_glm-4_7
section_name=local_qwen3
section_name=k25
...

The Cause

In Zsh, re-declaring a local variable inside a loop prints its previous value. The local section_name declaration was inside the config parsing loop.

The Fix

Moved section_name to the variable declarations outside the loop, consistent with other loop variables that already had this fix applied.

v1.3.2 - Referral Sign-Up Links

20 Mar 23:23

Choose a tag to compare

What's New

Referral Sign-Up Funnel

Users are now guided to sign up with referral links at three key moments:

  1. After quickstart — "Get your API keys" shows clickable sign-up links
  2. On missing key errorllm-env set <provider> shows the sign-up link when no API key is found
  3. Quickstart footer — Always shows both referral links

Links are clickable in supported terminals (iTerm2, macOS Terminal, GNOME Terminal, VS Code, Windows Terminal).

New Features

  • signup_url config field for providers (parsed from JSON and INI)
  • demo-quickstart.sh — interactive demo script for walkthroughs

Quickstart JSON Updates

  • Both quickstart-synthetic.json and quickstart-alibaba.json now include signup_url fields with referral codes

Full Changelog

See CHANGELOG.md

v1.3.1 - Quickstart Parser Fix & Alibaba Update

19 Mar 19:10

Choose a tag to compare

Fixes

Quickstart JSON Parser

Three bugs that caused only the first provider from each JSON file to be parsed:

  • Brace counting used wc -c (bytes) instead of wc -l (lines)
  • "providers": [ on the same line wasn't detected as array start
  • Provider block closed at wrong brace level

Alibaba Quickstart

  • Updated to correct Coding Plan endpoint: coding-intl.dashscope.aliyuncs.com/v1
  • Now includes only the 4 recommended models: qwen3.5-plus, kimi-k2.5, glm-5, MiniMax-M2.5

Output

  • Deduplicated API key export lines in quickstart next-steps output

Full Changelog

See CHANGELOG.md

v1.3.0 - Provider Groups & Multi-Provider Set

18 Mar 20:10

Choose a tag to compare

What's New

Provider Groups

Define named groups of providers in your config to set multiple providers with a single command:

[group:default]
providers=cerebras,anthropic
source llm-env set default    # Sets both OPENAI_* and ANTHROPIC_* variables

Comma-Separated Set

Set multiple providers at once without any config changes:

source llm-env set cerebras,anthropic

Group Listing

llm-env list now shows defined provider groups alongside providers.

Full Changelog

See CHANGELOG.md for details.

v1.1.3 - Zsh Shell Compatibility Fix

14 Jan 03:26

Choose a tag to compare

What's Fixed

Complete Zsh shell compatibility - The script now properly works when sourced in zsh (the default shell on macOS).

The Problem

The script was advertised as cross-shell compatible but failed when sourced in zsh due to multiple bash-specific constructs:

  • BASH_VERSION undefined → version detection failed
  • BASH_REMATCH array doesn't exist → regex captures failed
  • ${!var} indirect expansion not supported
  • Unquoted regex patterns fail in zsh
  • ${!array[@]} for keys uses different syntax
  • local declarations inside loops echo values in zsh

The Fix

  • Added detect_shell() to identify bash vs zsh at runtime
  • Enabled BASH_REMATCH option in zsh for regex compatibility
  • Added get_match() helper for cross-shell regex capture access
  • Added get_var_value() for cross-shell indirect variable expansion
  • Store regex patterns in variables (works in both shells)
  • Updated array wrapper functions with zsh-compatible syntax
  • Moved local declarations outside loops to prevent zsh output

Testing

Tested in both bash 3.2 and zsh 5.9 on macOS.

Upgrade

curl -fsSL https://raw.githubusercontent.com/samestrin/llm-env/main/install.sh | sudo bash

v1.1.2

08 Jan 04:47

Choose a tag to compare

Bug Fixes

  • install: Fix incorrect ownership and permissions for user config files when installer runs with sudo

Details

When the installer ran with sudo, the config directory (~/.config/llm-env/) and config file (config.conf) were created with root ownership, making them inaccessible to the user.

Fix:

  • Config directory now set to 700 (owner-only access)
  • Config file now set to 600 (owner read/write only)
  • Ownership is transferred to $SUDO_USER when running with sudo

v1.1.1 - Bash 3.2 Compatibility Fix

08 Jan 04:41

Choose a tag to compare

Bug Fixes

  • macOS Compatibility: Fixed mapfile: command not found error on macOS

    • macOS ships with Bash 3.2 by default, which lacks the mapfile builtin
    • Replaced with a Bash 3.2-compatible while-read loop for provider sorting
  • Config Init: Fixed No default configuration found to copy error

    • After installation to /usr/local/bin, the script couldn't locate a source config
    • Now generates default configuration inline when no external config file is found

Upgrade

# Re-run the installer
curl -fsSL https://raw.githubusercontent.com/samestrin/llm-env/main/install.sh | sudo bash

Or manually:

sudo curl -fsSL https://raw.githubusercontent.com/samestrin/llm-env/v1.1.1/llm-env -o /usr/local/bin/llm-env

feat: release v1.1.0 with enhanced tooling and testing

02 Sep 23:35

Choose a tag to compare

  • Add comprehensive help system and API testing
  • Implement configuration backup/restore functionality
  • Add bulk operations for provider management
  • Include debug mode for troubleshooting
  • Complete integration test suite with BATS framework