feat: add standalone CLI installation system - #247
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a complete standalone distribution path for the ExplainThisRepo CLI.
The goal is to make the native CLI installable on supported Unix-like systems without requiring the user to install Python, pip, Node.js, npm, or any project dependencies.
The resulting user experience is:
curl -fsSL https://cli.explainthisrepo.com/install.sh | shThe installer detects the user's operating system and architecture, resolves the latest GitHub Release, downloads the matching installer archive, verifies its SHA256 checksum, extracts the native executable, and installs it to
/usr/local/bin.This builds the distribution layer on top of the native binaries that already exist.
What changed
1. Added install.sh`
A root-level
install.shis added as the standalone Unix installer.Its responsibility is to own the installation decision-making:
The installer supports the Unix targets currently produced by the release pipeline:
It does not require Python, pip, Node.js, npm, or the ExplainThisRepo package ecosystem to already exist on the machine.
The only runtime tools required are normal Unix utilities used by the installer itself.
2. Added deterministic CLI installer archives
The release pipeline now produces a second class of release artifact specifically for automated installation.
The archive naming convention is:
For example:
The
cli-installerportion is intentional.The existing release binaries and the new archives serve different purposes.
The existing assets are human-facing direct binaries:
The new assets are machine-facing distribution packages:
The existing human-readable asset names are therefore preserved.
They are not being replaced.
3. Archive contents are intentionally minimal
Each installer archive contains only the executable required for that target.
Unix example:
explainthisrepoWindows example:
explainthisrepo.exeThere are no nested directories, README files, version files, or unrelated release metadata inside the archive.
This gives the installer a deterministic extraction contract:
4. Added installer archive checksums
Each installer archive receives its own SHA256 checksum.
For example:
The checksum is calculated over the archive itself because the installer downloads the archive.
The verification flow is therefore:
This makes the integrity check apply to the exact artifact being transferred and installed.
The existing raw binary checksum generation remains part of the release pipeline for the existing release assets and package distribution.
5. Existing native build system remains the source of binaries
This change does not replace or redesign the existing PyInstaller build system.
The existing build matrix remains responsible for producing:
The architecture is now:
This keeps compilation and distribution as separate concerns.
6. Existing npm and .NET distribution paths are preserved
The native binaries are still rehydrated into the existing locations:
The npm package continues to receive the native binaries.
The .NET Global Tool continues to receive the native binaries.
The standalone installer is therefore an additional distribution path rather than a replacement for the existing package ecosystems.
The overall distribution model becomes:
7. GitHub Releases become the artifact source of truth
A version tag continues to drive the release pipeline:
The GitHub Release therefore contains both artifact classes.
Human-facing release assets
Installer distribution assets
And their corresponding checksums.
The two artifact classes are intentionally kept separate by naming.
8.
cli.explainthisrepo.combecomes the stable installation interfaceThe user does not need to know the GitHub repository, release tag, architecture names, or archive names.
The public installation interface is:
curl -fsSL https://cli.explainthisrepo.com/install.sh | shThe domain provides a stable entry point while the actual release artifacts can continue to be versioned through GitHub Releases.
The installer itself determines which release artifact is appropriate.
The user does not need to manually select:
That decision belongs to the installer.
9. Why the architecture is split this way
There are three distinct naming layers in the system.
CI target identifiers
These are machine-oriented:
They are used by the build matrix and installer routing.
Human-readable release binaries
These are intended for people browsing a GitHub Release:
CLI installer archives
These are intended for deterministic automated installation:
Each naming layer therefore has a different responsibility.
This avoids forcing either the human-facing release interface or the installer to use names optimized for the other.
10. Failure handling
The installer is designed to fail rather than continue with an invalid state.
Important failure points include:
A failed installation should not result in a partially trusted executable being silently installed.
The release workflow also verifies generated native binaries before publishing the release.
11. Documentation
Two documentation layers are added.
docs/INSTALLATION.mdThis documents the user-facing installation system:
README.mdThe README gets the short user-facing installation experience so a new user can immediately discover:
curl -fsSL https://cli.explainthisrepo.com/install.sh | shThe README does not need to expose the internal release pipeline.
The detailed distribution architecture belongs in the installation and release documentation.
Result
Before this change, the project could build and publish native binaries.
After this change, those binaries are connected to a complete installation path:
The important change is that the native executable is no longer the end of the distribution pipeline.
It becomes the payload of a defined installation system.