# Credentials Registry
> **⛔ MANDATORY READ** before any agent claims "I don't have access."
> Last full verification: 2026-03-04

---

## 🔑 API Keys & Tokens

### Google OAuth (Gmail, Calendar, Docs, Slides, Drive, Sheets)
| Account | Token Location | Scopes | Status |
|---------|---------------|--------|--------|
| kitt@curiousendeavor.com | `google-auth/token.json` | gmail, calendar, docs, slides, drive, sheets | ✅ |
| assafdagancos@gmail.com | `google-auth/token-personal.json` | gmail.readonly, calendar.readonly, calendar.events.readonly | ✅ (9 calendars incl. CE, Spoken, Personal) |

- **OAuth Client:** `google-auth/credentials.json` (project: `clawdbot-permissions`, client: `346271062849-raec8tjfdjjrtpjkr5r43np17u1d4mj0`)
- **Client Secret:** `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`
- **Python venvs with google libs:** `venv/` or `agents/thibault/venv/`
- **Test:** `source venv/bin/activate && python3 -c "from google.oauth2.credentials import Credentials; from googleapiclient.discovery import build; c=Credentials.from_authorized_user_file('google-auth/token.json'); s=build('gmail','v1',credentials=c); print(s.users().getProfile(userId='me').execute()['emailAddress'])"`

### Notion
- **Key:** `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`
- **File:** `/home/clawd/secrets/notion/api_key`
- **Test:** `curl -s -H "Authorization: Bearer $(cat /home/clawd/secrets/notion/api_key)" -H "Notion-Version: 2022-06-28" https://api.notion.com/v1/users/me | jq .name`
- **Note:** Some scripts hardcode an older key `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` — use the secrets file version.

### Figma
- **Token:** `figd_AyXTBc1Jw2O8xxB1obVsG1gmS0QdwzwbVjyku6gl`
- **File:** `/home/clawd/secrets/figma/api_token`
- **Test:** `curl -s -H "X-Figma-Token: $(cat /home/clawd/secrets/figma/api_token)" https://api.figma.com/v1/me | jq .handle`

### Gemini (Google AI)
- **Key:** `AIzaSyDXqYZInk83iVV4mD29pSuHQKbgkiI1x9Q`
- **Env:** `GEMINI_API_KEY` in `~/.bashrc`
- **Test:** `curl -s "https://generativelanguage.googleapis.com/v1beta/models?key=$GEMINI_API_KEY" | jq '.models[0].name'`
- **Note:** Old dead key `AIzaSyC2dTGU667C7l8mzaCjI5S18txWtf0aHPc` was in bashrc — fixed 2026-03-04.

### Recraft (Image Generation)
- **Key:** `ONdPVa7auZzwGDtGvyJlgQxAzJ51RVkhQMeTQfTtuWBvfTqKOA7jibaMgHmtS6d0`
- **Env:** `RECRAFT_API_KEY` in `~/.bashrc`
- **Test:** `curl -s -H "Authorization: Bearer $RECRAFT_API_KEY" https://external.api.recraft.ai/v1/styles | head -c 100`

### OpenAI
- **Key:** `/home/clawd/secrets/openai/api_key`
- **Env:** `OPENAI_API_KEY` in `~/.bashrc`
- **Used by:** `last30days` skill (Reddit search via OpenAI Responses API)
- **Test:** `curl -s https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY" | python3 -c "import sys,json; print(len(json.load(sys.stdin)['data']),'models')"`

### GitHub
- **CLI Auth:** `gh` logged in as `assafdagan20205` (token in `~/.config/gh/hosts.yml`)
- **Lobster PAT:** `/home/clawd/secrets/github/danpeg-lobster-pat` — `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`
- **Test:** `gh auth status`

### X (Twitter) — xurl
- **Binary:** `/usr/bin/xurl` (installed globally via npm)
- **Status:** ❌ NOT CONFIGURED — returns 401
- **Needs:** API keys configured via `xurl config` or env vars
- **Test:** `xurl whoami`

### Discord
- **Bot tokens:** Managed internally by OpenClaw (8 agents)
- **Team Webhook:** `https://discord.com/api/webhooks/1475470748297592926/OMQvQBRyC6yvHsXEm7Y8WDyrI9kxJ_ph3IzgGcvkdcBetaW9zthdeaRQEdoPFiFJ28NY`
- **Guild ID:** `1467974388581273603`
- **Usage:** `message` tool for agent messages, webhook for team-show (`node scripts/team-show.cjs`)

### OpenClaw
- **Gateway Token:** env `OPENCLAW_GATEWAY_TOKEN`
- **Anthropic Auth:** `~/.openclaw/agents/main/agent/auth.json` (token mode)

### Vercel
- **CLI:** `/usr/lib/node_modules/vercel` (v50.23.2)
- **Deploy:** Push to `main` branch of `assafdagan20205/ce-website` → auto-deploys

---

## 📸 Visual Capture & Screenshots

### Playwright (PRIMARY — use this)
- **Binary:** `/usr/local/bin/playwright` (v1.58.2) + Python `playwright` (v1.58.0)
- **CLI screenshot:** `playwright screenshot --browser chromium --viewport-size="1440,900" --full-page "URL" output.png`
- **Python API:** `from playwright.sync_api import sync_playwright` — full browser automation
- **Stealth mode:** `playwright-stealth` (v2.0.2) installed for anti-bot bypass
- **No sandbox:** Required on this server (`--no-sandbox` / `headless=True`)
- **FREE, UNLIMITED. No API key needed.**

### OpenClaw Browser (Built-in)
- **Config:** headless=true, noSandbox=true
- **Profiles:** `openclaw` (isolated) and `chrome` (relay)
- **Browser tool:** `browser` tool with snapshot/screenshot/navigate/act
- **Chrome Extension:** Relay mode for attaching to existing Chrome tabs (port 18792)
- **User data:** `~/.openclaw/browser/openclaw/user-data/`

### Scrapling (Web Scraping Framework)
- **Library:** `scrapling` v0.4.1 (Python pip)
- **Import:** `from scrapling import Fetcher, StealthFetcher`
- **CLI wrapper:** `python3 scripts/scrape.py "URL" [--stealth] [--links] [--css "selector"] [--html]`
- **Features:** Cloudflare bypass, 774x faster than BeautifulSoup, adaptive selectors, auto proxy rotation
- **Use for:** Bulk scraping, anti-bot sites, competitor monitoring, design publication scraping
- **No API key needed. FREE, UNLIMITED.**
- **Test:** `python3 -c "from scrapling import Fetcher; print(Fetcher().get('https://httpbin.org/ip').status)"`

### Pinchtab (Browser Control for AI Agents)
- **Binary:** `/usr/local/bin/pinchtab` v0.7.6 (12MB Go binary)
- **Start:** `nohup pinchtab --headless > /tmp/pinchtab.log 2>&1 &`
- **Port:** 9867 (default)
- **Health:** `pinchtab health`
- **Key commands:**
  - `pinchtab nav <url>` — navigate
  - `pinchtab text` — extract readable text (~800 tokens vs ~10K for screenshots)
  - `pinchtab snap -c` — compact accessibility tree
  - `pinchtab snap -d` — diff only (what changed since last snapshot)
  - `pinchtab snap -c -i` — interactive elements only
  - `pinchtab ss -o file.png` — screenshot
- **Use for:** Client-side rendered pages (JS/SPA), visual QA, competitor monitoring
- **Advantage:** 13x cheaper than screenshots for page understanding
- **No API key needed. FREE, UNLIMITED.**
- **Test:** `pinchtab health` (server must be running)

### Microlink API (OG data + screenshots)
- **URL:** `https://api.microlink.io/?url={URL}`
- **Free tier, no key needed**
- **Returns:** OG image, title, description, screenshot
- **Scripts using it:** `taste-microlink-covers.py`, `visual-capture/capture.py`

### ImageMagick (`convert`)
- **Binary:** `/usr/bin/convert`
- **Use for:** Cropping, resizing, compression, format conversion
- **Common pattern:** Crop hero section: `convert full.png -crop 1400x900+0+0 cropped.png`
- **Compress:** `convert input.png -quality 85 -resize 1400x output.jpg`

### Image Compression Script
- **Script:** `node scripts/compress-images.js <directory>`
- **Settings:** Max 1400px width, PNG 80%, JPEG 85%, skips <100KB files

### OG Image Scraping (No API needed)
- **Script:** `skills/visual-capture/batch-og.py` — scrapes og:image directly from HTML
- **Fallback for:** When Microlink fails or rate-limits

### Gemini Vision Analysis
- **Via:** `GEMINI_API_KEY` + google-genai library
- **Script:** `scripts/image_analyzer.py`, `skills/visual-capture/capture.py --analyze`
- **Use for:** Analyzing captured images for tags, style classification

### ScreenshotOne
- **Status:** ❌ DEAD — quota exhausted. Don't use.

---

## 🕷️ Web Scraping Scripts

| Script | Target | Method | Output |
|--------|--------|--------|--------|
| `scripts/scrape-behance.cjs` | Behance moodboards | Playwright | JSON of projects |
| `scripts/scrape-behance-board.cjs` | Single Behance board | Playwright | JSON with images |
| `scripts/scrape-add-boards.cjs` | Multiple Behance boards → Notion | Playwright + Notion API | Notion entries |
| `scripts/scrape-creativeboom.js` | Creative Boom /inspiration/ | Playwright | JSON array |
| `agents/julia/scripts/scrape-design-sites.js` | Creative Boom + It's Nice That | Playwright | Trend entries |
| `scripts/capture-agency-screenshots.js` | Agency case studies | Puppeteer | PNG screenshots |
| `scripts/capture-sites.sh` | Reference sites (food brands) | Playwright CLI | PNG screenshots |
| `scripts/take_screenshots.py` | Competitor meeting AI sites | Playwright Python | PNG screenshots |
| `agents/thibault/skills/trend-scouting/scripts/capture-signal.sh` | Any URL → cropped hero | Playwright + ImageMagick | JPG <200KB |

---

## 🎨 Taste Board Pipeline

| Script | Purpose |
|--------|---------|
| `scripts/taste-screenshots.py` | Batch screenshots for mymind entries |
| `scripts/taste-smart-capture.py` | Smart image extraction (OG → largest image → screenshot fallback) |
| `scripts/taste-microlink-covers.py` | Set Notion covers via Microlink |
| `scripts/taste-notion-covers.py` | Set Notion covers (Notion API) |
| `scripts/taste-set-covers.py` | Manual cover setting |
| `scripts/taste-fix-all-covers.py` | Fix missing/broken covers |
| `scripts/taste-recover-all.py` | Recovery for failed imports |
| `scripts/taste-full-sync.py` | Full taste board sync |
| `scripts/taste-ingest.py` | Ingest new entries |
| `scripts/import-mymind.py` | Import MyMind CSV export |
| `scripts/mymind_smart_import.py` | Smart MyMind → Notion with dedup + OG covers |
| `scripts/taste-api.js` | Taste board API server |

---

## 🔌 Figma Integration

| Component | Location | Purpose |
|-----------|----------|---------|
| Figma Plugin (main) | `figma-plugin/code.js` | Remote commands via relay |
| CC Figma Plugin | `public/cc-fig-plugin-download/` | AI-powered Figma chat |
| Figma Relay Server | `scripts/figma-relay-web.cjs` (port 3055) | WebSocket bridge |
| Cloudflared Tunnel | `screen -r figma-tunnel` | External access to relay |

---

## 🖥️ Background Services (screen sessions)

| Session | Purpose | Check Command |
|---------|---------|---------------|
| `figma-tunnel` | Cloudflared tunnel for Figma | `screen -S figma-tunnel -X hardcopy /tmp/ft.txt && grep trycloudflare /tmp/ft.txt` |
| `figma-relay` | Figma relay (port 3055) | `curl -s localhost:3055` |
| `webserver` | Static file server (port 8800) | `curl -s localhost:8800` |
| `mt` | Unknown/legacy | Check if still needed |

---

## 🧰 Installed Global Tools

| Tool | Binary | Version |
|------|--------|---------|
| Node.js | `/usr/bin/node` | v22.22.0 |
| Python | `/usr/bin/python3` | 3.12 |
| Playwright | `/usr/local/bin/playwright` | v1.58.2 |
| ImageMagick | `/usr/bin/convert` | 6.x |
| curl | `/usr/bin/curl` | — |
| wget | `/usr/bin/wget` | — |
| gh (GitHub CLI) | `gh` | — |
| xurl (X API) | `/usr/bin/xurl` | v1.0.3 |
| Vercel CLI | `vercel` | v50.23.2 |
| OpenClaw | `openclaw` | 2026.2.21-2 |

### Key Python Packages (system + venv)
- `playwright`, `playwright-stealth`
- `google-api-python-client`, `google-auth`, `google-auth-oauthlib`
- `google-genai`, `google-generativeai`
- `requests`

---

## ⚠️ Known Issues

1. ~~Google OAuth app~~ — ✅ RESOLVED. assafdagancos@gmail.com connected 2026-03-04
2. ~~xurl~~ — ✅ Connected 2026-03-04. @assafdagan, OAuth1, full read/write
3. **Duplicate Gemini keys** — verify which is current
4. **Duplicate Notion keys** — some scripts hardcode old key vs secrets file
5. **kitt-workspace-token.json missing** — referenced in docs/reference.md but doesn't exist at `/home/clawd/secrets/google/`

---

## 📋 Maintenance

### Add new credential
1. Add to appropriate section above
2. Include: key/token, location, test command
3. Verify test command works
4. Update date at top

### Remove stale credential
1. Move to Archived section
2. Note date and reason

### Full verification
Run test commands for each service. Update status + date.

---

## 🗄️ Archived
_None yet_
