Available Plugins
Relevant source files
The following files were used as context for generating this wiki page:
abx-dl leverages the ABX Plugin Library, a shared ecosystem with ArchiveBox, to provide a versatile set of downloading and scraping tools. These plugins allow the system to auto-detect and download content from URLs "by any means necessary," ranging from simple metadata extraction to complex headless browser snapshots and media archiving.
Plugins are treated as modular units containing configuration and hook scripts. They are discovered automatically from the installed abx-plugins package or a directory specified by the ABX_PLUGINS_DIR environment variable.
Sources: README.md:37-41, abx_dl/models.py:114-121
Plugin Architecture and Lifecycle
The plugin system is built on a lifecycle of events and hooks. Hooks are language-agnostic executable scripts that follow a specific naming convention to define their execution phase and behavior.
Hook Naming Convention
Hooks are identified by their filenames: on_{Event}__[{order}_]{description}[.finite][.daemon][.bg].{ext}.
- Event: The family of events the hook responds to (e.g.,
Install,BinaryRequest,CrawlSetup,Snapshot). - Order: An optional numerical prefix determining execution priority.
- Type:
.bgindicates a background process, while.daemonor.finitedescribes the execution lifecycle.
Sources: abx_dl/models.py:38-51, TODOs.md:14-25
Execution Phases
The system executes plugins in distinct phases:
- Install Phase: Reads
config.jsonforrequired_binariesand emitsBinaryRequestEvents. - BinaryRequest Hooks: Provider plugins (like
apt,brew,npm) resolve or install required binaries. - CrawlSetup Hooks: Launches crawl-scoped daemons (e.g., headless browsers) and configures shared runtime state.
- Snapshot Hooks: Executes per URL to extract content and emit
ArchiveResult,Snapshot, andTagrecords.
Sources: README.md:42-49, TODOs.md:7-13
Plugin Execution Flow
The following diagram illustrates the lifecycle from dependency resolution to final output.
The diagram shows how abx-dl handles lazy dependency installation before moving into setup and extraction.
Sources: README.md:42-49, abx_dl/cli.py:539-555, TODOs.md:7-13
Plugin Types and Categories
Plugins are categorized based on their primary function within the archiving pipeline.
Snapshot and Extraction Plugins
These plugins are responsible for saving specific types of content or metadata from a target URL.
| Plugin | Output Description | Mimetypes / Types |
|---|---|---|
ytdlp | Audio, video, thumbnails, subtitles, and JSON metadata. | Media, JSON |
wget | Mirrored HTML, JS, CSS, images, and WARC files. | text/html, etc. |
chrome | Headless browser management and rendered metadata. | System/Browser |
screenshot | Full-page rendered screenshots. | image/png |
pdf | Rendered pages saved as PDF documents. | application/pdf |
dom | Fully rendered DOM snapshots. | text/html |
title | The final page title as plain text. | text/plain |
readability | Extracted article content (text, HTML, metadata). | Article data |
singlefile | Self-contained HTML snapshots. | text/html |
git | Cloned repository source code and tracked files. | Source Code |
Sources: README.md:145-185, server/server.py:73-100
Discovery and Parser Plugins
These plugins identify further URLs to crawl or extract from structured data.
parse_html_urls: Emits discovered links from HTML.parse_rss_urls: Extracts entries from RSS/Atom feeds.parse_jsonl_urls: Extracts URLs from JSONL exports.parse_dom_outlinks: Identifies crawlable outlinks from a rendered DOM.
Sources: README.md:188-193
Binary Provider Plugins
These plugins handle the installation of external requirements.
env: Discovers binaries already present in the system PATH.npm: Installs dependencies via Node Package Manager.pip: Installs Python-based dependencies.brew: Installs packages via Homebrew (macOS/Linux).apt: Installs system packages on Debian-based systems.
Sources: TODOs.md:31-38, tests/test_plugins.py:40-47
Plugin Management and Configuration
Command Line Interface
The abx-dl CLI provides tools to inspect and manage the plugin ecosystem.
| Command | Purpose |
|---|---|
abx-dl plugins | Show info, status, and missing dependencies for all plugins. |
abx-dl plugins <name> | Show detailed metadata and hooks for a specific plugin. |
abx-dl install <name> | Pre-install dependencies for specific plugins. |
abx-dl --plugins=... <url> | Execute a download using only a subset of plugins. |
Sources: abx_dl/cli.py:533-540, skills/abx-dl/SKILL.md:43-52
Configuration Structure
Each plugin can define its own configuration properties in config.json. These are exposed as environment variables following the pattern {PLUGIN}_{PROPERTY}.
# Example of plugin config model from abx_dl/models.py
class PluginConfig(BaseModel):
title: str = ""
description: str = ""
output_mimetypes: list[str] = Field(default_factory=list)
properties: dict[str, dict[str, Any]] = Field(default_factory=dict)
required_binaries: list[RequiredBinary] = Field(default_factory=list)
required_plugins: list[str] = Field(default_factory=list)
Sources: abx_dl/models.py:84-91, README.md:65-80
Dependency Resolution Logic
When a plugin is selected, abx-dl resolves its dependency graph. This includes both required_plugins (other plugins needed for execution) and required_binaries (external tools like wget or chromium).
The diagram represents the relationship between a Plugin and its configuration and hook scripts.
Sources: abx_dl/models.py:94-111
Summary
The plugin system in abx-dl provides a flexible, language-agnostic framework for web archiving. By separating the lifecycle into installation, setup, and snapshot phases, and employing provider plugins for binary management, abx-dl ensures that complex extraction tools can be deployed with minimal manual configuration. The system's ability to automatically resolve dependencies and manage background processes makes it a robust solution for diverse downloading requirements.
Sources: README.md:37-49, TODOs.md:1-13