Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

feat: add clean mode for testing Bird CLI flow

Matt Van Hornfe9ebb99446f
diff --git a/SKILL.md b/SKILL.md
index 1f25080c..71573d0e 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -12,10 +12,13 @@ allowed-tools: Bash, Read, Write, AskUserQuestion, WebSearch
This is the TEST version of /last30days with Bird CLI integration for free X/Twitter search.
+**CLEAN MODE:** This test skill ignores your existing ~/.config/last30days/.env so you can experience the Bird CLI installation flow from scratch.
+
**What's new:**
- Bird CLI support for free X/Twitter search (no API key needed)
- Uses browser cookies for authentication
-- Falls back to xAI if Bird not available
+- Interactive prompt to install Bird if not found
+- Falls back to WebSearch if Bird not available (xAI keys ignored in test mode)
Research ANY topic across Reddit, X, and the web. Surface what people are actually discussing, recommending, and debating right now.
@@ -106,7 +109,7 @@ chmod 600 ~/.config/last30days/.env
**Step 1: Run the research script**
```bash
-python3 ~/.claude/skills/last30daystest/scripts/last30days.py "$ARGUMENTS" --emit=compact 2>&1
+LAST30DAYS_CONFIG_DIR="" python3 ~/.claude/skills/last30daystest/scripts/last30days.py "$ARGUMENTS" --emit=compact 2>&1
```
The script will automatically:
diff --git a/scripts/lib/env.py b/scripts/lib/env.py
index b53c9b11..481a65a8 100644
--- a/scripts/lib/env.py
+++ b/scripts/lib/env.py
@@ -4,8 +4,20 @@ import os
from pathlib import Path
from typing import Optional, Dict, Any
-CONFIG_DIR = Path.home() / ".config" / "last30days"
-CONFIG_FILE = CONFIG_DIR / ".env"
+# Allow override via environment variable for testing
+# Set LAST30DAYS_CONFIG_DIR="" for clean/no-config mode
+# Set LAST30DAYS_CONFIG_DIR="/path/to/dir" for custom config location
+_config_override = os.environ.get('LAST30DAYS_CONFIG_DIR')
+if _config_override == "":
+ # Empty string = no config file (clean mode)
+ CONFIG_DIR = None
+ CONFIG_FILE = None
+elif _config_override:
+ CONFIG_DIR = Path(_config_override)
+ CONFIG_FILE = CONFIG_DIR / ".env"
+else:
+ CONFIG_DIR = Path.home() / ".config" / "last30days"
+ CONFIG_FILE = CONFIG_DIR / ".env"
def load_env_file(path: Path) -> Dict[str, str]:
@@ -33,8 +45,8 @@ def load_env_file(path: Path) -> Dict[str, str]:
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
- # Load from config file first
- file_env = load_env_file(CONFIG_FILE)
+ # Load from config file first (if configured)
+ file_env = load_env_file(CONFIG_FILE) if CONFIG_FILE else {}
# Environment variables override file
config = {