# How to Manually Configure a Platform in Agent Reach Without the Automated Installer

> Manually configure Agent Reach platforms using the agent-reach configure command bypass the automated installer and directly manage authentication details in config.yaml

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

---

**You can manually configure any platform in Agent Reach by running the `agent-reach configure` command with your platform key and credentials, which writes authentication details directly to `~/.agent-reach/config.yaml` without requiring the browser-based auto-installer.**

Agent Reach is an open-source automation framework that typically extracts credentials from your browser during the installation phase. When you need to **manually configure a platform in Agent Reach without the automated installer**, the CLI provides direct access to the underlying configuration system through the `configure` sub-command implemented in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py).

## Where Agent Reach Stores Credentials

Agent Reach persists all platform-specific secrets—including cookies, API keys, and tokens—in a user-local YAML file located at `~/.agent-reach/config.yaml`. 

According to the source code in [`agent_reach/config.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/config.py), the `Config` class provides the `get`, `set`, and `delete` helpers that the CLI uses to interact with this file. When you run manual configuration commands, the `Config.set` method writes your supplied values to this YAML store, where they are later read by the platform-specific channel implementations in `agent_reach/channels/*`.

## The Configure Command Implementation

The manual configuration flow is implemented in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) within the `_cmd_configure` function (lines 99–129). The execution flow follows these steps:

1. **Argument Parsing**: The command receives `args.key` and `args.value` from the CLI.
2. **Platform Dispatch**: Lines 130–212 route the request to platform-specific branches (e.g., `proxy`, `twitter-cookies`, `youtube-cookies`, `xhs-cookies`).
3. **Value Storage**: Lines 210–236 call `Config.set` to persist the validated value and optionally sync it to downstream tools (such as `twitter-cli` environment variables).
4. **Complex Formats**: For Xiaohongshu (XHS) cookies, the function delegates to `_configure_xhs_cookies` (lines 254–332) to handle JSON arrays or header strings.

## Step-by-Step Manual Configuration Commands

The CLI accepts multiple input styles for each platform, allowing you to copy-paste raw cookie headers, space-separated lists, or JSON exports without preprocessing.

### Configure Network Proxy Settings

To set a network proxy for restricted environments:

```bash
agent-reach configure proxy "http://user:pass@proxy.example.com:8080"

```

This command saves the `proxy` key and the legacy `bilibili_proxy` key in [`config.yaml`](https://github.com/Panniantong/Agent-Reach/blob/main/config.yaml).

### Configure Twitter Authentication

You can supply Twitter credentials in two formats:

**Cookie header string:**

```bash
agent-reach configure twitter-cookies "auth_token=AAA; ct0=BBB"

```

**Space-separated values:**

```bash
agent-reach configure twitter-cookies AAA BBB

```

Both methods parse the input and store the values as `twitter_auth_token` and `twitter_ct0` in the configuration file.

### Configure YouTube Cookies

To specify which browser `yt-dlp` should use for fetching age-restricted videos:

```bash
agent-reach configure youtube-cookies chrome

```

### Configure Xiaohongshu (XHS) Cookies

For XHS, the CLI supports both JSON exports and header strings:

**JSON array format:**

```bash
agent-reach configure xhs-cookies '[{"name":"xhsusid","value":"123","domain":".xiaohongshu.com"}]'

```

**Header string format:**

```bash
agent-reach configure xhs-cookies "xhsusid=123; xhsfp=xyz"

```

The `_configure_xhs_cookies` function validates the input and writes it to `~/.agent-reach/xhs-cookies.json` or copies it into a running `xiaohongshu-mcp` Docker container.

### Configure API Keys

For backend services, use the following commands:

**GitHub Personal Access Token:**

```bash
agent-reach configure github-token ghp_YourTokenHere

```

**Groq API Key:**

```bash
agent-reach configure groq-key gsk_YourKeyHere

```

**OpenAI API Key:**

```bash
agent-reach configure openai-key sk-YourKeyHere

```

These store the values as `github_token`, `groq_api_key`, and `openai_api_key` respectively.

## Input Validation and Flexibility

The `_cmd_configure` function in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) deliberately supports flexible input styles. Whether you paste a raw cookie header, provide space-separated tokens, or import a JSON export, the CLI validates the format before persisting it via `Config.set`. This design eliminates the need for helper scripts when transferring credentials from browser development tools.

## Verifying Your Manual Configuration

After configuring your platforms, validate that Agent Reach can access the stored credentials:

```bash
agent-reach doctor

```

This command checks each channel and reports an "ok" status for properly configured platforms.

## Summary

- Agent Reach stores credentials in `~/.agent-reach/config.yaml`, managed by the `Config` class in [`agent_reach/config.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/config.py).
- The `agent-reach configure` command (implemented in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py)) provides manual configuration without the automated installer.
- Supported platforms include **proxy**, **twitter-cookies**, **youtube-cookies**, **xhs-cookies**, **github-token**, **groq-key**, and **openai-key**.
- The CLI accepts multiple input formats: header strings, space-separated values, and JSON exports.
- Use `agent-reach doctor` to verify that all configured channels are operational.

## Frequently Asked Questions

### Can I manually configure Agent Reach without ever running the automated installer?

Yes. The `agent-reach configure` command provides a complete manual configuration path. You can populate `~/.agent-reach/config.yaml` with all necessary credentials before running any platform-specific operations, bypassing the browser-based cookie extraction entirely.

### What file format does Agent Reach use for manual configuration?

Agent Reach uses a YAML file located at `~/.agent-reach/config.yaml` for simple key-value pairs. For complex cookie formats like XHS, it stores validated JSON in `~/.agent-reach/xhs-cookies.json`. The `Config` class in [`agent_reach/config.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/config.py) handles all read and write operations.

### How do I validate that my manual configuration is working correctly?

Run the `agent-reach doctor` command after setting your credentials. This utility checks each configured channel and reports whether the stored values in [`config.yaml`](https://github.com/Panniantong/Agent-Reach/blob/main/config.yaml) are valid and accessible. If a platform shows "ok" status, the manual configuration was successful.

### Where are the configuration commands implemented in the source code?

The configuration logic resides in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py). The `_cmd_configure` function (lines 99–129) handles argument parsing, while lines 130–212 manage platform-specific dispatching. Value persistence occurs through `Config.set` (lines 210–236), and complex XHS handling is implemented in `_configure_xhs_cookies` (lines 254–332).