How to Install Optional Channels Using the `--channels` Flag in Agent-Reach
You can extend Agent-Reach with platform-specific support for Twitter, Reddit, Bilibili, and other networks by passing the --channels flag to the install command, selecting either individual channels as comma-separated values or using all to enable every integration.
Agent-Reach is an open-source AI agent framework that keeps its base installation lightweight. While core system dependencies like GitHub CLI, Node.js, and mcporter are always installed regardless of flags, you must explicitly use the --channels flag to install optional platform integrations.
Where the --channels Flag Is Defined
The command-line argument is registered in agent_reach/cli.py at lines 74-79, where the parser accepts a comma-separated string of channel names. When you execute agent-reach install, the input string is split and normalized into a set of requested channels at lines 107-115, with each name converted to lowercase and whitespace trimmed.
If you specify the special value all, the installer expands the request at lines 110-112 to include every installable channel plus the cookie-only channels xueqiu and linkedin, ensuring you do not need to remember individual channel names for a complete installation.
Available Channel Options
The installer categorizes optional channels based on whether they require additional dependency installation or rely solely on cookie authentication.
Channels Requiring Dependency Installation
The CHANNEL_INSTALLERS dictionary defined at lines 96-101 in agent_reach/cli.py maps valid channel names to their specific installer functions:
twitter→_install_twitter_deps: Installstwitter-clivia pipx or uvxiaoyuzhou→_install_xiaoyuzhou_deps: Copies the transcription script and verifies ffmpeg availabilityxiaohongshu→_install_xhs_deps: Installsxiaohongshu-clireddit→_install_reddit_deps: Installs therdt-clitoolbilibili→_install_bili_deps: Installsbilibili-cli
Cookie-Only Channels
Two channels do not require additional CLI tools and are handled during the subsequent cookie-import phase:
xueqiu: Requires manual cookie import onlylinkedin: Requires manual cookie import only
These channels have no entries in the CHANNEL_INSTALLERS mapping but are included when you specify all in your --channels list.
Installation Workflow
After completing the core system dependency installation, the CLI evaluates your channel selections. If the --dry-run or --safe flags are active, the optional channel block is skipped entirely (lines 152-154), and the installer prints a summary of what would have been installed (lines 160-163).
In a standard installation, the process outputs "Installing optional channels..." (lines 151-155) and iterates over the sorted requested_channels set (lines 155-159). For each channel present in CHANNEL_INSTALLERS, the corresponding function executes to fetch and configure platform-specific tools.
Following the optional channel setup, the installer proceeds to import cookies for channels requiring authentication (Twitter, Xueqiu, Bilibili) before running the health-check (doctor) and skill installation routines.
Command Examples
Install specific platforms to keep your environment minimal:
# Install Twitter and Reddit support only
agent-reach install --channels=twitter,reddit
Enable every available integration including cookie-only platforms:
# Install all optional channels (Twitter, Xiaoyuzhou, XiaoHongShu, Reddit, Bilibili, Xueqiu, LinkedIn)
agent-reach install --channels=all
Preview changes without modifying your system:
# Perform a dry-run to see what would be installed
agent-reach install --dry-run --channels=twitter,bilibili
Summary
- The
--channelsflag inagent_reach/cli.pycontrols which optional platform integrations are installed alongside core dependencies. - Valid installable channels include
twitter,xiaoyuzhou,xiaohongshu,reddit, andbilibili, each mapped to specific installer functions in theCHANNEL_INSTALLERSdictionary. - The special value
allexpands to include every installable channel plus cookie-only options (xueqiuandlinkedin). - When using
--dry-runor--safe, the installer skips actual installation and prints a summary of requested channels instead. - Cookie-only channels bypass the dependency installation phase and proceed directly to the cookie-import step.
Frequently Asked Questions
What happens if I omit the --channels flag?
If you run agent-reach install without specifying --channels, the installer completes with only the core system dependencies (GitHub CLI, Node.js, mcporter). According to lines 219-224 in agent_reach/cli.py, the CLI displays a hint reminding you about the --channels flag and which platforms are available, allowing you to rerun the command with your desired selections.
What does --channels=all install?
Using --channels=all expands your request to include every channel defined in the CHANNEL_INSTALLERS dictionary (Twitter, Xiaoyuzhou, XiaoHongShu, Reddit, and Bilibili) plus the cookie-only channels xueqiu and linkedin (lines 110-112). This provides comprehensive platform support without requiring you to list individual channel names.
How does --dry-run affect optional channel installation?
When you include --dry-run (or --safe), the installer skips the optional channel installation block entirely (lines 152-154). Instead of executing installer functions like _install_twitter_deps or _install_reddit_deps, the CLI prints a summary showing which channels would have been installed (lines 160-163), allowing you to verify your selections before making permanent changes.
Why do some channels not require installation?
Channels like xueqiu and linkedin are cookie-only integrations that do not require additional CLI tools or system packages. These channels lack entries in the CHANNEL_INSTALLERS mapping and are handled exclusively during the cookie-import phase that occurs after the optional dependency installation completes. You can include them in your --channels list or the all expansion, but the installer will only prompt for cookie configuration rather than downloading software.
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 →