Skip to content

CLI Installation

This guide covers installing and setting up the Ragdoll command-line interface.

Prerequisites

  • Ruby 3.2.0 or higher
  • PostgreSQL with pgvector extension
  • Access to a running Ragdoll system

Installation

Install from RubyGems

gem install ragdoll-cli

Install from Source

git clone https://github.com/MadBomber/ragdoll-cli.git
cd ragdoll-cli
bundle install
rake install

Verify Installation

ragdoll --version
ragdoll health

Configuration

The CLI requires configuration to connect to your Ragdoll system:

Environment Variables

export RAGDOLL_DATABASE_URL="postgresql://user:pass@localhost/ragdoll"
export RAGDOLL_LLM_PROVIDER="openai"
export RAGDOLL_API_KEY="your-api-key"

Configuration File

Create ~/.ragdoll/config.yml:

database:
  url: "postgresql://user:pass@localhost/ragdoll"

llm:
  provider: "openai"
  api_key: "your-api-key"
  model: "gpt-4"

logging:
  level: "info"
  file: "~/.ragdoll/logs/ragdoll.log"

Using ragdoll config

# Set database URL
ragdoll config set database.url "postgresql://user:pass@localhost/ragdoll"

# Set LLM provider
ragdoll config set llm.provider "openai"
ragdoll config set llm.api_key "your-api-key"

# View current configuration
ragdoll config list

Troubleshooting

Connection Issues

# Test database connectivity
ragdoll health --database

# Test LLM provider connectivity  
ragdoll health --llm

# Verbose output for debugging
ragdoll health --verbose

Permission Issues

# Ensure CLI is in PATH
which ragdoll

# Check gem installation
gem list ragdoll-cli

Configuration Problems

# Show configuration file location
ragdoll config path

# Validate configuration
ragdoll config validate

# Reset to defaults
ragdoll config reset

Next Steps