Documentation

Everything you need to know about xo.rs installation scripts

๐Ÿš€ Getting Started

xo.rs provides a collection of installation scripts that allow you to install development tools with a single command. No manual downloads, no configuration hasslesโ€”just copy, paste, and run.

๐Ÿ’ก Pro Tip: All scripts are idempotent, meaning you can run them multiple times safely. If the tool is already installed, the script will detect it and skip installation.

๐ŸชŸ Windows (PowerShell)

Prerequisites

Basic Usage

Open PowerShell and run:

irm https://xo.rs/install/<tool>.ps1 | iex

Example: Install Go

irm https://xo.rs/install/go.ps1 | iex

Example: Install Custom PowerShell Profile

irm https://xo.rs/install/profile.ps1 | iex
โš ๏ธ Execution Policy: If you encounter an execution policy error, run this first:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

๐Ÿง Linux/macOS (Bash)

Prerequisites

Basic Usage

Open your terminal and run:

curl -sSL https://xo.rs/install/<tool>.sh | bash

Example: Install Docker

curl -sSL https://xo.rs/install/docker.sh | bash

Example: Install Go

curl -sSL https://xo.rs/install/go.sh | bash
๐Ÿ’ก Note: Some scripts may prompt for your sudo password during installation.

โœจ Features

Idempotent Scripts

All scripts check if the tool is already installed before proceeding. This means you can safely run the same script multiple times without issues.

Progress Indicators

Scripts show visual progress indicators during downloads and installations, so you always know what's happening.

Error Handling

Robust error handling ensures that if something goes wrong, you'll get a clear error message explaining what happened.

Latest Versions

Scripts automatically fetch and install the latest stable versions of tools from official sources.

Common Libraries

All scripts use shared common libraries (common.ps1 and common.sh) that provide consistent styling, logging, and utility functions.

๐Ÿ”ง Troubleshooting

Windows Issues

Execution Policy Error

If you see an error about execution policy:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force

Network Error

If downloads fail, check your internet connection and try again. Some corporate networks may block script downloads.

Administrator Rights

Most installations require administrator privileges. Right-click PowerShell and select "Run as Administrator".

Linux Issues

Permission Denied

If you see permission errors, make sure you have sudo privileges:

sudo -v

Package Manager Issues

Update your package manager before running scripts:

sudo apt update  # Ubuntu/Debian

Group Changes

Some installations (like Docker) add your user to groups. You'll need to log out and log back in for these changes to take effect.

๐Ÿ“š Examples

Setting Up a Complete Development Environment

Windows

# Install PowerShell 7+
irm https://xo.rs/install/ps.ps1 | iex

# Install custom profile
irm https://xo.rs/install/profile.ps1 | iex

# Install development tools
irm https://xo.rs/install/go.ps1 | iex
irm https://xo.rs/install/python.ps1 | iex
irm https://xo.rs/install/flutter.ps1 | iex

# Install build tools
irm https://xo.rs/install/build_essentials.ps1 | iex
irm https://xo.rs/install/cmake.ps1 | iex

Linux

# Install essential tools
curl -sSL https://xo.rs/install/git.sh | bash
curl -sSL https://xo.rs/install/docker.sh | bash

# Install programming languages
curl -sSL https://xo.rs/install/go.sh | bash
curl -sSL https://xo.rs/install/python.sh | bash
curl -sSL https://xo.rs/install/rust.sh | bash

# Install additional tools
curl -sSL https://xo.rs/install/github.sh | bash
curl -sSL https://xo.rs/install/ollama.sh | bash

Installing Multiple Tools at Once

Windows (PowerShell)

$tools = @('go', 'python', 'cmake', 'protoc')
foreach ($tool in $tools) {
    Write-Host "Installing $tool..." -ForegroundColor Cyan
    irm "https://xo.rs/install/$tool.ps1" | iex
}

Linux (Bash)

#!/bin/bash
tools=("git" "docker" "go" "python" "rust")
for tool in "${tools[@]}"; do
    echo "Installing $tool..."
    curl -sSL "https://xo.rs/install/$tool.sh" | bash
done

๐Ÿค Contributing

Want to add a new installation script or improve existing ones? Contributions are welcome!

Script Template (PowerShell)

# Fetch common library
iex (iwr -useb https://xo.rs/common.ps1)

Show-Banner
Write-Section "Tool Name Installation"

# Check if already installed
if (Command-Exists tool-name) { 
    Write-Success "Tool is already installed"
    exit 
}

# Require admin if needed
Ensure-Admin

# Your installation logic here
Write-Success "Installation complete!"

Script Template (Bash)

#!/bin/bash
source <(curl -sSL https://xo.rs/common.sh)

show_banner
log_section "Tool Name Installation"

# Check if already installed
if command_exists tool-name; then
    log_success "Tool is already installed"
    exit 0
fi

# Prime sudo
prime_sudo

# Your installation logic here
log_success "Installation complete!"
โœ… Best Practices:
  • Always check if the tool is already installed
  • Use the common library functions for consistency
  • Provide clear error messages
  • Test on clean systems before submitting
  • Document any prerequisites or post-installation steps

Submit Your Script

Fork the repository on GitHub, add your script, and submit a pull request. Make sure to:


Need help? Have questions? Reach out at [email protected]