Text Intelligence Commands

Analyze text for sentiment, topics, summaries, and intents using the dg CLI.

Basic Analysis

$dg read document.txt

Analyze a URL

$dg read https://example.com/article.txt

Piped Input

$cat transcript.txt | dg read
$echo "Your text here" | dg read

Available Features

Sentiment Analysis

$dg read document.txt --sentiment

Output includes sentiment per sentence and overall document sentiment.

Topic Detection

$dg read document.txt --topics

Returns detected topics with confidence scores.

Summarization

$dg read document.txt --summarize

Generates a brief summary of the content.

Intent Recognition

$dg read document.txt --intents

Detects user intents within the text.

Full Analysis

$dg read document.txt --sentiment --topics --summarize --intents

Output Format

$dg -o json read document.txt # JSON
$dg -o yaml read document.txt # YAML
$dg -o table read document.txt # ASCII table
$dg -o csv read document.txt # CSV

-o belongs to dg itself, so it goes before the subcommand name. Without it, dg read prints human-readable output.

Use Cases

Summarize Transcripts

$dg listen meeting.mp3 | dg read --summarize

Analyze Customer Feedback

$dg read feedback.txt --sentiment --topics