Quick Start & Usage
Relevant source files
The following files were used as context for generating this wiki page:
abx-dl is an all-in-one CLI tool designed to download and extract content from URLs using the ArchiveBox plugin ecosystem. It automates the process of selecting appropriate tools (like wget, yt-dlp, or headless browsers) to capture web content including metadata, media, and rendered snapshots.
Sources: README.md:1-11, pyproject.toml:5-7
Installation
abx-dl can be installed via standard Python package managers or run as a standalone CLI without global installation.
| Method | Command | Description |
|---|---|---|
| pip | pip install abx-dl | Standard installation to Python environment. |
| uvx (Recommended) | uvx abx-dl 'URL' | Runs the published CLI without permanent installation. |
| Development | uv sync --extra dev | Sets up a local development environment. |
Sources: README.md:120-129, CLAUDE.md:10-15
CLI Usage
The primary entry point is the abx-dl command. By default, it attempts to archive the provided URL using all enabled plugins.
Basic Commands
# Sourced from README.md:132-155 and abx_dl/cli.py:535-545
abx-dl 'https://example.com' # Standard download
abx-dl --plugins=wget,screenshot 'https://example.com' # Restrict to specific plugins
abx-dl --output=./my_archive 'https://example.com' # Set output directory
abx-dl plugins # List available plugins and status
abx-dl install wget ytdlp # Pre-install external binaries
Execution Phases
When a download is initiated, the tool progresses through specific phases managed by the orchestrator:
The logic involves checking required_binaries in plugin configurations, emitting BinaryRequestEvents, and executing hooks to resolve dependencies before extraction starts.
Sources: README.md:46-55, TODOs.md:14-25, abx_dl/cli.py:588-605
Configuration
Configuration is managed through environment variables and persistent config files.
- User Config:
~/.config/abx/config.env(User-set values). - Derived Cache:
~/.config/abx/derived.env(Runtime-derived values like resolved binary paths).
Configuration Table
| Variable | Default | Description |
|---|---|---|
TIMEOUT | 60 | Default timeout for all operations. |
USER_AGENT | - | Custom User-Agent string for requests. |
LIB_DIR | ~/.config/abx/lib/ | Location for auto-installed binaries. |
{PLUGIN}_ENABLED | True | Enable or disable a specific plugin. |
{PLUGIN}_BINARY | - | Explicit path to a required binary. |
Sources: README.md:65-90, abx_dl/cli.py:680-705
Web Download Server
abx-dl includes a Flask-based web server for remote URL submission and status monitoring.
# Start the server
uv run server/server.py --host 0.0.0.0 --port 8484
Sources: server/server.py:27-35
REST API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/download | POST | Submit URL. JSON Body: {"url": "...", "plugins": [...]} |
/api/sessions | GET | List all active session IDs and their status. |
/api/session/<id> | GET | Get detailed status, progress, and file list for a session. |
/download/<id>/zip | GET | Download all session results as a ZIP file. |
Sources: server/server.py:325-395, server/templates/index.html:245-280
Web Server Workflow
The server stores session data in a configurable data directory (defaults to /tmp/abx-dl-sessions) and cleans up expired sessions after 24 hours.
Sources: server/server.py:100-155, server/server.py:225-235
Output Structure
Each run produces a manifest and organized subdirectories.
./
├── index.jsonl # Master manifest (ArchiveBox compatible)
├── title/
│ └── title.txt # Extracted page title
├── screenshot/
│ └── screenshot.png # Rendered image
├── wget/
│ └── example.com/ # Mirrored static files
└── ...
Sources: README.md:175-195, skills/abx-dl/SKILL.md:45-55
Summary
abx-dl serves as a lightweight, flexible interface for the ArchiveBox plugin ecosystem. It handles complex dependency management and multi-tool execution through a unified CLI and API, providing structured JSONL output and organized file storage for digital preservation and web scraping tasks.
Sources: README.md:1-15, skills/abx-dl/SKILL.md:5-15