Skip to content

OpenPets Installation Guide

Quick Install

Install OpenPets with a single command:

bash
curl -fsSL https://pets.raggle.co/install | bash

Or use the direct GitHub URL:

bash
curl -fsSL https://raw.githubusercontent.com/raggle-ai/raggle-repo/main/core/openpets/install.sh | bash

Or download and inspect before running:

bash
curl -fsSL https://pets.raggle.co/install -o install.sh
chmod +x install.sh
./install.sh

What the Installer Does

The install script will:

  1. ✅ Check for required dependencies (Node.js, npm)
  2. 📦 Download the latest openpets package from npm
  3. 📥 Install to ~/.openpets directory
  4. 🛠️ Set up pets and pets-mcp CLI commands
  5. 🔧 Add to your shell PATH automatically
  6. ✅ Verify the installation

Installation Options

Install Latest Version

bash
curl -fsSL https://raw.githubusercontent.com/raggle-ai/raggle-repo/main/core/openpets/install.sh | bash

Install Specific Version

bash
VERSION=1.0.1 curl -fsSL https://pets.raggle.co/install | bash

Manual Installation

If you prefer to install via npm/pnpm directly:

bash
npm install -g openpets

Or with pnpm:

bash
pnpm add -g openpets

Post-Installation

After installation, you can use these commands:

bash
pets --help               # Show available commands
pets list                 # List installed pets
pets validate ./pets/my-pet  # Validate a specific pet directory
pets-mcp                  # Start MCP server

Installation Location

OpenPets is installed to:

  • Binaries: ~/.openpets/bin/
  • Libraries: ~/.openpets/lib/node_modules/

The installer automatically adds ~/.openpets/bin to your PATH.

Requirements

  • Node.js 18+ (recommended: Node.js 20+)
  • npm (comes with Node.js)
  • Bash shell (for install script)
  • curl (for downloading the installer)

Supported Platforms

  • ✅ macOS (Intel & Apple Silicon)
  • ✅ Linux (x64 & ARM64)
  • ✅ Windows (via WSL or Git Bash)

Troubleshooting

Node.js Not Found

Install Node.js from https://nodejs.org/

Permission Denied

If you see permission errors during installation:

bash
# Ensure install directory is writable
mkdir -p ~/.openpets

Package Not Found

If the package hasn't been published to npm yet:

bash
# Install from the repository directly
cd /path/to/raggle-repo/core/openpets
pnpm install
pnpm run build
npm link

Command Not Found After Install

If pets command isn't found after installation:

  1. Restart your shell or source your config:

    bash
    # For zsh
    source ~/.zshrc
    
    # For bash
    source ~/.bashrc
    
    # For fish
    source ~/.config/fish/config.fish
  2. Check PATH:

    bash
    echo $PATH | grep -o ~/.openpets/bin
  3. Manually add to PATH if needed:

    bash
    export PATH="$HOME/.openpets/bin:$PATH"

Reinstalling

To reinstall or upgrade:

bash
curl -fsSL https://pets.raggle.co/install | bash

Uninstalling

To completely remove OpenPets:

bash
# Remove installation directory
rm -rf ~/.openpets

# Remove PATH entry from your shell config
# Edit ~/.zshrc, ~/.bashrc, or ~/.config/fish/config.fish
# and remove the line containing: ~/.openpets/bin

For Developers

Local Development

If you're developing OpenPets locally:

bash
# Clone the repository
git clone https://github.com/raggle-ai/pets.git
cd raggle-repo/core/openpets

# Install dependencies
pnpm install

# Build all packages
pnpm run build

# Link for local testing
cd src/core
npm link

Publishing Updates

When the package is published to npm, users can upgrade with:

bash
VERSION=x.x.x curl -fsSL https://pets.raggle.co/install | bash

Design Philosophy

The installer is designed to be:

  • Simple: Single command installation
  • Safe: Installs to user directory (no sudo required)
  • Idempotent: Safe to run multiple times
  • Fast: Minimal dependencies and smart caching
  • Reliable: Checks dependencies before proceeding
  • Informative: Clear feedback at each step
  • Familiar: Similar to popular tools like OpenCode