CLI Installation Guide
Complete installation instructions for all platforms
NPM Installation
Global Installation (Recommended)
bash
# Install globally for system-wide access
npm install -g @lovelace-ai/cli
# Verify installation
lovelace --version
Project-Specific Installation
bash
# Install as dev dependency
npm install --save-dev @lovelace-ai/cli
# Run via npx
npx lovelace --version
# Or add to package.json scripts
{
"scripts": {
"lovelace": "lovelace"
}
}
Platform-Specific Installation
macOS
Homebrew (Coming Soon)
bash
# Will be available via Homebrew tap
brew install lovelace-ai/tap/lovelace
Direct npm (Current)
bash
npm install -g @lovelace-ai/cli
Linux
Ubuntu/Debian
bash
# Install Node.js if not present
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install CLI
npm install -g @lovelace-ai/cli
CentOS/RHEL/Fedora
bash
# Install Node.js
sudo dnf install npm nodejs
# Install CLI
npm install -g @lovelace-ai/cli
Arch Linux
bash
# Install Node.js
sudo pacman -S nodejs npm
# Install CLI
npm install -g @lovelace-ai/cli
Windows
PowerShell
powershell
# Install Node.js first from nodejs.org
# Then install CLI
npm install -g @lovelace-ai/cli
Windows Subsystem for Linux (WSL)
bash
# Use Linux installation instructions
npm install -g @lovelace-ai/cli
Container Installation
Docker
bash
# Run CLI in container
docker run --rm -it node:20 bash -c "npm install -g @lovelace-ai/cli && lovelace --help"
# For persistent usage, create alias
alias lovelace="docker run --rm -it -v $(pwd):/workspace -w /workspace node:20 bash -c 'npm install -g @lovelace-ai/cli > /dev/null 2>&1 && lovelace'"
Verification
Check Installation
bash
# Verify CLI is installed
lovelace --version
# Check available commands
lovelace --help
# Run system diagnostics
lovelace doctor
Test Basic Functionality
bash
# Test configuration
lovelace config show
# Test authentication (will prompt for setup)
lovelace auth status
Initial Setup
Interactive Setup
bash
# Run interactive setup wizard
lovelace setup
This will guide you through:
- Platform authentication
- AI provider configuration
- Default workspace selection
- Editor integration setup (optional)
Manual Setup
bash
# Check authentication status
lovelace auth status
# Sign in to platform
lovelace auth signin
# Configure default workspace
lovelace workspace list
lovelace workspace switch <workspace-name>
Updates
Update CLI
bash
# Update to latest version
npm update -g @lovelace-ai/cli
# Check for updates
npm outdated -g @lovelace-ai/cli
Reset Configuration
bash
# Reset all CLI configuration
lovelace reset
# Reset specific components
lovelace config reset
Troubleshooting
Common Installation Issues
Permission Errors (npm)
bash
# Fix npm permissions on macOS/Linux
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
# Or use npx instead of global install
npx @lovelace-ai/cli --version
Command Not Found
bash
# Check npm global bin path
npm config get prefix
# Add to PATH (add to ~/.bashrc or ~/.zshrc)
export PATH="$(npm config get prefix)/bin:$PATH"
Node.js Version Issues
bash
# Check Node.js version (requires 18+)
node --version
# Update Node.js if needed
npm install -g n
n latest
Verification Commands
bash
# Full system check
lovelace doctor
# Check configuration
lovelace config show
# Test connectivity
lovelace auth status
Uninstallation
Remove CLI
bash
# Uninstall global package
npm uninstall -g @lovelace-ai/cli
# Clean configuration (optional)
rm -rf ~/.lovelace
Next Steps: After installation, follow the Getting Started Guide for your first workspace setup.