Skip to content

SamEdwardes/sams-simple-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sam's Simple Installer (ssi)

Caution

This script is still experimental, use it at your own risk.

A lightweight bash script that simplifies installing binaries from GitHub releases. It automatically detects your operating system, downloads the appropriate release asset, and installs it to your local directory structure following XDG Base Directory conventions.

Features

  • One command installation from any GitHub repository
  • Automatic platform detection (Linux, macOS, Windows via WSL)
  • Smart asset selection based on your system
  • XDG-compatible installation paths
  • Preserves directory structure (bin, lib, share)
  • No root access required

Requirements

SSI has minimal dependencies:

  • bash (version 4.0+)
  • curl (for downloading releases and API calls)
  • tar (for extracting archives)

Installation

There is no need to install ssi, you can use curl to dynamically download and execute the script:

# Install ripgrep
bash <(curl -fsSL https://raw.githubusercontent.com/SamEdwardes/sams-simple-installer/main/ssi) BurntSushi/ripgrep

# Install neovim with the --verbose flag
bash <(curl -fsSL https://raw.githubusercontent.com/SamEdwardes/sams-simple-installer/main/ssi) --verbose neovim/neovim

# Get help
bash <(curl -fsSL https://raw.githubusercontent.com/SamEdwardes/sams-simple-installer/main/ssi) --help

Alternatively, you can download the single file script and execute it directly.

# Download the script
curl -fsSL https://raw.githubusercontent.com/SamEdwardes/sams-simple-installer/main/ssi -o ~/.local/bin/ssi
chmod +x ~/.local/bin/ssi
ssi BurntSushi/ripgrep

Usage

Basic Usage

ssi owner/repository

For example:

# Install Neovim
ssi neovim/neovim

# Install Ripgrep
ssi BurntSushi/ripgrep

# Install just
ssi casey/just

Command-line Options

Usage: ssi [OPTIONS] OWNER/REPOSITORY

Options:
  -h, --help            Show this help message and exit
  -v, --verbose         Enable verbose output
  -y, --yes             Skip confirmation prompts
  -d, --dir DIR         Set installation directory (default: ~/.local)
  -t, --token TOKEN     Set GitHub API token
  -V, --version         Show version information and exit

Examples

Install with verbose output:

ssi -v sharkdp/fd

Install to a custom directory:

ssi -d /opt/tools BurntSushi/ripgrep

Install non-interactively (skip confirmation):

ssi -y neovim/neovim

Configuration

SSI can be configured with environment variables:

# Override installation directory
export SSI_INSTALL_DIR="${HOME}/.local"

# GitHub token for private repos or higher rate limits
export SSI_GITHUB_TOKEN="your-github-token"

# Temporary download directory
export SSI_TEMP_DIR="/tmp/ssi"

# Skip confirmation prompts
export SSI_AUTO_CONFIRM="true"

# Enable verbose output
export SSI_VERBOSE="true"

How It Works

  1. SSI detects your operating system and architecture
  2. It fetches the latest release information from GitHub
  3. It selects the most appropriate asset for your system
  4. It downloads the asset and extracts it
  5. It installs the binary and supporting files to your local directory
  6. It preserves the directory structure (bin, lib, share)

Directory Structure

SSI follows the XDG Base Directory specification:

~/.local/bin/     # Executable binaries (added to PATH)
~/.local/share/   # Shared data, documentation, man pages
~/.local/lib/     # Shared libraries and internal files

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A lightweight bash script that simplifies installing binaries from GitHub releases

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published