How to Install Agent Reach with Specific Channels: A Complete Guide
Use the agent-reach install command with the --channels flag to install only the platform integrations you need, such as twitter, reddit, or bilibili, either individually or as a comma-separated list.
Agent Reach provides a modular CLI that lets you activate only the platform channels you actually use. Instead of bloating your environment with every possible integration, you can selectively install Agent Reach with specific channels to keep dependencies minimal and tailored to your workflow.
Understanding the Channel Installation Architecture
The installation system in agent_reach/cli.py operates as a lightweight orchestrator that maps channel names to their respective setup routines.
How the CLI Parses Channel Requests
When you invoke the install command, the CLI immediately processes the --channels flag at lines 197-216. It splits the comma-separated input, expands the special keyword all if provided, and compiles a deduplicated set of requested_channels to process.
The CHANNEL_INSTALLERS Registry
At lines 197-206, the source defines a dictionary named CHANNEL_INSTALLERS that maps each installable channel name to a dedicated helper function. This registry pattern decouples the CLI interface from the actual implementation details of each platform's setup logic.
Installing Specific Agent Reach Channels
The basic syntax follows the pattern agent-reach install --channels=<name> where <name> can be a single channel or multiple channels separated by commas.
Install a single platform:
agent-reach install --channels=twitter
Install multiple specific channels:
agent-reach install --channels=twitter,reddit,bilibili
Install every available channel at once using the all keyword:
agent-reach install --channels=all
Preview changes without modifying your system:
agent-reach install --channels=twitter,reddit --dry-run
Run in safe mode to report missing tools without installing anything:
agent-reach install --channels=twitter --safe
Platform-Specific Installation Logic
Each channel in CHANNEL_INSTALLERS points to a specialized function that handles the low-level dependency resolution. According to the source code in agent_reach/cli.py, the installer loop at lines 262-266 iterates through your requested channels and executes the appropriate handler:
- Twitter (
_install_twitter_deps): Lines 680-700 check for existing binaries and install viapipxoruvif needed. - Xiaoyuzhou (
_install_xiaoyuzhou_deps): Lines 637-652 handle the audio platform dependencies. - XiaoHongShu (
_install_xhs_deps): Lines 703-724 manage the XHS-specific tooling. - OpenCLI (
_install_opencli_deps): Lines 729-754 set up GUI-driven Chrome sessions. - Reddit (
_install_reddit_depswith fallback_install_rdt_cli): Lines 778-795 handle Reddit access tools. - Bilibili (
_install_bili_deps): Lines 820-828 install Bilibili-specific utilities.
Each installer first checks if the required tool already exists using shutil.which before attempting installation through package managers like pipx, uv, or npm.
Environment-Aware Installation
Before executing any installers, the CLI calls _detect_environment() at lines 555-595 to determine whether it is running on a desktop (local) or a headless server (server). This detection is critical because certain channels, such as opencli, require a GUI-driven Chrome session and are automatically skipped on server environments.
Verifying Your Installation
After all requested channels complete their setup routines, the CLI automatically triggers the diagnostic engine at lines 311-319. This runs check_all(config) and formats a report via format_report, verifying that each installed channel is healthy and accessible. If you add channels later, simply re-run the installer with the additional channel names; already-installed channels are detected and skipped to prevent conflicts.
Summary
- Use
agent-reach install --channels=<list>to install Agent Reach with specific channels rather than the full suite. - The
CHANNEL_INSTALLERSdictionary inagent_reach/cli.pymaps each channel name to its dedicated setup function. - Available channels include
twitter,reddit,bilibili,xiaoyuzhou,xiaohongshu, andopencli. - The installer auto-detects your environment (desktop vs. server) and skips GUI-dependent channels on headless systems.
- Use
--dry-runto preview changes or--safeto audit without modifying your system. - Re-running the installer with new channels only processes the missing dependencies, skipping existing ones.
Frequently Asked Questions
Can I install multiple channels at once?
Yes. Pass a comma-separated list to the --channels flag, such as agent-reach install --channels=twitter,reddit,bilibili. The CLI parses this string at lines 197-216 and processes each channel sequentially through the CHANNEL_INSTALLERS registry.
What happens if a channel is already installed?
The installer checks for existing binaries using shutil.which before attempting any installation. If the required tool is already present on your system, that channel is skipped automatically, making it safe to re-run the command when adding new channels to your setup.
Why is the OpenCLI channel skipped on my server?
The _detect_environment() function (lines 555-595) identifies headless server environments. Since opencli requires a GUI-driven Chrome session (lines 729-754), the installer automatically excludes it from server installations to prevent failures.
How do I see what would be installed without actually installing?
Append the --dry-run flag to your command, such as agent-reach install --channels=twitter --dry-run. This executes the parsing and mapping logic without calling the actual installer functions, showing you exactly which tools would be installed on your system.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →