sortedcord / sortedcord/bootstrap
Accelerated Package Installation via Async Exec Graphs
@sortedcord is already working on this.
Since Jun 28, 2026.
- Dominant language
- Shell
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Traditional package managers (apt, dnf, pacman) are highly synchronous. When bootstrapping a new machine or installing a large batch of tools, the user is forced to wait for sequential operations: resolving package A, downloading A, extracting A, installing A... before moving on to package B.
This synchronous nature wastes significant time waiting on Network I/O.
Because the proposed bootstrap architecture separates tools into binary, managed, and system strategies, it naturally unlocks the ability to orchestrate an accelerated, asynchronous installation pipeline.
By taking control of the installation pipeline, we can implement an asynchronous, non-blocking execution graph:
1. Concurrent Downloads (Network I/O)
The most time-consuming part of installing multiple CLI tools is waiting for sequential network requests. Since binary strategy tools are just raw file downloads from GitHub, these can be perfectly parallelized.
- Using
curl -Z(parallel transfers) or spawning background processes(download_file ... &), we can rapidly download multiple.tar.gzand.debfiles concurrently into the temporary directory.
2. Dependency Sequencing (Blocking vs. Non-Blocking)
We can analyze the installation intent to build an execution graph:
- Non-blocking tasks: Extracting a
binarytool likelazygithas zero side-effects and depends on nothing. Ten binary tools can be extracted and copied into$BOOTSTRAP_DIR/bin/simultaneously in background subshells. - Blocking tasks:
systemstrategy tools (like Docker) require exclusive locks on the native package manager (dpkg/pacman) and must be executed synchronously.managedtools (like Node via NVM) might require their base manager to be installed first.
3. Implementation Approach
When a user runs b up or installs multiple tools at once (e.g. b install lazygit bat zoxide starship yazi), the CLI will execute the following pipeline:
- Resolve Strategies: Map all requested tools to their corresponding installation strategies (
binary,system, ormanaged). - Fetch Concurrently: Fire off concurrent downloads for all
binaryandmanagedassets in the background. - Queue System Packages: Hand off all
systemstrategy packages to a single blockingpkg_installcommand (sudo apt install package-a package-b) so the OS package manager resolves them efficiently in one transaction. - Extract & Link Concurrently: As the background downloads finish, concurrently extract and link the
binarytools into$BOOTSTRAP_DIR/bin/. - Wait & Register: Use
waitin bash to block until all background jobs finish. Finally, sequentially register all successful installations into theregistry.jsonusingflockto prevent race conditions.
Outcome
This architecture will make bootstrapping a new machine or batch-installing tools feel incredibly fast, drastically outperforming standard synchronous package managers by saturating network bandwidth and CPU cores during extraction.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.