glu
A fast, modern package manager for Apple Silicon Macs that uses the Homebrew ecosystem to install tools with a structured, inspectable, and performant workflow.
glu is a high-performance, modern package manager built specifically for Apple Silicon macOS systems. It leverages the extensive Homebrew package ecosystem while introducing a custom resolver, advanced install pipeline, and a state-based architecture designed for speed and reliability. Created by Henrik Klee, the tool is written in Rust, which provides efficient memory management and precise control over system resources during installation tasks. By moving away from traditional serial processing, glu addresses the bottlenecks inherent in large cold-install workloads, often delivering significantly faster results compared to conventional package management methods.
The core functionality of glu revolves around a graph-based orchestrator that understands the entire dependency tree before execution begins. Rather than installing packages one by one, glu resolves dependencies in a single round trip to the registry, downloads artifacts concurrently, and manages parallel stages for extraction, preparation, linking, and post-installation. This design minimizes idle time and optimizes the use of network, CPU, and disk resources. The system also maintains a declarative state of managed packages using a local configuration file, ensuring that dependencies are automatically tracked and removed when they are no longer required.
Some of the key features are:
- Graph-First Orchestration: Uses a central scheduler to manage the entire dependency graph, enabling overlapping execution of downloads, preparation, and linking.
- One-Shot Resolution: Fetches the complete installation manifest, including dependency edges and metadata, in a single round-trip request to eliminate redundant index updates.
- JSON & Plan Mode: Provides a robust, machine-readable API that allows automation agents and scripts to inspect planned changes and receive structured outputs without scraping terminal logs.
- Performance Tracing: Includes built-in observability features that allow users to view detailed install traces, providing insight into phase timings, scheduling events, and potential bottlenecks.
- Coalesced Postinstall: Optimizes shared rebuild operations by aggregating contributions across multiple packages and executing necessary cache updates only once.
- Isolated Storage: Installs packages into
/opt/glustore, allowing for clean coexistence alongside existing Homebrew installations without interfering with global system paths. - Secure Verification: Implements strict artifact checksum verification and sandboxed worker environments to maintain correctness and prevent silent failures.
Operationally, glu is used via a concise command-line interface. Users can install, update, or remove packages with simple commands. For automation, users can utilize the --plan flag to preview changes as a JSON object, enabling a "plan-then-apply" workflow. The tool’s ability to output results in JSON format makes it highly compatible with modern CI/CD pipelines and coding assistants, which can interact with its schema to safely perform system configuration tasks. Advanced users can also leverage compact flag composition to quickly retrieve information about the installed state of their environment.
Some common use cases include:
- Efficient Environment Provisioning: Quickly setting up and tearing down consistent development environments for different projects by declaring dependencies in the glu configuration.
- Automated Infrastructure Management: Integrating glu into scripts where a coding agent or automation system inspects a planned dependency installation before approving the mutation.
- Performance-Critical Installs: Reducing the time required for massive cold installs of complex software stacks, such as large development frameworks or media processing libraries like vips.
- System Auditing: Using tracing and tree-based list views to analyze complex dependency trees and understand the time costs associated with various installed packages.