Manage multiple Miniserver connections from a single CLI — switch between home, office, or client installations instantly. Inspired by kubectl config use-context.
✨ New: lox ctx — Context Management
lox ctx add home --host 192.168.1.100 --user admin --pass secret
lox ctx add office --host 10.0.0.50 --user admin --pass secret
lox ctx use office # switch active context
lox ctx list # show all contexts with ● active marker
lox ctx current # print active context name
lox --ctx home status # one-off command against a different context
All subcommands
| Command | Description |
|---|---|
lox ctx add <name> |
Add a named Miniserver context |
lox ctx use <name> |
Switch the active context |
lox ctx list |
List all contexts (supports --json) |
lox ctx current |
Print the active context name |
lox ctx remove <name> |
Delete a context |
lox ctx rename <old> <new> |
Rename a context |
lox ctx init |
Create project-local .lox/ directory with .gitignore |
lox ctx migrate |
Convert existing flat config to a default context |
--ctx <name> |
Global flag — run any command against a specific context |
📁 Project-Local Configs
Like .git, lox now walks up from your working directory to find project-specific Miniserver configs:
cd ~/projects/smart-home
lox ctx init --host 192.168.1.100 --user admin --pass secret
# Creates .lox/config.yaml — all lox commands in this tree use it automatically🔀 Config Resolution Order
LOX_CONFIGenv var (absolute priority)- Project-local
.lox/config.yaml(walk up from cwd) - Global
~/.lox/config.yaml(flat or multi-context) --ctxflag overrides context selection within global config
📦 New Multi-Context Config Format
active_context: home
contexts:
home:
host: https://192.168.1.100
user: admin
pass: secret
office:
host: https://10.0.0.50
user: admin
pass: secretExisting flat configs continue to work — opt in with lox ctx migrate.
🐛 Bug Fixes
- Gen2 Miniserver compatibility — all commands now handle numeric JSON
Code/valuefields returned by Gen2 firmware (previously only string values were accepted). Fixesprint_resp,input set,set, and alltokencommands. (#99)
Install / Upgrade
# macOS / Linux (Homebrew)
brew upgrade lox
# Windows (PowerShell)
irm https://raw.githubusercontent.com/discostu105/lox/main/install.ps1 | iex
# From source
cargo install --git https://github.com/discostu105/lox --tag v0.11.0Full Changelog: v0.10.1...v0.11.0
What's Changed
- fix: handle numeric JSON Code/value from Gen2 Miniservers in all commands by @discostu105 in #99
- chore: bump version to 0.10.2 by @discostu105 in #103
- feat: add
lox ctxfor multi-Miniserver context management by @discostu105 in #101 - Release v0.11.0 — multi-Miniserver contexts by @discostu105 in #104
Full Changelog: v0.10.1...v0.11.0