feat: one-click cookie import from browser
New: agent-eyes configure --from-browser chrome - Extracts Twitter, XiaoHongShu, Bilibili cookies in ONE command - No F12, no manual copying, no extension needed - Supports: chrome, firefox, edge, brave, opera - Uses browser-cookie3 (optional dependency: pip install agent-eyes[cookies]) Install guide now 3x shorter: 1. pip install + agent-eyes install (auto-detect env) 2. agent-eyes configure --from-browser chrome (one-click all cookies) 3. agent-eyes configure exa-key KEY (one API key) 4. Done User actions reduced from 4 trips to 2: - Before: go to exa.ai + F12 Twitter + F12 XHS + go to webshare.io - After: go to exa.ai + say 'yes' to auto-import cookies
This commit is contained in:
+43
-71
@@ -12,7 +12,7 @@ Install Agent Eyes: https://raw.githubusercontent.com/Panniantong/agent-eyes/mai
|
||||
|
||||
## For AI Agents
|
||||
|
||||
Install Agent Eyes and set it up for the user. Minimize friction — ask as few questions as possible.
|
||||
Install Agent Eyes and set it up with minimal user effort.
|
||||
|
||||
### Step 1: Install and check
|
||||
|
||||
@@ -21,103 +21,75 @@ pip install git+https://github.com/Panniantong/agent-eyes.git || pip3 install gi
|
||||
agent-eyes install --env=auto
|
||||
```
|
||||
|
||||
That's it. This installs the package, auto-detects the environment, and shows what's working.
|
||||
### Step 2: One-click cookie import (LOCAL COMPUTERS ONLY)
|
||||
|
||||
### Step 2: Tell user what's ready + offer ONE upgrade
|
||||
If the environment was detected as **local**, offer to grab all cookies at once:
|
||||
|
||||
Tell the user what already works, then offer the single highest-value upgrade:
|
||||
> "I can automatically import your cookies from Chrome to unlock Twitter, XiaoHongShu, and Bilibili — all at once, one command. Want me to do that?
|
||||
> (Make sure Chrome is closed first)"
|
||||
|
||||
> "✅ Agent Eyes installed! Here's what I can already do:
|
||||
> - Read web pages, GitHub repos, RSS feeds, YouTube transcripts
|
||||
> - Read individual tweets
|
||||
>
|
||||
> **Want me to unlock search too?** One free API key lets me search the entire web, Reddit, and Twitter for you.
|
||||
> Just go to https://exa.ai → sign up (free, 1000 searches/month) → send me the API key.
|
||||
>
|
||||
> Or say 'skip' and I'm ready to use as-is."
|
||||
If yes:
|
||||
```bash
|
||||
pip install browser-cookie3
|
||||
agent-eyes configure --from-browser chrome
|
||||
```
|
||||
|
||||
If the user provides a key:
|
||||
This extracts cookies for ALL supported platforms in one shot. No F12, no manual copying.
|
||||
|
||||
If user uses a different browser:
|
||||
```bash
|
||||
agent-eyes configure --from-browser firefox # or edge, brave, opera
|
||||
```
|
||||
|
||||
If the environment is **server** or the user declines, skip to Step 3.
|
||||
|
||||
### Step 3: Offer search upgrade
|
||||
|
||||
> "Want to unlock web search? One free API key lets me search the entire web, Reddit, and Twitter.
|
||||
> → Go to https://exa.ai → sign up (free) → send me the API key.
|
||||
> Or say 'skip'."
|
||||
|
||||
If user provides key:
|
||||
```bash
|
||||
agent-eyes configure exa-key THE_KEY
|
||||
```
|
||||
|
||||
If the user says skip, move to Step 4.
|
||||
### Step 4: Server-only — offer proxy
|
||||
|
||||
### Step 3: Offer additional channels
|
||||
Only if auto-detected as server:
|
||||
|
||||
After Exa is configured (or skipped), briefly mention what else is available:
|
||||
|
||||
> "I can also unlock these with cookies from your browser (2 min each):
|
||||
> 🐦 **Twitter** deep search — timelines, threads, advanced search
|
||||
> 📕 **XiaoHongShu** — read notes and comments
|
||||
>
|
||||
> Want any of these? Or say 'done' and we're good to go."
|
||||
|
||||
Only proceed with channels the user explicitly asks for.
|
||||
|
||||
#### How to get cookies (for any platform)
|
||||
|
||||
When the user wants to set up a cookie-based channel, give them the SIMPLEST method:
|
||||
|
||||
**Method 1 — Browser extension (easiest):**
|
||||
> "Install the 'Cookie-Editor' extension for Chrome/Firefox (free). Open [the site], click the extension icon, click 'Export' → 'Header String'. Paste it to me."
|
||||
|
||||
**Method 2 — Manual (if they don't want to install an extension):**
|
||||
> "Open [the site] in Chrome. Press F12. Click 'Application' tab at the top. Click 'Cookies' on the left. Find and copy the values I need."
|
||||
|
||||
#### Twitter setup
|
||||
Cookie-Editor export, or manually copy **auth_token** and **ct0** from x.com cookies.
|
||||
```bash
|
||||
agent-eyes configure twitter-cookies AUTH_TOKEN CT0
|
||||
```
|
||||
|
||||
#### XiaoHongShu setup
|
||||
Cookie-Editor export the full cookie string from xiaohongshu.com.
|
||||
```bash
|
||||
agent-eyes configure xhs-cookie COOKIE_STRING
|
||||
```
|
||||
|
||||
#### YouTube (only mention if user has age-restricted video needs)
|
||||
No cookies needed for public videos. For age-restricted/member content:
|
||||
```bash
|
||||
agent-eyes configure youtube-cookies chrome
|
||||
```
|
||||
(yt-dlp reads cookies directly from the browser — just tell it which browser)
|
||||
|
||||
#### Bilibili
|
||||
- Local computer: already works
|
||||
- Server: needs proxy (see below)
|
||||
|
||||
#### Reddit full reader + Bilibili on server
|
||||
Only offer this if `agent-eyes install` detected server environment:
|
||||
> "Reddit and Bilibili block server IPs. Reddit search already works (via Exa), but for reading full posts you'd need a $1/month proxy from https://webshare.io. Want to set that up?"
|
||||
> "Reddit and Bilibili block server IPs. Reddit search still works free via Exa, but for full access you'd need a cheap proxy ($1/month).
|
||||
> → Get one at https://webshare.io if interested. Or skip — search still works!"
|
||||
|
||||
If user provides proxy:
|
||||
```bash
|
||||
agent-eyes configure proxy http://user:pass@ip:port
|
||||
```
|
||||
|
||||
### Step 4: Done
|
||||
### Step 5: Done
|
||||
|
||||
```bash
|
||||
agent-eyes doctor
|
||||
```
|
||||
|
||||
Summarize naturally:
|
||||
> "✅ Ready! Here's everything I can do: [list channels]. Try asking me to search or read something!"
|
||||
> "✅ All set! [list what's active]. Try asking me to search or read something!"
|
||||
|
||||
**Remember**: the user can always come back and say "set up Twitter" or "add a proxy" later. You just run the corresponding `agent-eyes configure` command.
|
||||
**Users can always configure more later** by saying things like "set up Twitter for Agent Eyes" or "add my XiaoHongShu cookies".
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference
|
||||
## Manual configure (one channel at a time)
|
||||
|
||||
These commands are for manual setup or adding individual channels later:
|
||||
|
||||
| Command | What it does |
|
||||
|---------|-------------|
|
||||
| `agent-eyes doctor` | Show all channels and status |
|
||||
| `agent-eyes configure --from-browser chrome` | Import ALL cookies at once |
|
||||
| `agent-eyes configure exa-key KEY` | Unlock search (web + Reddit + Twitter) |
|
||||
| `agent-eyes configure twitter-cookies TOKEN CT0` | Unlock Twitter deep search |
|
||||
| `agent-eyes configure xhs-cookie COOKIE` | Unlock XiaoHongShu |
|
||||
| `agent-eyes configure youtube-cookies BROWSER` | Unlock age-restricted YouTube |
|
||||
| `agent-eyes configure proxy URL` | Unlock Reddit reader + Bilibili (server) |
|
||||
| `agent-eyes configure twitter-cookies TOKEN CT0` | Twitter deep search (manual) |
|
||||
| `agent-eyes configure xhs-cookie COOKIE` | XiaoHongShu (manual) |
|
||||
| `agent-eyes configure youtube-cookies chrome` | Age-restricted YouTube |
|
||||
| `agent-eyes configure proxy URL` | Reddit + Bilibili on servers |
|
||||
| `agent-eyes doctor` | Show all channels and status |
|
||||
| `agent-eyes read URL` | Read any URL |
|
||||
| `agent-eyes search "query"` | Search the web |
|
||||
|
||||
Reference in New Issue
Block a user