Speeds up shell startup by lazily loading slow setup commands like nvm, rvm, and pyenv when they're first used.
sandboxd is a shell utility that speeds up bashrc and zshrc startup times by lazily loading slow setup commands. It defers the execution of tools like nvm, rvm, and pyenv until they are first invoked, reducing initial shell load time.
Developers and system administrators who use multiple environment managers (e.g., nvm, rvm, pyenv) and experience slow shell startup times due to heavy rc file configurations.
It offers a lightweight, non-intrusive solution to shell performance issues without requiring changes to existing tool configurations, and it integrates seamlessly with shim-based tools for automatic lazy loading.
speeds up your bashrc by running (slow) setup commands on the fly
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Defers slow setup commands like nvm or pyenv until first use, drastically reducing shell startup time, as demonstrated in the README with examples of faster time-to-first-prompt.
Automatically hooks into shim-based tools such as pyenv, rbenv, and nodenv via sandbox_hook_shims, enabling easy lazy loading without manual command listing, as detailed in the Shims section.
Supports multiple configuration file locations including XDG-compliant paths and custom SANDBOXRC environment variables, offering adaptability across different setups, per the sandboxrc configuration file section.
Allows manual activation via the sandbox [name] command, enabling feature-flag-like usage in rc files, as shown in the 'Manually calling the sandbox command' example.
Requires strict naming conventions (e.g., sandbox_init_[name]) and separate rc files, which can be error-prone and confusing for users unfamiliar with shell scripting, as noted in the setup instructions.
Lazy loading might interfere with tools or scripts that expect environment setup at shell startup, leading to runtime errors if dependencies aren't managed carefully, a risk hinted at in the deferred execution model.
Only activates on command execution; if a tool requires setup without a command call (e.g., environment variables for background processes), sandboxd may not handle it, limiting its scope.