# How to Install Optional Channels Using the `--channels` Flag in Agent-Reach

> Easily install optional channels like Twitter, Reddit, and Bilibili for Agent-Reach using the --channels flag. Select specific channels or enable all integrations for expanded platform support.

- Repository: [Pnant/Agent-Reach](https://github.com/Panniantong/Agent-Reach)
- Tags: how-to-guide
- Published: 2026-06-10

---

**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`](https://github.com/Panniantong/Agent-Reach/blob/main/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`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) maps valid channel names to their specific installer functions:

- **`twitter`** → `_install_twitter_deps`: Installs `twitter-cli` via pipx or uv
- **`xiaoyuzhou`** → `_install_xiaoyuzhou_deps`: Copies the transcription script and verifies **ffmpeg** availability
- **`xiaohongshu`** → `_install_xhs_deps`: Installs `xiaohongshu-cli`
- **`reddit`** → `_install_reddit_deps`: Installs the `rdt-cli` tool
- **`bilibili`** → `_install_bili_deps`: Installs `bilibili-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 only
- **`linkedin`**: 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:

```bash

# Install Twitter and Reddit support only

agent-reach install --channels=twitter,reddit

```

Enable every available integration including cookie-only platforms:

```bash

# Install all optional channels (Twitter, Xiaoyuzhou, XiaoHongShu, Reddit, Bilibili, Xueqiu, LinkedIn)

agent-reach install --channels=all

```

Preview changes without modifying your system:

```bash

# Perform a dry-run to see what would be installed

agent-reach install --dry-run --channels=twitter,bilibili

```

## Summary

- The `--channels` flag in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) controls which optional platform integrations are installed alongside core dependencies.
- Valid installable channels include `twitter`, `xiaoyuzhou`, `xiaohongshu`, `reddit`, and `bilibili`, each mapped to specific installer functions in the `CHANNEL_INSTALLERS` dictionary.
- The special value `all` expands to include every installable channel plus cookie-only options (`xueqiu` and `linkedin`).
- When using `--dry-run` or `--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`](https://github.com/Panniantong/Agent-Reach/blob/main/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.