pagebridge doctor
Validates your entire PageBridge setup — environment variables, credentials, database connection, schema, Sanity access, and GSC API access. Run this after initial setup or whenever something seems off.
Usage
pagebridge doctor [options]Options
| Flag | Type | Description |
|---|---|---|
--migrate | boolean | Automatically run database migrations when missing tables are detected, then re-check |
--json | boolean | Output structured JSON ({ "results": [...], "summary": {...} }) for CI and scripting |
What it checks
- Environment file — verifies a
.envor.env.localfile exists with required variables - Google credentials — validates the service account JSON structure
- Database connection — connects to PostgreSQL and checks for required tables
- Database schema — verifies all PageBridge tables exist (offers to migrate if
--migrateis passed) - Sanity access — tests the project ID, dataset, and token
- GSC API access — verifies the service account can reach the Search Console API
Examples
# Run all checks
pagebridge doctor
# Auto-fix missing tables
pagebridge doctor --migrate
# JSON output for CI pipelines
pagebridge doctor --jsonSee also
- init command — interactive setup wizard
- Quick Start — full setup walkthrough
- Troubleshooting