Metadata-Version: 2.5
Name: by-reach
Version: 2.0.0b1
Summary: Route AI-agent internet research through approved source tools with byCLI as the webpage executor.
Project-URL: Homepage, https://github.com/sovovs/By-Reach
Project-URL: Repository, https://github.com/sovovs/By-Reach
Project-URL: Issues, https://github.com/sovovs/By-Reach/issues
Author: sovovs
License: MIT
License-File: LICENSE
Keywords: agent-infrastructure,ai-agent,ai-search,automation,bilibili,claude-code,cli,cursor,free-api,llm-tools,mcp,no-api-key,openai,reddit-scraper,search,twitter-scraper,web-reader,web-scraper,xiaohongshu,youtube-transcript
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: feedparser>=6.0
Requires-Dist: idna<4,>=3.6
Requires-Dist: loguru>=0.7
Requires-Dist: packaging>=24.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests>=2.28
Requires-Dist: rich>=13.0
Requires-Dist: yt-dlp[default]>=2026.07.04
Provides-Extra: all
Requires-Dist: browser-cookie3>=0.19; extra == 'all'
Requires-Dist: mcp[cli]>=1.0; extra == 'all'
Requires-Dist: playwright>=1.40; extra == 'all'
Provides-Extra: browser
Requires-Dist: playwright>=1.40; extra == 'browser'
Provides-Extra: cookies
Requires-Dist: browser-cookie3>=0.19; extra == 'cookies'
Provides-Extra: dev
Requires-Dist: mypy>=1.12; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Requires-Dist: types-requests>=2.32; extra == 'dev'
Provides-Extra: mcp
Requires-Dist: mcp[cli]>=1.0; extra == 'mcp'
Description-Content-Type: text/markdown

# By-Reach

By-Reach routes AI-agent research to approved source executors and provides
installation and diagnostic commands for those routes.

## The webpage rule

After a task has entered By-Reach routing, **every website or URL read uses
byCLI**:

```bash
bycli web read --url "https://example.com" --stdout
```

This applies equally to static pages, SPAs, articles, raw files, and pages that
do not require sign-in. There is no generic-web fallback. If byCLI cannot read
the target, stop and report the failure.

By-Reach does not automate sign-in, read browser cookies, or inject
credentials. byCLI session use must be explicitly established and authorized by
the user.

## Source routes

| Target | First executor | One fallback, only after failure or invalid content |
| --- | --- | --- |
| Generic webpage | `bycli web read` | none |
| Twitter/X | `twitter-cli` | `bycli twitter search` |
| Reddit | `rdt-cli` | `bycli reddit search` |
| Bilibili | `bili-cli` | `bycli bilibili search` |
| YouTube | `yt-dlp` | `bycli youtube search` |
| V2EX | packaged V2EX API route | `bycli v2ex hot` |
| Xueqiu | packaged Xueqiu API route | `bycli xueqiu search` |
| Facebook, Instagram, LinkedIn, XiaoHongShu | byCLI | none |
| GitHub | `gh` | none |
| RSS | `feedparser` | none |
| Exa search | `mcporter` → `exa.web_search_exa` | none |
| Xiaoyuzhou | By-Reach transcription | none |

Run a source-specific primary once. An empty, challenge, malformed, or
error-shaped result counts as failure; then run the listed byCLI fallback once.
Never replace either route with a generic webpage mechanism.

## Install

```bash
pipx install by-reach
by-reach install --env=auto          # read-only diagnosis
by-reach install --env=auto --system # only after the user authorizes changes
by-reach doctor --json
```

`--system` installs the required byCLI core and registers the By-Reach Skill.
The default command changes nothing. See [the installation guide](docs/install.md)
for the complete safety boundary and optional channel setup.

## Use

```bash
by-reach read "https://example.com"
by-reach doctor --json
by-reach skill --install
```

Persistent configuration is stored in `~/.by-reach/`. Public environment
variables use the `BY_REACH_` prefix. The packaged Skill is named `by-reach`.

For a direct `twitter` command, explicitly set credentials in that command's
environment; saved configuration only helps `by-reach doctor` identify missing
setup:

```bash
export TWITTER_AUTH_TOKEN="..."
export TWITTER_CT0="..."
twitter search "query" -n 10
```

## Development

```bash
pip install -e '.[dev]'
ruff check by_reach tests
mypy by_reach
pytest -q
```

See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md). This
project is a public fork of
[Panniantong/Agent-Reach](https://github.com/Panniantong/Agent-Reach); its MIT
license and complete upstream Git history are retained.
