avar is an open-source macOS CLI I built around one idea: the current directory plus the operating environment I select.
From a project directory, avr opens an interactive Linux shell in that same
directory. avr npm test runs a single command in Linux and returns its exit
status. The project files remain the same files on the Mac, so I can keep using
my normal editor and Git workflow while Linux runs the tools that need Linux.
avar orchestrates the environment, directory sharing, defaults, and lifecycle. Its macOS backend integrates with Lima for the lower-level virtualisation, file sharing, and port forwarding. On Apple Silicon, the default native environment uses Apple’s built-in Virtualization framework. I do not need to install and manually size a separate hypervisor, name a VM, configure a mount, or add a configuration file to each repository before I begin.
The Linux environments are persistent. Packages installed inside an environment
survive between sessions, and services listening inside it are reachable through
localhost on macOS. I can choose Ubuntu, Debian, or Fedora, select arm64 or
amd64, and give a project its own isolated environment when shared packages
would cause conflicts.
avar also makes the lifecycle explicit. I can inspect what exists with avr status, stop environments to release resources, reset one to a clean operating
system, or destroy it completely without deleting the project files on my Mac.
avr code opens the project through VS Code Remote-SSH when I want the editor’s
extensions and terminals to run inside Linux too.
This is a convenience tool, not a security sandbox or a replacement for a reproducible team build definition. When exact, declarative reproduction matters, a Dev Container, Nix setup, CI image, or container may be the better tool. avar is for the simpler and rather common need: “I need Linux here.”
v0.1.0 supports macOS. Windows support through WSL 2 is in the pipeline, with the same goal of keeping the developer in the current project rather than making them copy files into WSL or manage the environment by hand.
Install v0.1.0 with Homebrew:
brew install --cask olamide226/tap/avar
Homebrew installs Lima as a dependency. Direct release downloads are currently unsigned and unnotarised, so Homebrew is the recommended installation path.
Links: