iqos_cli
iqos_cli copied to clipboard
Feature: Add install.sh to streamline cross-platform binary installation
Objective
Introduce a standalone install.sh script to simplify the installation process for end-users, bypassing the need for manual binary downloads or local Rust toolchain dependencies (cargo install).
Background
Currently, the installation requires users to either compile from source via Cargo or manually download pre-compiled binaries from GitHub Releases. This creates friction, especially for non-Rust developers. A one-liner installation script via curl or wget is a standard convention that improves UX.
Proposed Implementation
- OS & Arch Detection: Utilize
uname -sanduname -mto identify the target platform (Linux/macOS) and architecture (x86_64/aarch64). - Dependency Resolution: Fallback mechanism utilizing either
curlorwgetfor downloading assets. - Asset Retrieval: Construct the GitHub Releases API URL to fetch the latest pre-compiled binary matching the detected environment.
- Extraction & Placement: Extract the downloaded archive (tar.gz/zip) and install the binary into a standard
$PATHdirectory (e.g.,~/.local/binor/usr/local/binwithsudoescalation if required).
Acceptance Criteria
- [ ]
curl -sSL https://raw.githubusercontent.com/<OWNER>/<REPO>/main/install.sh | shsuccessfully installs the latest binary. - [ ] Correctly resolves and downloads binaries for macOS (Apple Silicon & Intel) and Linux (glibc & musl).
- [ ] Fails gracefully with a descriptive error message on unsupported platforms or missing dependencies.
- [ ] Does not require a local Rust toolchain (
rustc/cargo).
Additional Context
Since this is a cross-platform Rust project, Windows users will require a separate install.ps1 PowerShell script. This issue focuses strictly on the POSIX-compliant shell script for Unix-like systems.