This guide provides detailed instructions for installing langstar on various platforms.
- Quick Install
- Supported Platforms
- Installation Methods
- Installation Options
- Verifying Installation
- Updating langstar
- Uninstalling langstar
- Troubleshooting
For most users, the installer script is the fastest and easiest method:
curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/codekiln/langstar/main/scripts/install.sh | shThis will:
- Detect your platform (Linux or macOS) and architecture (x86_64 or ARM64)
- Download the appropriate pre-built binary from GitHub releases
- Verify the SHA256 checksum
- Install to
/usr/local/bin(or~/.local/binif you don't have sudo access)
langstar currently supports the following platforms:
| Operating System | Architecture | Binary Type | Notes |
|---|---|---|---|
| Linux | x86_64 (64-bit) | Static (musl) | No runtime dependencies |
| macOS | x86_64 (Intel) | Dynamic | macOS 10.13+ |
| macOS | aarch64 (Apple Silicon) | Dynamic | M1/M2/M3 Macs |
All platforms:
curlorwget(for downloading)tar(for extracting archives)shasumorsha256sum(for checksum verification)
These tools are pre-installed on most systems.
Linux:
- No additional runtime dependencies (static binary)
- Works on Debian, Ubuntu, Fedora, RHEL, Alpine, and other distributions
macOS:
- macOS 10.13 (High Sierra) or later
- No additional runtime dependencies
The official installer script is the recommended method for most users.
curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/codekiln/langstar/main/scripts/install.sh | shWhat it does:
- Uses HTTPS with TLS 1.2+ for security
- Downloads and runs the installer script
- Installs the latest version
If you prefer to inspect the script before running:
# Download the installer
curl -LO https://raw.githubusercontent.com/codekiln/langstar/main/scripts/install.sh
# Inspect the script (optional but recommended)
less install.sh
# Make it executable
chmod +x install.sh
# Run the installer
./install.shInstall with specific options:
# Install specific version
curl -LO https://raw.githubusercontent.com/codekiln/langstar/main/scripts/install.sh
chmod +x install.sh
./install.sh --version 0.2.0
# Install to custom directory
./install.sh --prefix ~/bin
# Combine options
./install.sh --version 0.2.0 --prefix ~/.local/binIf you prefer not to use the installer script, you can install manually:
Linux (x86_64):
PLATFORM="x86_64-linux-musl"macOS (Intel):
PLATFORM="x86_64-macos"macOS (Apple Silicon):
PLATFORM="aarch64-macos"VERSION="0.2.0" # or check latest at https://github.com/codekiln/langstar/releases# Create temporary directory
TEMP_DIR=$(mktemp -d)
cd "$TEMP_DIR"
# Download archive
curl -LO "https://github.com/codekiln/langstar/releases/download/v${VERSION}/langstar-${VERSION}-${PLATFORM}.tar.gz"
# Download checksum
curl -LO "https://github.com/codekiln/langstar/releases/download/v${VERSION}/langstar-${VERSION}-${PLATFORM}.tar.gz.sha256"
# Verify checksum
shasum -a 256 -c "langstar-${VERSION}-${PLATFORM}.tar.gz.sha256"
# Extract
tar -xzf "langstar-${VERSION}-${PLATFORM}.tar.gz"System-wide (requires sudo):
sudo install -m 755 langstar /usr/local/bin/langstarUser-local (no sudo required):
mkdir -p ~/.local/bin
install -m 755 langstar ~/.local/bin/langstar
# Add to PATH if not already present
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc for zsh
source ~/.bashrc # or source ~/.zshrclangstar --versionFor developers or if pre-built binaries aren't available for your platform:
- Rust toolchain (stable, 1.70+)
- Git
# Clone the repository
git clone https://github.com/codekiln/langstar.git
cd langstar
# Build and install
cargo install --path cli
# Verify
langstar --versionBuild options:
# Development build (faster compilation, slower runtime)
cargo build --bin langstar
# Release build (optimized)
cargo build --release --bin langstar
# Install specific features
cargo install --path cli --features experimental
# Install to custom directory
cargo install --path cli --root ~/.localThe install.sh script supports the following options:
| Option | Description | Example |
|---|---|---|
--version VERSION |
Install specific version | --version 0.2.0 |
--prefix DIR |
Install to custom directory | --prefix ~/bin |
--help |
Show help message | --help |
The installer uses the following logic to choose the installation directory:
--prefixflag (highest priority) - User-specified directoryLANGSTAR_INSTALL_DIRenvironment variable - Override default directory/usr/local/bin- System-wide (if writable or sudo available)~/.local/bin- User-local fallback (no sudo required)
Examples:
# System-wide (requires sudo)
./install.sh
# User-local (no sudo)
LANGSTAR_INSTALL_DIR=~/.local/bin ./install.sh
# Custom directory
./install.sh --prefix ~/my-tools/binIf langstar is installed to a directory not in your PATH, you'll need to add it:
For ~/.local/bin:
# Bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Zsh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Fish
fish_add_path ~/.local/binFor custom directory:
echo 'export PATH="/path/to/custom/dir:$PATH"' >> ~/.bashrc # or ~/.zshrc
source ~/.bashrc # or source ~/.zshrcAfter installation, verify that langstar is working:
# Check version
langstar --version
# Show help
langstar --help
# Test configuration (requires LANGSMITH_API_KEY)
export LANGSMITH_API_KEY="your-api-key"
langstar configExpected output:
langstar 0.2.0
The installer is idempotent and can be used to update:
# Update to latest version
curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/codekiln/langstar/main/scripts/install.sh | sh
# Update to specific version
curl -LO https://raw.githubusercontent.com/codekiln/langstar/main/scripts/install.sh
chmod +x install.sh
./install.sh --version 0.3.0The installer will:
- Detect existing installation
- Compare versions
- Download and install the new version
- Verify installation
# Check current version
langstar --version
# Download and install new version manually (see Manual Installation section)cd langstar
git pull origin main
cargo install --path cli --forceSystem-wide installation:
sudo rm /usr/local/bin/langstarUser-local installation:
rm ~/.local/bin/langstarCustom installation:
rm /path/to/custom/dir/langstarcargo uninstall langstarTo remove configuration files:
# Remove config directory
rm -rf ~/.langstar
# Remove from shell profile (if added to PATH manually)
# Edit ~/.bashrc or ~/.zshrc and remove the export PATH lineInstall curl:
Debian/Ubuntu:
sudo apt-get update && sudo apt-get install curlmacOS:
# curl is pre-installed on macOS
# If missing, install via Homebrew:
brew install curlCheck your internet connection and GitHub accessibility:
# Test GitHub connectivity
curl -I https://github.com
# Try with wget instead of curl
wget https://raw.githubusercontent.com/codekiln/langstar/main/scripts/install.sh -O install.sh
chmod +x install.sh
./install.shThis indicates the downloaded file is corrupted or tampered with:
- Try downloading again (network issue)
- Check GitHub releases page manually
- Report the issue if it persists
For system-wide installation:
# Use sudo
sudo ./install.sh
# Or install to user directory
./install.sh --prefix ~/.local/binFor user-local installation:
# Ensure directory exists and is writable
mkdir -p ~/.local/bin
chmod 755 ~/.local/bin
./install.sh --prefix ~/.local/bin# System-wide
ls -l /usr/local/bin/langstar
# User-local
ls -l ~/.local/bin/langstarecho $PATHIf the installation directory isn't in PATH, add it (see PATH Configuration).
# Reload shell configuration
source ~/.bashrc # or source ~/.zshrc for zsh
# Or open a new terminalIf you see "Unsupported operating system" or "Unsupported architecture":
- Check if your platform is listed in Supported Platforms
- Try building from source (see Building from Source)
- Open an issue on GitHub requesting support for your platform
# Install Rust via rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env# Update Rust to latest stable
rustup update stable
# Clean and rebuild
cargo clean
cargo build --release# Run tests to diagnose
cargo test
# Check for required environment variables
export LANGSMITH_API_KEY="your-test-api-key"
cargo testIf you encounter issues not covered here:
- Check existing issues: https://github.com/codekiln/langstar/issues
- Open a new issue: https://github.com/codekiln/langstar/issues/new
- Provide details:
- Operating system and version
- Architecture (x86_64 or ARM64)
- Installation method used
- Full error messages
- Output of
langstar --version(if installed)
After installation:
- Configure langstar: See Configuration Guide
- Get started: See Usage Examples
- Read documentation: Check the README for full documentation
Built with ❤️ using Rust