Installation Strategies Redesign #16
Notifications
Due Date
No due date set.
Blocks
#5 Accelerated Package Installation via Async Exec Graphs
sortedcord/bootstrap
Reference: sortedcord/bootstrap#16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Bootstrap was meant to do
Just as a brief introduction, the linux ecosystem is notoriously fragmented when it comes to installing packages. This creates a inconsistent experience for users setting up their environments.
.bashrcand clutter the home directory and also leave orphaned files upon installation apart from also posing a security risk by obscuring what they actually do.So ultimately, what we are left with is a tangled mess of native packages, stray binaries and dirty shell config files making it impossible to systematically and cleanly uninstall software or migrate setups to new machines.
Bootstrap exists to unify this broken experience at least for the tools you use by providing a single consistent interface that abstracts messy installation details.
And to achieve this abstraction, I had designed bootstrap to act as a "shadow package manager". Basically, when an installer (like
b ware yazi) needs a system dependency (like fzf), bootstrap installs it via the OS package manager and tracks it using a text file.So,
bootstrap/packages/fzfwould look something like:When a tool is uninstalled, its name is removed from the file. If the file empties, bootstrap uninstalls
fzffrom the system.Then we have the ghost state problem #9 which is a direct result of the shadow registry system.
From what I can see is that installers mainly fall into three categories. And the right way to go about this is to acknowledge this categorization instead of forcing everything into one model:
Installation Strategies
The best approach I could think of is to formalize these three strategies and unify them behind a single source of truth.
We replace the scattered per-package text files with just 1
registry.jsonthat tracks what's installed, how it was installed, and where it lives. Each tool declares its own installation strategy and the registry records the outcome.The Three Strategies
1. binary — For standalone CLI tools (lazygit, bat, starship, zoxide, yazi, asciinema)
• Install: Download the latest release from GitHub → extract → place in $BOOTSTRAP_DIR/bin/
• Uninstall: rm the binary, remove the registry entry
• Update: Re-download latest, overwrite the binary
• No reference counting needed: Each binary is wholly owned by bootstrap
2. managed — For runtimes with their own version managers (node/nvm, rust/rustup, uv, pnpm)
• Install: Delegate to the upstream installer (nvm, rustup, etc.)
• Uninstall: Delegate to the upstream uninstaller
• Update: Delegate to the upstream update mechanism
• No reference counting needed: The upstream manager owns everything
3. system — For things that must be OS packages (docker, build-essential, git)
• Install: Use pkg_install as today
• Uninstall: Use pkg_remove as today
• Reference counting: Still needed here, but only here — and there are far fewer of these tools,
making the surface area for ghost-state bugs much smaller