Text Intelligence Commands

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

Basic Analysis

dg read "Customer called about a billing issue."

Analyze a File

dg read --file document.txt

Piped Input

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

Available Features

Sentiment Analysis

dg read --file document.txt --sentiment

Output includes overall document sentiment and its score.

Topic Detection

dg read --file document.txt --topics

Returns detected topics with confidence scores.

Summarization

dg read --file document.txt --summarize

Generates a brief summary of the content.

Intent Recognition

dg read --file document.txt --intents

Detects user intents within the text.

Full Analysis

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

Output Format

dg -o json read --file document.txt # JSON
dg -o yaml read --file document.txt # YAML
dg -o table read --file document.txt # Formatted terminal table
dg -o csv read --file 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 --file feedback.txt --sentiment --topics