Skip to main content

📊 Overview

The cl insight command displays AI-generated insights from your ingested customer data. These insights are automatically created by ClosedLoop AI’s analysis engine, providing structured, actionable intelligence from raw customer input.

🚀 Basic Usage

List All Insights

# Show all AI-generated insights
cl insight

# With pagination
cl insight --page 2 --limit 5

# JSON output for scripting
cl insight --json

View Specific Insight

# Show detailed insight information
cl insight 2ea8f556-052b-4f5c-bf86-833780b3d00d

# JSON output
cl insight 2ea8f556-052b-4f5c-bf86-833780b3d00d --json

📋 Parameters

id
string
Insight ID for detailed view. If not provided, shows list of all insights.
--page
number
Page number for listing insights (default: 1).
--limit
number
Items per page for listing (max 100, default: 20).
--json
flag
Output results in JSON format for scripting and automation.

💡 Examples

View All Insights

cl insight
Output:
┌─────────────────────────────────────┬─────────────────────────────┬─────────────┬─────────────┐
│ ID                                  │ Title                      │ Severity    │ Status      │
├─────────────────────────────────────┼─────────────────────────────┼─────────────┼─────────────┤
│ 2ea8f556-052b-4f5c-bf86-833780b3d00d │ Mobile App Performance     │ high        │ open        │
│ 74e3dd87-878f-41cf-8e5a-87527bbf7770 │ Dashboard UX Issues        │ medium      │ open        │
│ 1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6 │ Pricing Model Feedback     │ low         │ closed      │
└─────────────────────────────────────┴─────────────────────────────┴─────────────┴─────────────┘

View Specific Insight

cl insight 2ea8f556-052b-4f5c-bf86-833780b3d00d
Output:
🎯 Insight Details:
──────────────────────────────────────────────────
ID: 2ea8f556-052b-4f5c-bf86-833780b3d00d
Title: Mobile App Performance Issues
Clarity: Detailed
Deal Blocker: No
Pain Point: Users experience frequent crashes when uploading files, affecting core functionality and user retention
Workaround: Users currently use web version for file uploads
Competitor Gap: Competitors have more stable mobile apps
Willingness to Pay: High - users mentioned paying extra for stability
Use Case: File upload functionality on mobile devices
Feature Area: Mobile App
Source URL: https://support.company.com/ticket/456
Created: 2024-01-15, 8:30:00 PM

📊 Output Formats

Table Format (Default)

┌─────────────────────────────────────┬─────────────────────────────┬─────────────┬─────────────┬─────────────┐
│ ID                                  │ Title                      │ Severity    │ Status      │ Created     │
├─────────────────────────────────────┼─────────────────────────────┼─────────────┼─────────────┼─────────────┤
│ 2ea8f556-052b-4f5c-bf86-833780b3d00d │ Mobile App Performance     │ high        │ open        │ 2024-01-15  │
│ 74e3dd87-878f-41cf-8e5a-87527bbf7770 │ Dashboard UX Issues        │ medium      │ open        │ 2024-01-15  │
└─────────────────────────────────────┴─────────────────────────────┴─────────────┴─────────────┴─────────────┘

JSON Format

{
  "success": true,
  "data": [
    {
      "id": "2ea8f556-052b-4f5c-bf86-833780b3d00d",
      "title": "Mobile App Performance Issues",
      "clarity": "Detailed",
      "is_deal_blocker": false,
      "pain_point": "Users experience frequent crashes when uploading files, affecting core functionality and user retention",
      "workaround": "Users currently use web version for file uploads",
      "competitor_gap": "Competitors have more stable mobile apps",
      "willingness_to_pay": "High - users mentioned paying extra for stability",
      "use_case": "File upload functionality on mobile devices",
      "feature_area": "Mobile App",
      "source_url": "https://support.company.com/ticket/456",
      "created_at": "2024-01-15, 8:30:00 PM"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "pages": 1
  }
}

🔍 Advanced Usage

Filter by Clarity

# Get only detailed insights
cl insight --json | jq '.data[] | select(.clarity == "Detailed")'

# Get high-clarity insights
cl insight --json | jq '.data[] | select(.clarity | contains("Detailed"))'

Filter by Deal Blockers

# Get only deal blocker insights
cl insight --json | jq '.data[] | select(.is_deal_blocker == true)'

# Get non-deal blocker insights
cl insight --json | jq '.data[] | select(.is_deal_blocker == false)'

Business Impact Analysis

# Get insights with high business impact
cl insight --json | jq '.data[] | select(.is_deal_blocker == true)'

# Get insights with willingness to pay
cl insight --json | jq '.data[] | select(.willingness_to_pay | contains("High"))'

Competitive Analysis

# Get insights mentioning competitors
cl insight --json | jq '.data[] | select(.competitor_gap != null)'

# Get insights with competitive gaps
cl insight --json | jq '.data[] | select(.competitor_gap | length > 0)'

📈 Analytics and Reporting

Daily Insights Summary

#!/bin/bash
# daily-insights.sh

TODAY=$(date +%Y-%m-%d)

echo "=== Daily Insights Report - $TODAY ==="
echo

# Get today's insights
cl insight --json | jq --arg today "$TODAY" '
  .data[] | 
  select(.created_at | startswith($today)) |
  {
    title: .title,
    severity: .severity,
    status: .status,
    pain_point: .pain_point
  }
' | jq -s 'sort_by(.severity) | reverse'

echo
echo "=== Summary ==="
cl insight --json | jq --arg today "$TODAY" '
  .data | 
  map(select(.created_at | startswith($today))) |
  {
    total: length,
    by_severity: group_by(.severity) | map({severity: .[0].severity, count: length}),
    by_status: group_by(.status) | map({status: .[0].status, count: length})
  }
'

Customer Impact Analysis

#!/bin/bash
# customer-impact.sh

CUSTOMER_ID="$1"

if [ -z "$CUSTOMER_ID" ]; then
  echo "Usage: $0 <customer-id>"
  exit 1
fi

echo "=== Customer Impact Analysis: $CUSTOMER_ID ==="
echo

# Get insights for specific customer
cl insight --json | jq --arg customer "$CUSTOMER_ID" '
  .data[] | 
  select(.customer_id == $customer) |
  {
    title: .title,
    severity: .severity,
    pain_point: .pain_point,
    business_impact: .is_deal_blocker,
    created: .created_at
  }
' | jq -s 'sort_by(.severity) | reverse'

Feature Priority Matrix

#!/bin/bash
# feature-priority.sh

echo "=== Feature Priority Matrix ==="
echo

# Create priority matrix based on severity and business impact
cl insight --json | jq '
  .data[] | 
  select(.status == "open") |
  {
    title: .title,
    severity: .severity,
    business_impact: .is_deal_blocker,
    priority_score: (
      if .severity == "critical" then 4
      elif .severity == "high" then 3
      elif .severity == "medium" then 2
      else 1
      end
    ) + (
      if .is_deal_blocker then 2 else 0 end
    )
  }
' | jq -s 'sort_by(.priority_score) | reverse'