tail-fin-cli 0.1.0

Multi-site browser automation CLI — Twitter, YouTube, Instagram, SeekingAlpha, and more
# tail-fin

Multi-site browser automation CLI. Attaches to your existing Chrome to interact with websites using your active login sessions.

## Supported Sites

| Site | Commands | Browser Required |
|------|----------|-----------------|
| [Twitter/X]docs/sites/twitter.md | `timeline`, `search` | Yes |
| [Grok]docs/sites/grok.md | `ask`, `conversations` | Yes |
| [YouTube]docs/sites/youtube.md | `search`, `video`, `channel`, `comments`, `trending`, `transcript`, `subscriptions` | Yes |
| [591 Taiwan Rentals]docs/sites/591.md | `regions`, `hot`, `community`, `price-history`, `sales`, `search`, `crawl` | Partial |
| [SeekingAlpha]docs/sites/sa.md | `income-statement`, `balance-sheet`, `cash-flow`, `quote`, `news`, `analysis`, `article` | Or `--cookies` |
| [Xiaohongshu]docs/sites/xhs.md | `search`, `note`, `user-notes`, `comments`, `feed`, `notifications`, `media` | Yes |
| [Instagram]docs/sites/instagram.md | `profile`, `search`, `user`, `explore`, `followers`, `following`, `saved`, `like`, `unlike`, `follow`, `unfollow`, `save`, `unsave`, `comment` | Yes |
| [Any site]docs/gen.md | `gen generate` + `run` — auto-generate CLI adapters | Yes |

## Quick Start

```sh
# 1. Start Chrome with remote debugging
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

# 2. Log in to the sites you want to use

# 3. Install
cargo install --path crates/tail-fin-cli

# 4. Run commands
tail-fin --connect 127.0.0.1:9222 twitter timeline
tail-fin --connect 127.0.0.1:9222 grok ask "What is Rust?"
tail-fin --connect 127.0.0.1:9222 youtube search "rust programming"
tail-fin --connect 127.0.0.1:9222 sa quote AAPL
tail-fin --connect 127.0.0.1:9222 instagram profile natgeo
tail-fin --connect 127.0.0.1:9222 xhs search "咖啡推薦"

# 591 public commands (no browser needed)
tail-fin 591 hot --region 1
tail-fin 591 community 7329

# Auto-generate a CLI for any site
tail-fin --connect 127.0.0.1:9222 gen generate https://news.ycombinator.com
tail-fin --connect 127.0.0.1:9222 run hackernews hot
```

## Global Flags

| Flag | Default | Description |
|------|---------|-------------|
| `--connect <host:port>` || Chrome remote debugging address |
| `--cookies [path]` || Use saved cookies (twitter, sa) |
| `--headed` | `false` | Run browser in headed (visible) mode |

## Output

All commands output JSON to stdout. Errors go to stderr. JSONL for streaming commands (`591 crawl`).

## Documentation

- [Getting Started]docs/getting-started.md — prerequisites, installation, basic usage
- [Architecture]docs/architecture.md — crate structure, adapter pattern, dependency graph
- [Cloudflare]docs/cloudflare.md — Turnstile vs JS Challenge, why `--connect` is required
- [Gen — Auto CLI Generation]docs/gen.md — explore, synthesize, generate, run

## Development

```sh
cargo build           # build all crates
cargo test            # run all tests
cargo test -- --ignored  # run live tests (hits real APIs)
cargo clippy          # lint
cargo fmt             # format
```

## License

[MIT](LICENSE)