fix: 3 bugs found in Docker clean-room test

1. Install command: git+... requires git (many envs don't have it)
   → Changed to zip URL: pip install .../archive/main.zip

2. yt-dlp not in dependencies (shows warning in doctor)
   → Added yt-dlp to required dependencies

3. search-twitter/reddit shows raw 401 error without Exa key
   → Now shows friendly 'Exa API key not configured' message
This commit is contained in:
Panniantong 2026-02-24 07:11:22 +01:00
parent deec966228
commit c40ffbd5ed
4 changed files with 18 additions and 2 deletions

View file

@ -22,7 +22,7 @@ Your Agent reads the guide, installs everything, and configures itself. You just
**Or install manually:**
```bash
pip install git+https://github.com/Panniantong/agent-eyes.git
pip install https://github.com/Panniantong/agent-eyes/archive/main.zip
agent-eyes doctor # See what's available
agent-eyes setup # Unlock more (optional)
```

View file

@ -523,6 +523,21 @@ async def _cmd_search(args):
else:
print(f"Unknown command: {args.command}", file=sys.stderr)
sys.exit(1)
except Exception as e:
error_str = str(e)
if "401" in error_str or "Unauthorized" in error_str:
print("⚠️ Exa API key not configured or invalid.")
print("Get a free key at https://exa.ai (1000 searches/month free)")
print("Then run: agent-eyes configure exa-key YOUR_KEY")
sys.exit(1)
elif "exa" in error_str.lower() or "api_key" in error_str.lower():
print("⚠️ Exa API key not configured.")
print("Get a free key at https://exa.ai")
print("Then run: agent-eyes configure exa-key YOUR_KEY")
sys.exit(1)
else:
print(f"❌ Error: {e}", file=sys.stderr)
sys.exit(1)
if not results:
print("No results found.")

View file

@ -17,7 +17,7 @@ Install Agent Eyes with minimal user effort. Goal: fewest questions, fewest step
### Step 1: Install and detect
```bash
pip install git+https://github.com/Panniantong/agent-eyes.git || pip3 install git+https://github.com/Panniantong/agent-eyes.git
pip install https://github.com/Panniantong/agent-eyes/archive/main.zip || pip3 install https://github.com/Panniantong/agent-eyes/archive/main.zip
agent-eyes install --env=auto
```

View file

@ -26,6 +26,7 @@ dependencies = [
"loguru>=0.7",
"pyyaml>=6.0",
"rich>=13.0",
"yt-dlp>=2024.0",
]
[project.optional-dependencies]