AI Web FeedsAI Web FeedsOpen web AI reader
  • Documentation

    CLI Usage

    Command-line interface for managing feeds

    Source: apps/web/content/docs/development/cli.mdx

    CLI Usage

    The ai-web-feeds CLI provides commands for enrichment, OPML generation, and statistics.

    Installation

    # From project root
    uv sync
    uv sync

    Quick Start

    # 1. Enrich feeds from feeds.yaml
    uv run ai-web-feeds enrich all
    
    # 2. Generate OPML files
    uv run ai-web-feeds opml all
    uv run ai-web-feeds opml categorized
    
    # 3. View statistics
    uv run ai-web-feeds stats show
    
    # 4. Generate filtered OPML
    uv run ai-web-feeds opml filtered data/nlp-feeds.opml --topic nlp --verified

    Commands

    enrich - Enrich Feed Data

    Enrich feeds with metadata, discover feed URLs, validate formats, and save to database.

    # Enrich all feeds
    uv run ai-web-feeds enrich all
    
    # Custom paths
    uv run ai-web-feeds enrich all \
      --input data/feeds.yaml \
      --output data/feeds.enriched.yaml \
      --schema data/feeds.enriched.schema.json \
      --database sqlite:///data/ai-web-feeds.db
    
    # Preview enrichment for one feed
    uv run ai-web-feeds enrich one <feed-id>

    What it does:

    • Discovers feed URLs from site URLs (if discover: true)
    • Detects feed format (RSS, Atom, JSONFeed)
    • Validates feed accessibility
    • Saves to:
      • feeds.enriched.yaml - Enriched YAML with all metadata
      • feeds.enriched.schema.json - JSON schema for validation
      • ai-web-feeds.db - SQLite database

    opml - Generate OPML Files

    Generate OPML files for feed readers.

    # All feeds (flat list)
    uv run ai-web-feeds opml all --output data/feeds.opml
    
    # Categorized by source type
    uv run ai-web-feeds opml categorized --output data/feeds.categorized.opml
    
    # Filtered OPML
    uv run ai-web-feeds opml filtered <output-file> [OPTIONS]

    Filter Options:

    • --topic, -t - Filter by topic (e.g., nlp, mlops)
    • --type, -T - Filter by source type (e.g., blog, podcast)
    • --tag, -g - Filter by tag (e.g., official, community)
    • --verified, -v - Only include verified feeds

    Examples:

    # NLP-related feeds only
    uv run ai-web-feeds opml filtered data/nlp.opml --topic nlp
    
    # Official blogs
    uv run ai-web-feeds opml filtered data/official-blogs.opml \
      --type blog \
      --tag official
    
    # Verified ML podcasts
    uv run ai-web-feeds opml filtered data/ml-podcasts.opml \
      --topic ml \
      --type podcast \
      --verified

    stats - View Statistics

    Display feed statistics and summaries.

    uv run ai-web-feeds stats show

    Example output:

    📊 Feed Statistics
    ══════════════════════════════════════════════════
    Total Feeds: 150
    Verified: 120 (80.0%)
    
     By Source Type:
      blog            :  45
      preprint        :  30
      podcast         :  20
      organization    :  15
      newsletter      :  12
      video           :  10
      aggregator      :   8
      journal         :   5
      docs            :   3
      forum           :   2
    ══════════════════════════════════════════════════

    export - Export Data

    Export feed data in current generated formats.

    uv run ai-web-feeds export json    # Export as JSON
    uv run ai-web-feeds export csv     # Export as CSV

    validate - Validate Data

    Validate feed data against schemas.

    uv run ai-web-feeds validate feeds # Validate feeds.yaml

    Workflows

    Initial Setup

    # 1. Create or edit data/feeds.yaml with your feed sources
    # 2. Enrich the feeds
    uv run ai-web-feeds enrich all
    
    # 3. Generate OPML files for your feed reader
    uv run ai-web-feeds opml all
    uv run ai-web-feeds opml categorized
    
    # 4. Check the results
    uv run ai-web-feeds stats show

    Adding New Feeds

    # 1. Add articles to data/feeds.yaml
    # 2. Re-enrich
    uv run ai-web-feeds enrich all
    
    # 3. Regenerate OPML files
    uv run ai-web-feeds opml all
    uv run ai-web-feeds opml categorized

    Creating Custom Feed Collections

    # Create topic-specific OPML files
    uv run ai-web-feeds opml filtered data/nlp.opml --topic nlp
    uv run ai-web-feeds opml filtered data/mlops.opml --topic mlops
    uv run ai-web-feeds opml filtered data/research.opml --topic research
    
    # Create type-specific collections
    uv run ai-web-feeds opml filtered data/podcasts.opml --type podcast
    uv run ai-web-feeds opml filtered data/blogs.opml --type blog
    
    # Verified feeds only
    uv run ai-web-feeds opml filtered data/verified.opml --verified
    
    # Combine filters for precise collections
    uv run ai-web-feeds opml filtered data/verified-nlp-blogs.opml \
      --topic nlp \
      --type blog \
      --verified

    Configuration

    Environment Variables

    # Database location
    export AIWF_DATABASE_URL=sqlite:///data/ai-web-feeds.db
    
    # Logging
    export AIWF_LOGGING__LEVEL=INFO
    export AIWF_LOGGING__FILE=True
    export AIWF_LOGGING__FILE_PATH=logs/aiwebfeeds.log

    Default File Locations

    • Input: data/feeds.yaml
    • Output: data/feeds.enriched.yaml
    • Schema: data/feeds.enriched.schema.json
    • Database: data/ai-web-feeds.db
    • OPML: data/*.opml

    Override with command options (--input, --output, --database, etc.)

    Help

    Get help for any command:

    # General help
    uv run ai-web-feeds --help
    
    # Command-specific help
    uv run ai-web-feeds enrich --help
    uv run ai-web-feeds opml --help
    uv run ai-web-feeds opml filtered --help
    CLI Usage | AI Web Feeds