Complete documentation of EVERY command-line interface option, flag, parameter, and workflow in Capcat.
Source: Application/cli.py, Application/capcat.py
These options work with ALL commands.
capcat --version
capcat -v
Displays: Capcat v2.0.0
capcat --verbose <command>
capcat -V <command>
Enable verbose output logging. Shows:
capcat --quiet <command>
capcat -q <command>
Suppress informational messages. Shows only:
capcat --config custom.yml <command>
capcat -C ~/.capcat/config.yml <command>
Specify custom configuration file path instead of default capcat.yml.
###
--log-file, -L FILE
capcat --log-file capcat.log <command>
capcat -L logs/debug-$(date +%Y%m%d).log <command>
Write detailed logs to specified file. File logging includes:
[YYYY-MM-DD HH:MM:SS] [LEVEL] [module.function:line] Message
Download and process a single article from any URL.
capcat single <url> [options]
url - Article URL to download (must be valid HTTP/HTTPS URL)capcat single URL --output /path/to/output
capcat single URL -o ../Capcats
Specify output directory for article.
capcat single URL --media
capcat single URL -M
Download ALL media types:
files/ subdirectory
capcat single URL --html
capcat single URL -H
Generate HTML version of article in addition to Markdown.
capcat single URL --update
capcat single URL -U
Update existing article if it already exists.
# Basic single article download
capcat single https://example.com/article
# Download with all media and HTML
capcat single https://bbc.com/news/article --media --html
# Update existing article verbosely
capcat single URL --update --verbose
# Custom output with logging
capcat single URL --output ~/Articles --log-file fetch.log
Fetch articles from one or more specific sources.
capcat fetch <sources> [options]
sources - Space- or comma-separated list of source IDs (both forms work)capcat fetch bbc guardian # space-separated
capcat fetch bbc,guardian # comma-separated (equivalent)
capcat fetch hn bbc guardian # three sources, space-separated
capcat list sources to see all available source IDs.
hn - Hacker Newslb - Lobstersiq - InfoQbbc - BBC Newsguardian - The Guardiannature - Nature Newsieee - IEEE Spectrummitnews - MIT Newsbbcsport - BBC Sportcapcat fetch hn --count 10
capcat fetch hn,bbc -c 50
Number of articles to fetch per source.
capcat fetch hn --output /path/to/output
capcat fetch hn -o ../News
Specify output directory for articles.
capcat fetch hn,bbc --media
capcat fetch nature -M
Download ALL media types (videos, audio, documents) in addition to images.
capcat fetch hn --html
capcat fetch hn,bbc -H
Generate HTML versions of all articles.
capcat fetch hn --update
capcat fetch hn -U
Update existing articles if they already exist.
# Fetch 10 articles from Hacker News
capcat fetch hn --count 10
# Fetch from multiple sources
capcat fetch hn,lb,iq --count 20
# Fetch with all features
capcat fetch bbc,guardian --count 15 --media --html --verbose
# Fetch to custom location with logging
capcat fetch nature --count 5 --output ~/Science --log-file science.log
Fetch articles from predefined source bundles (groups of related sources).
capcat bundle <bundle-name> [options]
bundle-name - Name of predefined bundlecapcat list bundles to see all available bundles.
tech - Technology news (ieee, mashable)techpro - Advanced tech news (hn, lb, iq)news - General news (bbc, guardian)science - Science news (nature, scientificamerican)ai - AI/ML news (mitnews, google-research)sports - Sports news (bbcsport)all - All available sourcescapcat bundle tech --count 10
capcat bundle news -c 50
Number of articles to fetch per source in bundle.
capcat bundle tech --output /path/to/output
capcat bundle tech -o ../News
Specify output directory.
fetch command
capcat bundle tech --media
capcat bundle science -M
Download ALL media types for all sources in bundle.
capcat bundle tech --html
capcat bundle news -H
Generate HTML for all articles from all sources.
capcat bundle --all
capcat bundle -A --count 10
Fetch from ALL available bundles in order: techpro, tech, news, science, ai.
capcat bundle tech --update
capcat bundle tech -U
Update existing articles in bundle.
# Fetch tech bundle
capcat bundle tech
# Fetch with custom count
capcat bundle news --count 20
# Fetch all bundles
capcat bundle --all --count 10
# Full-featured bundle fetch
capcat bundle science --count 15 --media --html --verbose
# All bundles with logging
capcat bundle --all --log-file bundles-$(date +%Y%m%d).log
Display available sources, bundles, or both.
capcat list [what]
what - What to list: sources, bundles, or all (default: all)capcat list sources
Available sources:
bbc BBC News
bbcsport BBC Sport
google-research The latest research from Google
guardian The Guardian
hn Hacker News
ieee IEEE Spectrum
iq InfoQ
lb Lobsters
mashable Mashable
medium Medium.com
mitnews MIT News AI
nature Nature
scientificamerican Scientific American
substack Substack.com
twitter X.com
vimeo Vimeo
youtube YouTube
capcat list bundles
--- Available Bundles ---
tech - Technology News
Sources: ieee, mashable
techpro - Advanced Technology
Sources: hn, lb, iq
news - General News
Sources: bbc, guardian
science - Science News
Sources: nature, scientificamerican
ai - AI & Machine Learning
Sources: mitnews
sports - Sports News
Sources: bbcsport
Total: 6 bundles
capcat list all
capcat list
Displays both sources and bundles sections.
View or modify Capcat configuration.
capcat config [options]
capcat config --show
capcat config -s
Display current configuration from capcat.yml.
capcat config --set max_workers=16
capcat config --set download_images=true
Set configuration value.
max_workers - Number of parallel workers (1-32)download_images - Enable/disable image downloads (true/false)download_videos - Enable/disable video downloads (true/false)connect_timeout - Network connection timeout (seconds)read_timeout - Network read timeout (seconds)user_agent - Custom user agent string# Show current config
capcat config --show
# Increase workers
capcat config --set max_workers=16
# Set custom user agent
capcat config --set user_agent="MyBot/1.0"
Interactively add a new RSS-based source.
capcat add-source --url <rss-feed-url>
--url - URL of RSS feed to add<source-id>.yaml# Add new RSS source
capcat add-source --url https://techcrunch.com/feed/
# Interactive flow:
# 1. Inspecting RSS feed...
# [OK] Feed 'TechCrunch' found.
#
# 2. Configure New Source
# Source ID: techcrunch
# Category: tech
# Add to bundle? Yes
# Bundle: tech
# [OK] Added 'techcrunch' to bundle 'tech'.
#
# 3. Running Test Fetch
# Test fetch? Yes
# [OK] Source added and verified successfully!
Interactively remove one or more sources with safety features.
capcat remove-source [options]
capcat remove-source
Launches interactive removal with checkbox selection:
capcat remove-source --dry-run
capcat remove-source -n
Preview changes without actually removing anything.
capcat remove-source --batch sources.txt
capcat remove-source -b remove-list.txt
Remove sources listed in file (one source ID per line).
techcrunch
oldnewssite
discontinued-source
capcat remove-source --undo
capcat remove-source --undo latest
capcat remove-source --undo backup_20251025_143022
Restore sources from backup.
latest - Restore most recent backupBACKUP_ID - Restore specific backup by IDbackup_YYYYMMDD_HHMMSS
capcat remove-source --no-backup
capcat remove-source --no-backup --force
Skip creating backup before removal.
capcat remove-source --no-analytics
Skip displaying usage analytics for sources.
capcat remove-source --force
capcat remove-source -f --batch sources.txt
Skip all confirmation prompts.
# Interactive removal
capcat remove-source
# Preview without removing
capcat remove-source --dry-run
# Batch removal
capcat remove-source --batch old-sources.txt
# Forced batch removal without backup
capcat remove-source --force --no-backup --batch remove.txt
# Restore last removal
capcat remove-source --undo
# Restore specific backup
capcat remove-source --undo backup_20251025_120000
Launch interactive wizard to create comprehensive YAML source configuration.
capcat generate-config [options]
capcat generate-config --output custom.yaml
capcat generate-config -o /path/to/config.yaml
Specify output file path.
# Generated configuration
display_name: "Example Source"
base_url: "https://example.com/"
category: "tech"
timeout: 10.0
rate_limit: 1.0
rss_config:
feed_url: "https://example.com/feed.xml"
use_rss_content: true
article_selectors:
- ".headline a"
- ".article-title a"
content_selectors:
- ".article-content"
- ".post-body"
image_processing:
selectors:
- "img"
- ".content img"
url_patterns:
- "example.com/"
skip_selectors:
- ".sidebar img"
skip_patterns:
- "/about"
- "/contact"
- "?utm_"
# Interactive generation
capcat generate-config
# Save to custom location
capcat generate-config --output ~/configs/newsource.yaml
# Review generated config
cat Config/sources/active/config_driven/configs/newsource.yaml
# Test source
capcat fetch newsource --count 5
# Add to bundle (manual edit)
vim Config/sources/active/bundles/bundles.yml
Launch interactive menu interface for all Capcat operations.
capcat catch
$ capcat catch
# User selects: "Catch articles from a bundle of sources"
# System shows bundle list, user selects "tech"
# System asks: "Generate HTML for web browsing?"
# User selects: "Yes"
--------------------
SUMMARY
Action: bundle
Bundle: tech
Generate HTML: true
--------------------
Executing command...
[Article processing begins]
# Morning routine: fetch all news
capcat bundle news --count 20 --html
# Evening: fetch tech updates
capcat bundle tech --count 10
# Collect science articles with all media
capcat bundle science --count 30 --media --log-file research.log
# Add specific article found during research
capcat single https://nature.com/article/12345 --media --html
# List current sources
capcat list sources
# Add new source
capcat add-source --url https://newssite.com/feed.xml
# Test new source
capcat fetch newsource --count 3
# Remove old sources
capcat remove-source --batch old-sources.txt
#!/bin/bash
# Daily collection script
LOG_FILE="logs/daily-$(date +%Y%m%d).log"
# Collect from all bundles
capcat bundle --all --count 20 --html --log-file "$LOG_FILE"
# Check if successful
if [ $? -eq 0 ]; then
echo "Collection successful" >> "$LOG_FILE"
else
echo "Collection failed" >> "$LOG_FILE"
exit 1
fi
All commands return standard exit codes:
0 - Success (all operations completed)1 - General error (command failed)2 - Invalid arguments (validation failed)130 - User interrupt (Ctrl+C pressed)capcat fetch hn --count 10
if [ $? -eq 0 ]; then
echo "Success"
else
echo "Failed"
exit 1
fi
Capcat respects these environment variables:
export CAPCAT_OUTPUT_DIR="/custom/path"
capcat fetch hn
Override default output directory for all commands.
export CAPCAT_DEFAULT_COUNT=50
capcat fetch hn # Uses 50 instead of 30
Override default article count.
export CAPCAT_CONFIG="~/.capcat/custom.yml"
capcat fetch hn
Override default configuration file location.
export CAPCAT_LOG_LEVEL=DEBUG
capcat fetch hn
Set logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL
export CAPCAT_MAX_WORKERS=16
capcat bundle all
Override parallel worker count.
Settings are applied in this order (highest to lowest priority):
--count 10)CAPCAT_DEFAULT_COUNT=10)capcat.yml: default_count: 10)# capcat.yml has: default_count: 20
# Environment: CAPCAT_DEFAULT_COUNT=40
# Command: --count 10
capcat fetch hn # Uses 10 (CLI wins)
$ capcat fetch hn
Error: Failed to connect to news.ycombinator.com
Network timeout after 10 seconds
$ capcat fetch nonexistent
Error: Unknown sources: nonexistent
Available: hn, lb, iq, bbc, guardian, ...
$ capcat single not-a-url
Error: Invalid URL format: not-a-url
Must start with http:// or https://
$ capcat fetch hn --output /root/articles
Error: Permission denied: /root/articles
Cannot create output directory
$ capcat bundle all --media
Warning: Low disk space (< 1GB available)
Consider using --no-media flag
# Maximum verbosity with file logging
capcat -V --log-file debug.log fetch hn --count 3
# Preview what would be removed
capcat remove-source --dry-run
# Test article processing
capcat single URL --verbose
# Check source availability
capcat list sources
# Show current config
capcat config --show
All CLI functionality implemented in:
Function reference:
create_parser() - Application/cli.py:501 - Parser creationparse_arguments() - Application/cli.py - Argument parsingvalidate_arguments() - Application/cli.py:756 - Validationprocess_sources() - Application/capcat.py:55 - Source processingadd_source() - Application/cli.py:200 - Add source commandremove_source() - Application/cli.py:339 - Remove source commandgenerate_config_command() - Application/cli.py:457 - Config generation