How to Manually Configure a Platform in Agent Reach Without the Automated Installer
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.
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, 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 within the _cmd_configure function (lines 99–129). The execution flow follows these steps:
- Argument Parsing: The command receives
args.keyandargs.valuefrom the CLI. - Platform Dispatch: Lines 130–212 route the request to platform-specific branches (e.g.,
proxy,twitter-cookies,youtube-cookies,xhs-cookies). - Value Storage: Lines 210–236 call
Config.setto persist the validated value and optionally sync it to downstream tools (such astwitter-clienvironment variables). - 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:
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.
Configure Twitter Authentication
You can supply Twitter credentials in two formats:
Cookie header string:
agent-reach configure twitter-cookies "auth_token=AAA; ct0=BBB"
Space-separated values:
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:
agent-reach configure youtube-cookies chrome
Configure Xiaohongshu (XHS) Cookies
For XHS, the CLI supports both JSON exports and header strings:
JSON array format:
agent-reach configure xhs-cookies '[{"name":"xhsusid","value":"123","domain":".xiaohongshu.com"}]'
Header string format:
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:
agent-reach configure github-token ghp_YourTokenHere
Groq API Key:
agent-reach configure groq-key gsk_YourKeyHere
OpenAI API Key:
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 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:
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 theConfigclass inagent_reach/config.py. - The
agent-reach configurecommand (implemented inagent_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 doctorto 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 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 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. 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).
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 →