sortedcord / sortedcord/bootstrap

Accelerated Package Installation via Async Exec Graphs

Open
#5 0 comments 0 reactions 1 assignee View on GitHub

@sortedcord is already working on this.

Since Jun 28, 2026.

enhancement
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.gz and .deb files 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 binary tool like lazygit has 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: system strategy tools (like Docker) require exclusive locks on the native package manager (dpkg/pacman) and must be executed synchronously. managed tools (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:

  1. Resolve Strategies: Map all requested tools to their corresponding installation strategies (binary, system, or managed).
  2. Fetch Concurrently: Fire off concurrent downloads for all binary and managed assets in the background.
  3. Queue System Packages: Hand off all system strategy packages to a single blocking pkg_install command (sudo apt install package-a package-b) so the OS package manager resolves them efficiently in one transaction.
  4. Extract & Link Concurrently: As the background downloads finish, concurrently extract and link the binary tools into $BOOTSTRAP_DIR/bin/.
  5. Wait & Register: Use wait in bash to block until all background jobs finish. Finally, sequentially register all successful installations into the registry.json using flock to 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.