Skip to main content

🚀 Quick Installation

npm install -g @closedloop-ai/cli

Verify Installation

cl --version
# Output: 0.2.3
Node.js Required: Make sure you have Node.js 16+ installed. Check with node --version

🔑 Get Your API Key

  1. Sign up for free at https://app.closedloop.sh
  2. Generate your API key from your dashboard
  3. Configure the CLI:
cl config set --api-key your-api-key-here

Free Tier Includes

  • 100,000 credits every month
  • Unlimited feedback ingestion
  • AI-powered analysis
  • All CLI features

⚙️ Configuration

Set Your Product Website (Important!)

Configure your product’s website URL to help ClosedLoop understand your product context:
cl team website "https://yourproduct.com"
Why this matters: ClosedLoop AI uses your product URL to learn about your product features, competitors, pricing, and positioning. This enables more accurate feedback attribution and product-specific insights.

Check Configuration

cl config
# Output:
# ⚙️  Configuration:
# ────────────────────────────────────────
# API Key: ✓ Configured
# Config File: /Users/username/.closedloop/config.json

🎯 First Steps

1. Ingest Your First Feedback

cl ingest "The new dashboard is confusing and hard to navigate"

2. Wait for AI Analysis

cl ingest "Customer complaint about performance" --wait

3. View AI-Generated Insights

cl insight

4. Get Detailed Analysis

cl insight <insight-id>

🔧 Advanced Setup

Environment Variables (For CI/CD)

Instead of using the config file, you can set your API key as an environment variable:
export CLOSEDLOOP_API_KEY="your-api-key-here"
When to use environment variables:
  • CI/CD pipelines
  • Docker containers
  • Server scripts
  • Multiple users on same machine

Local Installation (Development)

# Install locally
npm install @closedloop-ai/cli

# Use with npx
npx cl --help

🛠️ Troubleshooting

CLI Not Found

# Check if installed globally
npm list -g @closedloop-ai/cli

# Reinstall if needed
npm install -g @closedloop-ai/cli

Permission Denied

# Fix npm permissions (macOS/Linux)
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

# Or use a Node version manager like nvm

API Key Not Working

# Check configuration
cl config

# Reset API key
cl config set --api-key your-new-key-here

📚 Next Steps

Ready to Get Started?

Explore all CLI commands and start analyzing customer feedback