iqos_cli icon indicating copy to clipboard operation
iqos_cli copied to clipboard

Feature: Add install.sh to streamline cross-platform binary installation

Open nonnil opened this issue 7 months ago • 0 comments

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

  1. OS & Arch Detection: Utilize uname -s and uname -m to identify the target platform (Linux/macOS) and architecture (x86_64/aarch64).
  2. Dependency Resolution: Fallback mechanism utilizing either curl or wget for downloading assets.
  3. Asset Retrieval: Construct the GitHub Releases API URL to fetch the latest pre-compiled binary matching the detected environment.
  4. Extraction & Placement: Extract the downloaded archive (tar.gz/zip) and install the binary into a standard $PATH directory (e.g., ~/.local/bin or /usr/local/bin with sudo escalation if required).

Acceptance Criteria

  • [ ] curl -sSL https://raw.githubusercontent.com/<OWNER>/<REPO>/main/install.sh | sh successfully 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.

nonnil avatar Apr 23 '26 06:04 nonnil