A powerful CLI tool to interact with DuckDuckGo's AI
Advanced context integration, multi-models and enhanced productivity
Chat Features | Context Management | Tools & Export |
---|---|---|
🔍 Web search integration | 📋 Clipboard support | |
🌈 Smart formatting | 📂 File content import | 💻 Code block extraction |
🎨 Syntax highlighting | 🌐 URL content scraping | 📜 History viewer |
🤖 5 AI models | 🧹 Context clearing | ⚙️ Configurable settings |
Model | Performance | Best For | Features |
---|---|---|---|
GPT-4o mini | Fast | Quick answers & basic tasks | • Default model • General-purpose |
Claude 3 Haiku | Balanced | Technical discussions | • Good context handling • Structured responses |
Llama 3.3 | Code-optimized | Programming tasks | • Documentation analysis • Code generation |
Mixtral 8x7B | Knowledge-focused | Complex topics | • Detailed explanations • Deep analysis |
o3-mini | Fastest | Simple queries | • Lightweight • Quick responses |
Windows (PowerShell)
$exe="duckduckgo-chat-cli_windows_amd64.exe"; Invoke-WebRequest -Uri ((Invoke-RestMethod "https://api.github.com/repos/benoitpetit/duckduckGO-chat-cli/releases/latest").assets | Where-Object name -like "*windows_amd64.exe").browser_download_url -OutFile $exe; Start-Process -Wait -NoNewWindow -FilePath ".\$exe"
Linux (curl)
curl -LO $(curl -s https://api.github.com/repos/benoitpetit/duckduckGO-chat-cli/releases/latest | grep -oP 'https.*v[0-9]+\.[0-9]+\.[0-9]+_linux_amd64' | head -1) && chmod +x duckduckgo-chat-cli_v*_linux_amd64 && ./duckduckgo-chat-cli_v*_linux_amd64
Prerequisites:
- Go 1.21+ (
go version
) - Chrome/Chromium 115+ (
chromium-browser --version
)
git clone https://github.com/benoitpetit/duckduckGO-chat-cli
cd duckduckGO-chat-cli
./scripts/build.sh
Example 1: Code Analysis
./duckduckgo-chat-cli_linux_amd64
Accept terms? [yes/no] yes
Type /help to show available commands
You: /search Go concurrency patterns
[+] Search results added
You: /file main.go
[+] File content processed
File analyzed (2.3KB)
You: How can I improve this implementation?
GPT-4 Mini: Analyzing your code...
Example 2: Market Analysis
You: /url https://coinmarketcap.com/currencies/xrp/
[+] URL content processed
Data extracted (42KB)
You: /search xrp news
[+] Search results added (10 entries)
You: Can you provide a market analysis report for XRP based on current data and news?
GPT-4 Mini: Analyzing market data and recent news for XRP...
• Current price trends
• Recent developments
• Market sentiment analysis
• Key news impact
Command | Example | Description |
---|---|---|
/search <query> |
/search Go tutorials |
Add search results to context |
/file <path> |
/file src/main.go |
Import file content |
/url <link> |
/url github.com/golang |
Add webpage content |
/model |
/model or /model 2 |
Change AI model (interactive) |
/clear |
/clear |
Reset conversation |
/export |
/export |
Export content (interactive) |
/copy |
/copy |
Copy to clipboard (interactive) |
/history |
/history |
Show chat history |
/config |
/config |
Configure settings |
/help |
/help |
Show available commands |
/exit |
/exit |
Quit application |
Option | Description | Default | Range |
---|---|---|---|
DefaultModel |
Starting AI model | gpt-4o-mini | 5 models available |
ExportDir |
Export directory | ~/Documents/duckchat | Any valid path |
ShowMenu |
Display commands menu | true | true/false |
SearchSettings |
Access search configuration | N/A | See below |
Option | Description | Default | Range |
---|---|---|---|
MaxResults |
Results per search | 10 | 1-10 |
IncludeSnippet |
Show result descriptions | true | true/false |
MaxRetries |
Connection retry attempts | 3 | 1-5 |
RetryDelay |
Seconds between retries | 1 | 1-10 |
Use /config
to modify these settings interactively through the CLI.
- Configuration paths:
- Windows:
C:\Users\<username>\AppData\Roaming\duckduckgo-chat-cli\config.json
- Linux/macOS:
~/.config/duckduckgo-chat-cli/config.json
- Windows:
- Export paths:
- Windows:
C:\Users\<username>\Documents\duckchat\
- Linux/macOS:
~/Documents/duckchat/
- Windows:
- Full conversation (
/export
→ 1) - Last AI response (
/export
→ 2) - Code blocks (
/export
→ 3) - Search results (
/export
→ 4)
/copy
→ 1: Copy last Q&A exchange/copy
→ 2: Copy largest code block
- File Size: Recommended max 5MB per file
- URL Content: Max 100KB of extracted text
- Search Results: Limited to 10 results per query
- Network: Requires stable internet connection
- Rate Limiting: Automatic retry on 429 errors
- Token Refresh: Auto-refresh on expiration
---
date: 2024-03-15 14:30:00
model: gpt-4o-mini
context_size: 5
---
# DuckDuckGo AI Chat Export
## Search Context (14:30)
...
- Chrome/Chromium 115.0.5790.110 or higher
- Go 1.21+
- 500MB disk space
Issue: Web extraction failure Solution:
# Check Chrome version
chromium-browser --version # Should show ≥ 115.0.5790.110
apt install chromium OR apt install chromium-browser
Issue: VQD Token expired
Solution:
user : /clear # Automatically regenerates token
If the issue persists:
- Wait a few minutes and try again
- Change your IP address using a VPN.
- It appears to work with Cloudflare WARP
- Data collection: No personal data stored
- Caution: AI outputs may contain errors - always verify critical facts
This project is not affiliated with DuckDuckGo - use at your own risk
Made with ♥ for the community