mirror of
https://github.com/harivansh-afk/ralph-cli.git
synced 2026-04-15 04:03:30 +00:00
39 lines
914 B
Bash
Executable file
39 lines
914 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
# Ralph CLI Installer
|
|
|
|
INSTALL_DIR="$HOME/.local/bin"
|
|
REPO_URL="https://raw.githubusercontent.com/rathi/ralph-cli/main/ralph"
|
|
|
|
echo "Installing Ralph CLI..."
|
|
|
|
# Create install directory if needed
|
|
mkdir -p "$INSTALL_DIR"
|
|
|
|
# Download or copy ralph
|
|
if [ -f "$(dirname "$0")/ralph" ]; then
|
|
# Local install
|
|
cp "$(dirname "$0")/ralph" "$INSTALL_DIR/ralph"
|
|
else
|
|
# Remote install
|
|
curl -fsSL "$REPO_URL" -o "$INSTALL_DIR/ralph"
|
|
fi
|
|
|
|
chmod +x "$INSTALL_DIR/ralph"
|
|
|
|
# Check if in PATH
|
|
if [[ ":$PATH:" != *":$INSTALL_DIR:"* ]]; then
|
|
echo ""
|
|
echo "Add this to your shell profile (.bashrc, .zshrc, etc.):"
|
|
echo ""
|
|
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
|
|
echo ""
|
|
fi
|
|
|
|
echo "Ralph installed to $INSTALL_DIR/ralph"
|
|
echo ""
|
|
echo "Usage:"
|
|
echo " ralph init # Initialize in a repo"
|
|
echo " ralph run 10 # Run 10 iterations"
|
|
echo " ralph --help # See all options"
|