CLI Reference
This page documents the html2rss command-line interface (CLI).
For detailed documentation on the Ruby API, please refer to the official YARD documentation.
📚 View the Ruby API Docs on rubydoc.info
Commands
Section titled “Commands”The html2rss executable is the primary way to interact with the gem from your terminal.
Automatically discovers items from a page and prints the generated RSS feed to stdout.
# Use the default faraday strategyhtml2rss auto https://example.com/articles
# Force browserless for JavaScript-heavy pageshtml2rss auto https://example.com/app --strategy browserless
# Set custom request budgetshtml2rss auto https://example.com/app --strategy browserless --max-redirects 5 --max-requests 6
# Hint the item selector while keeping auto enhancementhtml2rss auto https://example.com/articles --items_selector ".post-card"Command: html2rss auto URL
Loads a YAML config, builds the feed, and prints the RSS XML to stdout.
# Single-feed confightml2rss feed single.yml
# Multi-feed config under the `feeds:` keyhtml2rss feed feeds.yml my-first-feed
# Override the request strategy at runtimehtml2rss feed single.yml --strategy browserless
# Override request budgets at runtimehtml2rss feed single.yml --max-redirects 5 --max-requests 6
# Pass dynamic parameters into %<param>s placeholdershtml2rss feed single.yml --params id:42 foo:barCommand: html2rss feed YAML_FILE [feed_name]
The CLI keeps strategy as a top-level override and writes runtime request limits into the generated config under request.
Schema
Section titled “Schema”Prints the exported JSON Schema for the current gem version.
# Pretty-printed JSON (default)html2rss schema
# Compact JSONhtml2rss schema --no-pretty
# Write the schema to a filehtml2rss schema --write tmp/html2rss-config.schema.jsonCommand: html2rss schema
Validate
Section titled “Validate”Validates a config with the runtime validator without generating a feed.
# Validate a single-feed filehtml2rss validate single.yml
# Validate one feed from a multi-feed filehtml2rss validate feeds.yml my-first-feedCommand: html2rss validate YAML_FILE [feed_name]
Displays the help message with available commands and options.
Command: html2rss help
Version
Section titled “Version”Displays the installed version of html2rss.
Command: html2rss --version