enigmare/v2-crawler
1889
1{"id":"doc-service_tokens_planetscale-3acac92c","source":"documentation","title":"Service tokens - PlanetScale","url":"https://planetscale.com/docs/cli/service-tokens","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\nexport PLANETSCALE_SERVICE_TOKEN=<YOUR_SERVICE_TOKEN>\nexport PLANETSCALE_SERVICE_TOKEN_ID=<YOUR_SERVICE_TOKEN_ID>\n```\n\nExample:\n```text\npscale branch create <DB_NAME> <BRANCH_NAME> --org <ORG_NAME>\n```\n\nExample:\n```text\npscale branch create <DB_NAME> <BRANCH_NAME> --org <ORG_NAME> --service-token <SERVICE_TOKEN> --service-token-id <SERVICE_TOKEN_ID>\n```\n\nExample:\n```text\ncurl --request GET \\\n --url 'https://api.planetscale.com/v1/organizations' \\\n --header 'Authorization: <SERVICE_TOKEN_ID>:<SERVICE_TOKEN>'\n```\n\nExample:\n```text\npscale service-token create\n```\n\nExample:\n```text\npscale service-token create --name \"My Token\"\n```\n\nExample:\n```text\npscale service-token create --name \"My Token\" --ttl 3600\n```\n\nExample:\n```text\npscale service-token add-access <SERVICE_TOKEN_ID> <ACCESS_PERMISSION> --database <DB_NAME>\n```\n\nExample:\n```text\npscale service-token add-access <SERVICE_TOKEN_ID> read_branch delete_branch create_branch --database <DB_NAME>\n```\n\nExample:\n```text\npscale service-token delete-access <SERVICE_TOKEN_ID> <ACCESS_PERMISSION> --database <DB_NAME>\n```\n\nExample:\n```text\npscale service-token delete <SERVICE_TOKEN_ID>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.497Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":11,"totalLines":61,"estimatedTokens":334}}2{"id":"doc-planetscale_cli_commands_backup_planetscale-0c482460","source":"documentation","title":"PlanetScale CLI commands: backup - PlanetScale","url":"https://planetscale.com/docs/cli/backup","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale backup <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale backup list <DATABASE_NAME> <BRANCH_NAME> --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\nID NAME STATE SIZE CREATED AT UPDATED AT STARTED AT EXPIRES AT COMPLETED AT\n-------------- --------------------- --------- ------- ------------- ------------- ------------- ------------------- --------------\nxxxxxxxx 2022.02.11 16:01:03 success 24.1M 3 hours ago 3 hours ago 3 hours ago 1 day from now 3 hours ago\nxxxxxxxx 2022.02.10 16:01:03 success 23.2M 1 day ago 1 day ago 1 day ago 20 hours from now 1 day ago\n```\n\nExample:\n```text\npscale backup list <DATABASE_NAME> <BRANCH_NAME> <BACKUP_ID>\n```\n\nExample:\n```text\nID NAME STATE SIZE CREATED AT UPDATED AT STARTED AT EXPIRES AT COMPLETED AT\n-------------- --------------------- --------- ------- ------------- ------------- ------------- ------------------- --------------\nxxxxxxxx 2022.02.11 16:01:03 success 24.1M 3 hours ago 3 hours ago 3 hours ago 1 day from now 3 hours ago\n```\n\nExample:\n```text\npscale backup policy list <DATABASE_NAME>\npscale backup policy create <DATABASE_NAME> \\\n --target production \\\n --retention-value 7 \\\n --retention-unit day \\\n --frequency-value 1 \\\n --frequency-unit day \\\n --schedule-time 02:00\npscale backup policy update <DATABASE_NAME> <POLICY_ID> --retention-value 14\npscale backup policy delete <DATABASE_NAME> <POLICY_ID>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.498Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":47,"estimatedTokens":432}}3{"id":"doc-planetscale_cli_commands_insights_planetscale-c67e0e23","source":"documentation","title":"PlanetScale CLI commands: insights - PlanetScale","url":"https://planetscale.com/docs/cli/insights","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale insights <sub-command> <database> [<branch>] --org <org> <FLAG>\n```\n\nExample:\n```text\npscale insights queries <database> <branch> --org <org> <FLAG>\n```\n\nExample:\n```text\npscale insights queries <database> <branch> --org <org>\npscale insights queries <database> <branch> --org <org> --sort rowsReadPerReturned\npscale insights queries <database> <branch> --org <org> --sort p99Latency --period 1h --format json\n```\n\nExample:\n```text\npscale insights queries samples <database> <branch> <fingerprint> --org <org> --keyspace <keyspace> <FLAG>\n```\n\nExample:\n```text\npscale insights queries samples <database> <branch> <fingerprint> --org <org> --keyspace <keyspace> --format json\n```\n\nExample:\n```text\npscale insights errors <database> <branch> --org <org> <FLAG>\n```\n\nExample:\n```text\npscale insights errors <database> <branch> --org <org> --format json\n```\n\nExample:\n```text\npscale insights anomalies <database> <branch> --org <org> <FLAG>\n```\n\nExample:\n```text\npscale insights tags <database> <branch> --org <org> <FLAG>\n```\n\nExample:\n```text\npscale insights tags <database> <branch> --org <org> --format json\n```\n\nExample:\n```text\npscale insights tags show <database> <branch> <tag> --org <org>\n```\n\nExample:\n```text\npscale insights tags summaries <database> <branch> --org <org> --tags username --tags app --format json\n```\n\nExample:\n```text\npscale insights recommendations <database> --org <org> <FLAG>\n```\n\nExample:\n```text\npscale insights recommendations <database> --org <org> --format json\n```\n\nExample:\n```text\npscale insights recommendations dismiss <database> <number> --org <org> --force --reason \"not applicable\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.498Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":15,"totalLines":80,"estimatedTokens":454}}4{"id":"doc-planetscale_cli_commands_connections_planetscale-93d7253a","source":"documentation","title":"PlanetScale CLI commands: connections - PlanetScale","url":"https://planetscale.com/docs/cli/connections","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale branch connections [sub-command]\n```\n\nExample:\n```text\n{\n \"database_kind\": \"postgresql\",\n \"captured_at\": \"2026-06-01T17:10:46Z\",\n \"instances\": [{ \"id\": \"...\", \"role\": \"primary\" }],\n \"connections\": [\n {\n \"pid\": 12345,\n \"instance\": \"...\",\n \"instance_role\": \"primary\",\n \"state\": \"active\",\n \"duration_ms\": 8200,\n \"wait_event_type\": \"Lock\",\n \"wait_event\": \"transactionid\",\n \"username\": \"app\",\n \"application_name\": \"checkout\",\n \"client_addr\": \"10.0.0.5\",\n \"query_text\": \"UPDATE orders SET ...\",\n \"blocked_by\": [],\n \"query_id\": \"...\",\n \"transaction_id\": \"...\",\n \"connection_id\": \"...\"\n }\n ]\n}\n```\n\nExample:\n```text\npscale branch connections show <database> <branch> [flags]\n```\n\nExample:\n```text\npscale branch connections show <database> <branch> --format json\n```\n\nExample:\n```text\npscale branch connections top [database] [branch] [flags]\n```\n\nExample:\n```text\npscale branch connections top <database> <branch>\n```\n\nExample:\n```text\npscale branch connections top <database> <branch> --keyspace commerce --shard -80\n```\n\nExample:\n```text\npscale branch connections top <database> <branch> --capture trace.jsonl --duration 1h\npscale branch connections top --replay trace.jsonl\n```\n\nExample:\n```text\npscale branch connections kill <database> <branch> <connection-id>\npscale branch connections kill <database> <branch> <query-id> --query\n```\n\nExample:\n```text\npscale branch connections kill-transaction <database> <branch> <transaction-id>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.498Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":10,"totalLines":78,"estimatedTokens":427}}5{"id":"doc-planetscale_cli_commands_api_planetscale-44e0427c","source":"documentation","title":"PlanetScale CLI commands: api - PlanetScale","url":"https://planetscale.com/docs/cli/api","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale api <ENDPOINT> <FLAG>\n```\n\nExample:\n```text\npscale api user\n```\n\nExample:\n```text\npscale api organizations/{org}/databases\n```\n\nExample:\n```text\npscale api organizations/{org}/databases -F 'name=\"my-database\"'\n```\n\nExample:\n```text\npscale api organizations/{org}/databases/my-database\n```\n\nExample:\n```text\npscale api -X DELETE organizations/{org}/databases/my-database\n```\n\nExample:\n```text\npscale api -X PATCH organizations/{org}/databases/{db} -F 'notes=@mynotes.txt'\n```\n\nExample:\n```text\npscale api organizations/{org}/databases/{db}/branches --input=spec.json\n```\n\nExample:\n```text\npscale api organizations/{org}/databases/{db}/branches --input=- -F 'name=\"my-name\"'\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.499Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":9,"totalLines":48,"estimatedTokens":216}}6{"id":"doc-planetscale_cli_commands_branch_planetscale-593a4949","source":"documentation","title":"PlanetScale CLI commands: branch - PlanetScale","url":"https://planetscale.com/docs/cli/branch","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale branch <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\nexport PLANETSCALE_ORG=\"<org>\"\npscale branch list <database> --format json\npscale branch show <database> <branch> --format json\n```\n\nExample:\n```text\npscale branch connections top <database> <branch>\n```\n\nExample:\n```text\npscale branch query-patterns download <DATABASE_NAME> <BRANCH_NAME> --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale branch list <DATABASE_NAME> --web\n```\n\nExample:\n```text\npscale branch parameters list <DATABASE_NAME> <BRANCH_NAME> --namespace pgconf\n```\n\nExample:\n```text\npscale branch resize <DATABASE_NAME> <BRANCH_NAME> --parameters pgconf.max_connections=200 --parameters pgconf.work_mem=8MB --wait\n```\n\nExample:\n```text\npscale branch resize status <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\npscale branch resize cancel <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\npscale branch vtgate show <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\npscale branch vtgate resize <DATABASE_NAME> <BRANCH_NAME> \\\n --vtgate-size VTG_320 \\\n --vtgate-autoscaling \\\n --vtgate-count 2 \\\n --vtgate-max-count 8 \\\n --vtgate-target-cpu-utilization 50\n```\n\nExample:\n```text\npscale branch vtgate resize status <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\npscale branch vtgate resize cancel <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\npscale branch diff <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\n-- users --\n+CREATE TABLE `users` (\n+ `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n+ `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n+ PRIMARY KEY (`id`)\n+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.499Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":15,"totalLines":90,"estimatedTokens":458}}7{"id":"doc-planetscale_cli_commands_workflow_planetscale-0ab92777","source":"documentation","title":"PlanetScale CLI commands: workflow - PlanetScale","url":"https://planetscale.com/docs/cli/workflow","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale workflow <SUB-COMMAND> <FLAG>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.499Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":55}}8{"id":"doc-planetscale_cli_commands_database_planetscale-1cfab51b","source":"documentation","title":"PlanetScale CLI commands: database - PlanetScale","url":"https://planetscale.com/docs/cli/database","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale database <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\nexport PLANETSCALE_ORG=\"<org>\"\npscale database list --format json\npscale database show <database> --format json\n```\n\nExample:\n```text\npscale database create new-database --region <REGION_NAME> --plan scaler_pro --cluster_size PS_80\n```\n\nExample:\n```text\npscale database create new-postgres-db --engine postgres --region <REGION_NAME> --min-storage 10737418240 --max-storage 21474836480\n```\n\nExample:\n```text\npscale database dump <CURRENT_DATABASE_NAME> <BRANCH_NAME> --output=\"<DIRECTORY_FOR_BACKUP>\" --org=\"<ORIGINAL_ORGANIZATION>\"\n```\n\nExample:\n```text\npscale database dump <DATABASE_NAME> <BRANCH_NAME> --output-format=json\n```\n\nExample:\n```text\npscale database dump <DATABASE_NAME> <BRANCH_NAME> --output-format=csv\n```\n\nExample:\n```text\npscale database dump <DATABASE_NAME> <BRANCH_NAME> --output-format=sql\n```\n\nExample:\n```text\n# Export only specific columns from multiple tables\npscale database dump <DATABASE_NAME> <BRANCH_NAME> --columns 'users:id,name' --columns 'orders:id,total'\n```\n\nExample:\n```text\npscale database dump <DATABASE_NAME> <BRANCH_NAME> --read-only-region eu-west\n```\n\nExample:\n```text\npscale database update <DATABASE_NAME> --default-branch main --restrict-branch-region=true\npscale database update <DATABASE_NAME> --require-approval-for-deploy=true\n```\n\nExample:\n```text\npscale database ip-restriction list <DATABASE_NAME>\npscale database ip-restriction create <DATABASE_NAME> --cidrs 203.0.113.0/24 --description office\npscale database ip-restriction update <DATABASE_NAME> <ENTRY_ID> --cidrs 203.0.113.0/24,198.51.100.10/32\npscale database ip-restriction delete <DATABASE_NAME> <ENTRY_ID>\n```\n\nExample:\n```text\npscale database throttler show <DATABASE_NAME>\npscale database throttler update <DATABASE_NAME> --ratio 25\npscale database throttler update <DATABASE_NAME> --configuration main=10 --configuration sharded=40\n```\n\nExample:\n```text\npscale database restore-dump <DESTINATION_DATABASE_NAME> <BRANCH_NAME> --dir=\"<DIRECTORY_FOR_BACKUP>\" --org=\"<DESTINATION_ORGANIZATION>\"\n```\n\nExample:\n```text\n<CURRENT_DATABASE_NAME>.<TABLE_NAME>-schema.sql\n```\n\nExample:\n```text\n<DESTINATION_DATABASE_NAME>.<TABLE_NAME>-schema.sql\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.500Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":16,"totalLines":92,"estimatedTokens":599}}9{"id":"doc-planetscale_cli_commands_region_planetscale-8b861540","source":"documentation","title":"PlanetScale CLI commands: region - PlanetScale","url":"https://planetscale.com/docs/cli/region","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale region <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\nNAME SLUG ENABLED\n ------------------------------------------------- ---------------------------- ---------\n AWS us-east-2 (Ohio) aws-us-east-2 Yes\n AWS us-east-1 (N. Virginia) us-east Yes\n AWS us-west-2 (Oregon) us-west Yes\n AWS eu-west-1 (Dublin) eu-west Yes\n AWS ap-south-1 (Mumbai) ap-south Yes\n AWS ap-southeast-1 (Singapore) ap-southeast Yes\n AWS ap-northeast-1 (Tokyo) ap-northeast Yes\n AWS eu-central-1 (Frankfurt) eu-central Yes\n AWS ap-southeast-2 (Sydney) aws-ap-southeast-2 Yes\n AWS sa-east-1 (Sao Paulo) aws-sa-east-1 Yes\n GCP us-central1 (Council Bluffs, Iowa) gcp-us-central1 Yes\n AWS eu-west-2 (London) aws-eu-west-2 Yes\n GCP us-east4 (Ashburn, Virginia) gcp-us-east4 Yes\n GCP northamerica-northeast1 (Montréal, Québec) gcp-northamerica-northeast1 Yes\n GCP asia-northeast3 (Seoul, South Korea) gcp-asia-northeast3 Yes\n GCP europe-west1 (St Ghislain, Belgium) gcp-europe-west1 Yes\n GCP us-east1 (Moncks Corner, South Carolina) gcp-us-east1 Yes\n GCP europe-west4 (Eemshaven, Netherlands) gcp-europe-west4 Yes\n AWS ca-central-1 (Montreal) aws-ca-central-1 Yes\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.500Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":38,"estimatedTokens":518}}10{"id":"doc-planetscale_cli_commands_query_patterns_planetsc-23cff79d","source":"documentation","title":"PlanetScale CLI commands: query-patterns - PlanetScale","url":"https://planetscale.com/docs/cli/query-patterns","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale branch query-patterns download <database> <branch> --org <org> <FLAG>\n```\n\nExample:\n```text\npscale branch query-patterns download <database> <branch> --org <org>\n```\n\nExample:\n```text\npscale branch query-patterns download <database> <branch> --org <org> --output ./query-patterns.csv\n```\n\nExample:\n```text\npscale branch query-patterns download <database> <branch> --org <org> --format json\n```\n\nExample:\n```text\n{\n \"id\": \"report1\",\n \"state\": \"completed\",\n \"file\": \"./query-patterns.csv\"\n}\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.500Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":32,"estimatedTokens":171}}11{"id":"doc-planetscale_cli_commands_org_planetscale-4c089a59","source":"documentation","title":"PlanetScale CLI commands: org - PlanetScale","url":"https://planetscale.com/docs/cli/org","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale org <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.501Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":13,"estimatedTokens":69}}12{"id":"doc-planetscale_cli_commands_ping_planetscale-bb43f2f6","source":"documentation","title":"PlanetScale CLI commands: ping - PlanetScale","url":"https://planetscale.com/docs/cli/ping","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale ping\n```\n\nExample:\n```text\nNAME (17) LATENCY ENDPOINT TYPE\n ----------------------------- --------- ------------------------------------------------ -----------\n AWS us-west-2 34.6ms aws.connect.psdb.cloud optimized\n AWS us-west-2 34.8ms us-west.connect.psdb.cloud direct\n GCP us-central1 57.5ms gcp.connect.psdb.cloud optimized\n GCP us-central1 57.9ms gcp-us-central1.connect.psdb.cloud direct\n AWS us-east-2 60.5ms aws-us-east-2.connect.psdb.cloud direct\n GCP us-east4 69.2ms gcp-us-east4.connect.psdb.cloud direct\n AWS us-east-1 70.2ms us-east.connect.psdb.cloud direct\n GCP northamerica-northeast1 80.9ms gcp-northamerica-northeast1.connect.psdb.cloud direct\n AWS ap-northeast-1 116.6ms ap-northeast.connect.psdb.cloud direct\n GCP asia-northeast3 149.5ms gcp-asia-northeast3.connect.psdb.cloud direct\n AWS ap-southeast-2 150.9ms aws-ap-southeast-2.connect.psdb.cloud direct\n AWS eu-central-1 154.4ms eu-central.connect.psdb.cloud direct\n AWS eu-west-1 157.2ms eu-west.connect.psdb.cloud direct\n AWS sa-east-1 179.5ms aws-sa-east-1.connect.psdb.cloud direct\n AWS ap-southeast-1 189.4ms ap-southeast.connect.psdb.cloud direct\n AWS ap-south-1 243.1ms ap-south.connect.psdb.cloud direct\n AWS eu-west-2 670.5ms aws-eu-west-2.connect.psdb.cloud direct\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.501Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":31,"estimatedTokens":522}}13{"id":"doc-planetscale_cli_commands_service_token_planetsca-2043843a","source":"documentation","title":"PlanetScale CLI commands: service-token - PlanetScale","url":"https://planetscale.com/docs/cli/service-token","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale service-token <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale service-token add-access <TOKEN_ID> read_branch delete_branch create_branch --database <DATABASE_NAME>\n```\n\nExample:\n```text\npscale service-token add-access <TOKEN_ID> read_organization\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.501Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":18,"estimatedTokens":110}}14{"id":"doc-planetscale_cli_commands_pgbouncer_planetscale-371ec762","source":"documentation","title":"PlanetScale CLI commands: pgbouncer - PlanetScale","url":"https://planetscale.com/docs/cli/pgbouncer","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale pgbouncer <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale pgbouncer list <DATABASE_NAME> <BRANCH_NAME> --org <ORGANIZATION_NAME>\npscale pgbouncer create <DATABASE_NAME> <BRANCH_NAME> --org <ORGANIZATION_NAME> --target replica --size PGB_10\npscale pgbouncer show <DATABASE_NAME> <BRANCH_NAME> <NAME> --org <ORGANIZATION_NAME>\npscale pgbouncer resize <DATABASE_NAME> <BRANCH_NAME> <NAME> --org <ORGANIZATION_NAME> --size PGB_20\npscale pgbouncer resize status <DATABASE_NAME> <BRANCH_NAME> <NAME> --org <ORGANIZATION_NAME>\npscale pgbouncer delete <DATABASE_NAME> <BRANCH_NAME> <NAME> --org <ORGANIZATION_NAME> --force\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.501Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":18,"estimatedTokens":202}}15{"id":"doc-planetscale_cli_commands_sql_planetscale-66e5a10b","source":"documentation","title":"PlanetScale CLI commands: sql - PlanetScale","url":"https://planetscale.com/docs/cli/sql","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale sql <database> <branch> --org <org> --query \"<SQL>\" <FLAG>\n```\n\nExample:\n```text\npscale sql <database> <branch> --org <org> --format json --query \"SELECT 1\"\n```\n\nExample:\n```text\npscale sql <database> <branch> --org <org> --format json --replica --query \"SELECT COUNT(*) FROM users\"\n```\n\nExample:\n```text\npscale sql <database> <branch> --org <org> --format json --dbname postgres --query \"SELECT version()\"\n```\n\nExample:\n```text\npscale sql <database> <branch> --org <org> --format json --keyspace <keyspace> --query \"SELECT 1\"\n```\n\nExample:\n```text\npscale sql <database> <branch> --org <org> --format json --force --query \"DELETE FROM staging_rows WHERE id = 1\"\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.501Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":33,"estimatedTokens":213}}16{"id":"doc-planetscale_cli_commands_shell_planetscale-f6db50bf","source":"documentation","title":"PlanetScale CLI commands: shell - PlanetScale","url":"https://planetscale.com/docs/cli/shell","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale shell <DATABASE_NAME> <BRANCH_NAME> <FLAG>\n```\n\nExample:\n```text\npscale shell mydatabase\n```\n\nExample:\n```text\npscale shell mydatabase mybranch\n```\n\nExample:\n```text\nDATABASE_NAME/BRANCH_NAME >\nDATABASE_NAME/BRANCH_NAME > show tables;\n+---------------+\n| Tables_in_db |\n+---------------+\n| users |\n+---------------+\nDATABASE_NAME/BRANCH_NAME > exit;\n```\n\nExample:\n```text\npsql-17 (17.5 (Homebrew))\nSSL connection (protocol: TLSv1.3, cipher: TLS_AES_128_GCM_SHA256, compression: off, ALPN: postgresql)\nType \"help\" for help.\n\npg/|⚠ main ⚠|> \\dt\n List of relations\n Schema | Name | Type | Owner\n--------+-------------+-------+-------------------------\n public | users | table | pscale_api_2e2o0t28kd0v\n(1 row)\n\npg/|⚠ main ⚠|> \\q\n```\n\nExample:\n```text\npscale shell mydatabase mybranch --replica\n```\n\nExample:\n```text\npscale shell mydatabase mybranch --role reader\n```\n\nExample:\n```text\nDATABASE_NAME/BRANCH_NAME > source <YOUR_DUMP_FILE>.sql;\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.502Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":8,"totalLines":61,"estimatedTokens":293}}17{"id":"doc-planetscale_cli_commands_password_planetscale-a76c0fa4","source":"documentation","title":"PlanetScale CLI commands: password - PlanetScale","url":"https://planetscale.com/docs/cli/password","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale password <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\nexport PLANETSCALE_ORG=\"<org>\"\npscale password list <database> <branch> --format json\n```\n\nExample:\n```text\npscale password create <DATABASE_NAME> <BRANCH_NAME> <PASSWORD_NAME> --read-only-region eu-west\n```\n\nExample:\n```text\npscale keyspace read-only-regions <DATABASE_NAME> <BRANCH_NAME> <KEYSPACE_NAME>\n```\n\nExample:\n```text\npscale password delete <DATABASE_NAME> <BRANCH_NAME> <PASSWORD_ID>\n```\n\nExample:\n```text\n? Please type <DATABASE_NAME>/<BRANCH_NAME>/<PASSWORD_ID> to confirm:\nPassword <PASSWORD_ID> was successfully deleted from <BRANCH_NAME>.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.502Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":35,"estimatedTokens":200}}18{"id":"doc-planetscale_cli_commands_role_planetscale-9391854f","source":"documentation","title":"PlanetScale CLI commands: role - PlanetScale","url":"https://planetscale.com/docs/cli/role","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale role [command]\n```\n\nExample:\n```text\nexport PLANETSCALE_ORG=\"<org>\"\npscale role list <database> <branch> --format json\n```\n\nExample:\n```text\npscale role create <database> <branch> <name> [flags]\n```\n\nExample:\n```text\npscale role create my-database main api-user --inherited-roles pg_read_all_data --ttl 24h\n```\n\nExample:\n```text\npscale role delete <database> <branch> <role-id> [flags]\n```\n\nExample:\n```text\npscale role delete my-database main role-123 --successor postgres\n```\n\nExample:\n```text\npscale role get <database> <branch> <role-id> [flags]\n```\n\nExample:\n```text\npscale role get my-database main role-123\n```\n\nExample:\n```text\npscale role list <database> <branch> [flags]\n```\n\nExample:\n```text\npscale role list my-database main\n```\n\nExample:\n```text\npscale role reassign <database> <branch> <role-id> --successor <role-id>\n```\n\nExample:\n```text\npscale role reassign my-database main role-123 --successor postgres\n```\n\nExample:\n```text\npscale role renew <database> <branch> <role-id> [flags]\n```\n\nExample:\n```text\npscale role renew my-database main role-123\n```\n\nExample:\n```text\npscale role reset <database> <branch> <role-id> [flags]\n```\n\nExample:\n```text\npscale role reset my-database main role-123\n```\n\nExample:\n```text\npscale role reset-default <database> <branch> [flags]\n```\n\nExample:\n```text\npscale role reset-default my-database main\n```\n\nExample:\n```text\npscale role update <database> <branch> <role-id> [flags]\n```\n\nExample:\n```text\npscale role update my-database main role-123 --name new-role-name\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.502Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":20,"totalLines":104,"estimatedTokens":427}}19{"id":"doc-planetscale_cli_commands_size_planetscale-793a2496","source":"documentation","title":"PlanetScale CLI commands: size - PlanetScale","url":"https://planetscale.com/docs/cli/size","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale size [command]\n```\n\nExample:\n```text\npscale size cluster [command]\n```\n\nExample:\n```text\npscale size cluster list [flags]\n```\n\nExample:\n```text\npscale size cluster list\n```\n\nExample:\n```text\npscale size cluster list --engine mysql\n```\n\nExample:\n```text\npscale size cluster list --engine postgresql\n```\n\nExample:\n```text\npscale size cluster list --org <ORG_NAME>\n```\n\nExample:\n```text\npscale size cluster list --region <REGION_NAME>\n```\n\nExample:\n```text\npscale size cluster list --engine postgresql --region us-east\n```\n\nExample:\n```text\npscale size cluster list --metal\n```\n\nExample:\n```text\npscale size cluster list --engine postgresql --metal\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.503Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":11,"totalLines":58,"estimatedTokens":209}}20{"id":"doc-planetscale_cli_commands_webhook_planetscale-a14f8769","source":"documentation","title":"PlanetScale CLI commands: webhook - PlanetScale","url":"https://planetscale.com/docs/cli/webhook","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale webhook <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale webhook list <DATABASE_NAME> --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\nNo webhooks exist in database <DATABASE_NAME>.\n```\n\nExample:\n```text\nID URL EVENTS ENABLED CREATED AT UPDATED AT\n -------------- ------------------------------------- ------------------------------- --------- ------------ ------------\n abc123xyz https://example.com/webhook branch.ready, branch.sleeping Yes 2 days ago 1 day ago\n```\n\nExample:\n```text\npscale webhook create <DATABASE_NAME> --org <ORGANIZATION_NAME> \\\n --events \"branch.ready,branch.sleeping\" \\\n --url https://example.com/webhook\n```\n\nExample:\n```text\nID URL SECRET EVENTS ENABLED CREATED AT UPDATED AT\n -------------- ------------------------------------- ------------------------------------------------------------------ ------------------------------- --------- ------------ ------------\n abc123xyz https://example.com/webhook 8e46bd50ca092655b1efdfca329f0d79eb976714030a8bfa031397eb0d1cb433 branch.ready, branch.sleeping No now now\n```\n\nExample:\n```text\npscale webhook show <DATABASE_NAME> <WEBHOOK_ID> --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\nID URL SECRET EVENTS ENABLED CREATED AT UPDATED AT\n -------------- ------------------------------------- ------------------------------------------------------------------ ------------------------------- --------- ---------------- ----------------\n abc123xyz https://example.com/webhook b4c29e6ae54a6456496cec7dcbfad7ace6e973a694802de2978b4d6e001fca6e branch.ready, branch.sleeping No 25 seconds ago 25 seconds ago\n```\n\nExample:\n```text\npscale webhook update <DATABASE_NAME> <WEBHOOK_ID> --org <ORGANIZATION_NAME> --enabled\n```\n\nExample:\n```text\nID URL EVENTS ENABLED CREATED AT UPDATED AT\n -------------- ------------------------------------- ------------------------------- --------- -------------- ------------\n abc123xyz https://example.com/webhook branch.ready, branch.sleeping Yes 58 seconds ago now\n```\n\nExample:\n```text\npscale webhook test <DATABASE_NAME> <WEBHOOK_ID> --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\nTest event was successfully sent to webhook <WEBHOOK_ID>.\n```\n\nExample:\n```text\npscale webhook delete <DATABASE_NAME> <WEBHOOK_ID> --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\nWebhook <WEBHOOK_ID> was successfully deleted from <DATABASE_NAME>.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.503Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":14,"totalLines":83,"estimatedTokens":766}}21{"id":"doc-planetscale_cli_commands_traffic_control_planets-57491c35","source":"documentation","title":"PlanetScale CLI commands: traffic-control - PlanetScale","url":"https://planetscale.com/docs/cli/traffic-control","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale traffic-control [command]\n```\n\nExample:\n```text\npscale traffic-control budget [command]\n```\n\nExample:\n```text\npscale traffic-control budget create <database> <branch> [flags]\n```\n\nExample:\n```text\npscale traffic-control budget update <database> <branch> <budget-id> [flags]\n```\n\nExample:\n```text\npscale traffic-control budget show <database> <branch> <budget-id> [flags]\n```\n\nExample:\n```text\npscale traffic-control budget delete <database> <branch> <budget-id> [flags]\n```\n\nExample:\n```text\npscale traffic-control rule [command]\n```\n\nExample:\n```text\npscale traffic-control rule create <database> <branch> <budget-id> [flags]\n```\n\nExample:\n```text\npscale traffic-control rule delete <database> <branch> <budget-id> <rule-id> [flags]\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.503Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":9,"totalLines":48,"estimatedTokens":231}}22{"id":"doc-planetscale_terraform_provider_planetscale-69a92138","source":"documentation","title":"PlanetScale Terraform provider - PlanetScale","url":"https://planetscale.com/docs/terraform","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\nterraform {\n required_providers {\n planetscale = {\n source = \"planetscale/planetscale\"\n version = \"~> 1.3\"\n }\n }\n}\n\n# Manage a branch (the database is created automatically if it does not exist)\nresource \"planetscale_postgres_branch\" \"main\" {\n organization = \"my-org\"\n database = \"my-db\"\n name = \"main\"\n}\n\n# Create application credentials\nresource \"planetscale_postgres_branch_role\" \"app\" {\n organization = \"my-org\"\n database = \"my-db\"\n branch = planetscale_postgres_branch.main.id\n name = \"app\"\n inherited_roles = [\"pg_read_all_data\", \"pg_write_all_data\"]\n}\n\n# Output connection details\noutput \"connection_string\" {\n sensitive = true\n value = \"postgres://${planetscale_postgres_branch_role.app.username}:${planetscale_postgres_branch_role.app.password}@${planetscale_postgres_branch_role.app.access_host_url}/${planetscale_postgres_branch_role.app.database_name}\"\n}\n```\n\nExample:\n```text\nexport PLANETSCALE_SERVICE_TOKEN_ID=\"your-token-id\"\nexport PLANETSCALE_SERVICE_TOKEN=\"your-token\"\nterraform init\nterraform apply\nterraform output -raw connection_string\n```\n\nExample:\n```text\nterraform {\n required_providers {\n planetscale = {\n source = \"planetscale/planetscale\"\n version = \"~> 1.3\"\n }\n }\n}\n\nprovider \"planetscale\" {\n # Credentials are read from environment variables by default:\n # PLANETSCALE_SERVICE_TOKEN_ID\n # PLANETSCALE_SERVICE_TOKEN\n #\n # You can also configure them explicitly (not recommended for production):\n # service_token_id = \"...\"\n # service_token = \"...\"\n}\n```\n\nExample:\n```text\nresource \"planetscale_vitess_branch\" \"app\" {\n organization = \"my-org\"\n database = \"my-vitess-db\"\n name = \"app-main\"\n\n # Optional configuration:\n # cluster_size = \"PS_10\"\n # region = \"us-east-1\" # Region for the branch\n # parent_branch = \"main\" # Fork from an existing branch\n # backup_id = \"...\" # Restore from a specific backup\n}\n\nresource \"planetscale_vitess_branch_password\" \"app_rw\" {\n organization = \"my-org\"\n database = \"my-vitess-db\"\n branch = planetscale_vitess_branch.app.name\n name = \"app-rw\"\n role = \"admin\" # Options: reader, writer, readwriter, admin\n\n # Optional configuration:\n # replica = false # Connect to read replica\n # direct_vtgate = false # Direct VTGate connection\n # ttl = 86400 # Credentials expire after N seconds\n # cidrs = [\"10.0.0.0/8\"] # IP allowlist\n}\n```\n\nExample:\n```text\nresource \"planetscale_postgres_branch\" \"main\" {\n organization = \"my-org\"\n database = \"my-postgres-db\"\n name = \"main\"\n\n # Optional configuration:\n # cluster_size = \"PS_10_AWS_ARM\"\n # region = \"us-east-1\" # Region for the branch\n # parent_branch = \"main\" # Fork from an existing branch\n # major_version = \"18\" # PostgreSQL major version\n # backup_id = \"...\" # Restore from a specific backup\n # restore_point = \"2024-01-01T00:00:00Z\" # Point-in-time recovery (Postgres only)\n\n # parameters = {\n # pgconf = {\n # max_connections = 30\n # shared_preload_libraries = \"pg_cron\"\n # \"cron.max_running_jobs\" = \"2\"\n # }\n # }\n}\n\nresource \"planetscale_postgres_branch_role\" \"app_role\" {\n organization = \"my-org\"\n database = \"my-postgres-db\"\n branch = planetscale_postgres_branch.main.id\n name = \"app_role\"\n\n # Grant permissions by inheriting from built-in Postgres roles\n inherited_roles = [\n \"pg_read_all_data\",\n \"pg_write_all_data\",\n ]\n\n # Optional configuration:\n # ttl = 86400 # Credentials expire after N seconds\n # successor = \"other-role\" # Role to reassign ownership to before dropping\n}\n```\n\nExample:\n```text\nresource \"planetscale_postgres_backup_policy\" \"daily\" {\n organization = \"my-org\"\n database = \"my-postgres-db\"\n name = \"daily-production\"\n target = \"production\"\n frequency_unit = \"day\"\n frequency_value = 1\n retention_unit = \"day\"\n retention_value = 7\n schedule_time = \"03:00\"\n}\n\nresource \"planetscale_postgres_branch_backup\" \"before_release\" {\n organization = \"my-org\"\n database = \"my-postgres-db\"\n branch = planetscale_postgres_branch.main.name\n name = \"before-release\"\n retention_unit = \"day\"\n retention_value = 14\n}\n```\n\nExample:\n```text\nresource \"planetscale_postgres_bouncer\" \"main\" {\n organization = planetscale_postgres_branch.main.organization\n database = planetscale_postgres_branch.main.database\n branch = planetscale_postgres_branch.main.name\n\n name = \"my-bouncer\"\n target = \"primary\" # primary, replica, or replica_az_affinity\n bouncer_size = \"PGB_5\" # Defaults to PGB_5\n replicas_per_cell = 1 # Defaults to 1\n\n parameters = {\n pgbouncer = {\n default_pool_size = \"30\"\n }\n }\n}\n```\n\nExample:\n```text\nresource \"planetscale_postgres_branch\" \"configured\" {\n organization = \"my-org\"\n database = \"my-postgres-db\"\n name = \"configured\"\n\n parameters = {\n pgconf = {\n max_connections = 30\n shared_preload_libraries = \"pg_cron\"\n \"cron.max_running_jobs\" = \"2\"\n }\n }\n}\n```\n\nExample:\n```text\noutput \"postgres_connection\" {\n description = \"Postgres connection details\"\n sensitive = true\n value = {\n host = planetscale_postgres_branch_role.app_role.access_host_url\n username = planetscale_postgres_branch_role.app_role.username\n password = planetscale_postgres_branch_role.app_role.password\n database = planetscale_postgres_branch_role.app_role.database_name\n }\n}\n```\n\nExample:\n```text\noutput \"vitess_connection\" {\n description = \"Vitess connection details\"\n sensitive = true\n value = {\n host = planetscale_vitess_branch_password.app_rw.access_host_url\n username = planetscale_vitess_branch_password.app_rw.username\n password = planetscale_vitess_branch_password.app_rw.plain_text\n }\n}\n```\n\nExample:\n```text\nresource \"planetscale_postgres_branch\" \"feature_auth\" {\n organization = \"my-org\"\n database = \"my-db\"\n name = \"feature-auth\"\n parent_branch = \"main\"\n # cluster_size = \"PS_10_AWS_ARM\" # Optional: specify a larger cluster size\n}\n```\n\nExample:\n```text\nresource \"planetscale_postgres_branch_role\" \"reporting\" {\n organization = \"my-org\"\n database = \"my-db\"\n branch = \"main\"\n name = \"reporting\"\n inherited_roles = [\"pg_read_all_data\"] # Read-only access\n}\n```\n\nExample:\n```text\nresource \"planetscale_postgres_branch_role\" \"ci_runner\" {\n organization = \"my-org\"\n database = \"my-db\"\n branch = \"main\"\n name = \"ci-runner\"\n inherited_roles = [\"pg_read_all_data\", \"pg_write_all_data\"]\n ttl = 3600 # Expires in 1 hour\n}\n```\n\nExample:\n```text\nresource \"planetscale_postgres_redacted_branch_role\" \"app\" {\n organization = \"my-org\"\n database = \"my-db\"\n branch = planetscale_postgres_branch.main.id\n name = \"app\"\n inherited_roles = [\"pg_read_all_data\", \"pg_write_all_data\"]\n}\n```\n\nExample:\n```text\nresource \"planetscale_vitess_branch\" \"production\" {\n organization = \"my-org\"\n database = \"my-vitess-db\"\n name = \"main\"\n\n lifecycle {\n prevent_destroy = true\n }\n}\n```\n\nExample:\n```text\n# Import a Postgres branch\nterraform import planetscale_postgres_branch.main \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"id\": \"branch-id\"}'\n\n# Import a Postgres backup policy\nterraform import planetscale_postgres_backup_policy.daily \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"id\": \"backup-policy-id\"}'\n\n# Import a Postgres branch backup\nterraform import planetscale_postgres_branch_backup.before_release \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"branch\": \"main\", \"id\": \"backup-id\"}'\n\n# Import a Postgres branch role\nterraform import planetscale_postgres_branch_role.app \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"branch\": \"main\", \"id\": \"role-id\"}'\n\n# Import a dedicated PgBouncer\nterraform import planetscale_postgres_bouncer.app \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"branch\": \"main\", \"name\": \"bouncer-name\"}'\n\n# Import a Vitess branch\nterraform import planetscale_vitess_branch.main \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"id\": \"branch-id\"}'\n\n# Import a Vitess backup policy\nterraform import planetscale_vitess_backup_policy.daily \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"id\": \"backup-policy-id\"}'\n\n# Import a Vitess branch backup\nterraform import planetscale_vitess_branch_backup.before_release \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"branch\": \"main\", \"id\": \"backup-id\"}'\n\n# Import a Vitess branch password\nterraform import planetscale_vitess_branch_password.app \\\n '{\"organization\": \"my-org\", \"database\": \"my-db\", \"branch\": \"main\", \"id\": \"password-id\"}'\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.504Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":16,"totalLines":324,"estimatedTokens":2293}}23{"id":"doc-planetscale_documentation_planetscale-c7f54787","source":"documentation","title":"PlanetScale documentation - PlanetScale","url":"https://planetscale.com/docs","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.505Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}24{"id":"doc-postgres_vs_vitess_planetscale-e2e08b3b","source":"documentation","title":"Postgres vs Vitess - PlanetScale","url":"https://planetscale.com/docs/postgres-vs-vitess","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.505Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}25{"id":"doc-planetscale_postgres_planetscale-9a30f93f","source":"documentation","title":"PlanetScale Postgres - PlanetScale","url":"https://planetscale.com/docs/postgres","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.505Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}26{"id":"doc-planetscale_for_vitess_planetscale-d3ca5821","source":"documentation","title":"PlanetScale for Vitess - PlanetScale","url":"https://planetscale.com/docs/vitess","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.505Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}27{"id":"doc-deployment_options_planetscale-c0af221b","source":"documentation","title":"Deployment options - PlanetScale","url":"https://planetscale.com/docs/plans/deployment-options","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.505Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}28{"id":"doc-getting_started_with_planetscale_api_planetscale-8ac37b59","source":"documentation","title":"Getting started with PlanetScale API - PlanetScale","url":"https://planetscale.com/docs/api/reference/getting-started-with-planetscale-api","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.505Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}29{"id":"doc-what_is_planetscale_planetscale-af4b3d6f","source":"documentation","title":"What is PlanetScale? - PlanetScale","url":"https://planetscale.com/docs/what-is-planetscale","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.506Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}30{"id":"doc-stripe_projects_planetscale-e69b8ce6","source":"documentation","title":"Stripe Projects - PlanetScale","url":"https://planetscale.com/docs/connect/stripe-projects","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\nstripe plugin install projects\n```\n\nExample:\n```text\n# Enter into your app directory\ncd my-app\n\n# Initialize a new Stripe project\nstripe projects init\n\n# Add a PlanetScale Postgres database\nstripe projects add planetscale/postgresql\n\n# Or add a PlanetScale MySQL database\nstripe projects add planetscale/mysql\n\n# Sync credentials to your local .env file\nstripe projects env --sync\n```\n\nExample:\n```text\nstripe projects env list\n```\n\nExample:\n```text\nstripe projects env --sync\n```\n\nExample:\n```text\nstripe projects rotate planetscale/postgresql\nstripe projects rotate planetscale/mysql\n```\n\nExample:\n```text\nstripe projects status\n```\n\nExample:\n```text\nstripe projects open planetscale\n```\n\nExample:\n```text\nstripe projects remove planetscale/postgresql\nstripe projects remove planetscale/mysql\n```\n\nExample:\n```text\nstripe projects add planetscale/postgresql \\\n --no-interactive \\\n --json\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.506Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":9,"totalLines":65,"estimatedTokens":269}}31{"id":"doc-planetscale_cli_planetscale-4c983b2b","source":"documentation","title":"PlanetScale CLI - PlanetScale","url":"https://planetscale.com/docs/cli","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\n# Environment variables (recommended for CI and agents)\nexport PLANETSCALE_SERVICE_TOKEN_ID=\"<SERVICE_TOKEN_ID>\"\nexport PLANETSCALE_SERVICE_TOKEN=\"<SERVICE_TOKEN>\"\n\n# Or per-command flags\npscale database list --org <org> \\\n --service-token-id \"<SERVICE_TOKEN_ID>\" \\\n --service-token \"<SERVICE_TOKEN>\"\n```\n\nExample:\n```text\nexport PLANETSCALE_ORG=\"<org>\"\npscale database list --format json # uses PLANETSCALE_ORG\npscale database list --org <org> --format json # explicit flag\n```\n\nExample:\n```text\n# org list\npscale api organizations --format json\n\n# database list / show\npscale api organizations/<org>/databases --format json\npscale api organizations/<org>/databases/<database> --format json\n\n# branch list / show\npscale api organizations/<org>/databases/<database>/branches --format json\npscale api organizations/<org>/databases/<database>/branches/<branch> --format json\n\n# service-token list / show-access (CLI blocked under service-token auth)\npscale api organizations/<org>/service-tokens --format json\npscale api organizations/<org>/service-tokens/<id> --format json\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.509Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":3,"totalLines":40,"estimatedTokens":318}}32{"id":"doc-planetscale_cli_commands_agent_guide_planetscale-a1e95200","source":"documentation","title":"PlanetScale CLI commands: agent-guide - PlanetScale","url":"https://planetscale.com/docs/cli/agent-guide","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale agent-guide --format json\n```\n\nExample:\n```text\npscale agent-guide\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.509Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":13,"estimatedTokens":65}}33{"id":"doc-cloudflare_planetscale-e32e05d6","source":"documentation","title":"Cloudflare - PlanetScale","url":"https://planetscale.com/docs/connect/cloudflare","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.509Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}34{"id":"doc-cluster_sizes_planetscale-d104f4b3","source":"documentation","title":"Cluster sizes - PlanetScale","url":"https://planetscale.com/docs/plans/planetscale-skus","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.509Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}35{"id":"doc-selecting_a_region_planetscale-6447fa1b","source":"documentation","title":"Selecting a region - PlanetScale","url":"https://planetscale.com/docs/plans/regions","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region us-west\n```\n\nExample:\n```text\npscale branch create my-production-database add-tables --region eu-west\n```\n\nExample:\n```text\npscale database dump <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\npscale database restore-dump <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\npscale branch promote <DATABASE_NAME> <BRANCH_NAME>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.510Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":28,"estimatedTokens":141}}36{"id":"doc-planetscale_plans_planetscale-dda4b54e","source":"documentation","title":"PlanetScale plans - PlanetScale","url":"https://planetscale.com/docs/planetscale-plans","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.510Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}37{"id":"doc-how_planetscale_uses_ai_planetscale-ce024d40","source":"documentation","title":"How PlanetScale uses AI - PlanetScale","url":"https://planetscale.com/docs/how-we-use-ai","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.510Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":0,"totalLines":3,"estimatedTokens":41}}38{"id":"doc-planetscale_postgres_with_laravel_planetscale-97661921","source":"documentation","title":"PlanetScale Postgres with Laravel - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-laravel","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\npscale role reset-default <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\nDB_CONNECTION=pgsql\nDB_HOST=<host>\nDB_PORT=<port>\nDB_DATABASE=<database>\nDB_USERNAME=<username>\nDB_PASSWORD=<password>\n```\n\nExample:\n```text\nuse Illuminate\\Support\\Facades\\DB;\nuse Illuminate\\Support\\Facades\\Route;\n\nRoute::get('/test-database', function () {\n try {\n DB::connection()->getPdo();\n print_r(\"Connected successfully to: \" . DB::connection()->getDatabaseName());\n } catch (\\Exception $e) {\n die(\"Could not connect to the database. Please check your configuration. Error: \" . $e);\n }\n});\n```\n\nExample:\n```text\nphp artisan serve\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.511Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":11,"totalLines":73,"estimatedTokens":297}}39{"id":"doc-planetscale_postgres_with_drizzle_planetscale-85612e20","source":"documentation","title":"PlanetScale Postgres with Drizzle - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-drizzle","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\npscale role reset-default <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\nnpm install drizzle-orm pg\n```\n\nExample:\n```text\nnpm install dotenv\n```\n\nExample:\n```text\nDATABASE_URL='postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=verify-full'\n```\n\nExample:\n```text\nimport 'dotenv/config'\nimport { drizzle } from 'drizzle-orm/node-postgres'\n\nexport const db = drizzle(process.env.DATABASE_URL)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.511Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":12,"totalLines":66,"estimatedTokens":239}}40{"id":"doc-planetscale_environment_set_up_planetscale-e2d924e9","source":"documentation","title":"PlanetScale environment set up - PlanetScale","url":"https://planetscale.com/docs/cli/planetscale-environment-setup","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\nbrew -v\n```\n\nExample:\n```text\nbrew install pscale\n```\n\nExample:\n```text\nbrew install mysql-client\n```\n\nExample:\n```text\nbrew install postgresql@17\n```\n\nExample:\n```text\nbrew upgrade pscale\n```\n\nExample:\n```text\nsudo apt-get install mysql-client\n```\n\nExample:\n```text\nsudo yum install community-mysql\n```\n\nExample:\n```text\nsudo apt-get install postgresql-client\n```\n\nExample:\n```text\nsudo yum install postgresql\n```\n\nExample:\n```text\nscoop bucket add pscale https://github.com/planetscale/scoop-bucket.git\nscoop install pscale mysql postgresql\n```\n\nExample:\n```text\nscoop update pscale\n```\n\nExample:\n```text\n$env:path += \";C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\"\n```\n\nExample:\n```text\n$env:path += \";C:\\Program Files\\PostgreSQL\\17\\bin\"\n```\n\nExample:\n```text\nbin install https://github.com/planetscale/cli\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale --help\n```\n\nExample:\n```text\npscale version\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.511Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":17,"totalLines":89,"estimatedTokens":277}}41{"id":"doc-planetscale_postgres_quickstart_planetscale-2741e033","source":"documentation","title":"PlanetScale Postgres quickstart - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-quickstart","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\npscale role reset-default <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\npostgresql://postgres.{branch-id}:{password}@{host}.horizon.psdb.cloud:5432/postgres?sslmode=verify-full\n```\n\nExample:\n```text\npsql 'host={host} port=5432 user={user} password={password} dbname=postgres sslnegotiation=direct sslmode=verify-full sslrootcert=system'\n```\n\nExample:\n```text\nconst { Client } = require('pg');\nconst client = new Client({\n host: '{host}',\n port: 5432,\n user: '{user}',\n password: '{your-password}',\n database: 'postgres',\n ssl: { rejectUnauthorized: true }\n});\n```\n\nExample:\n```text\nplanetscale:\n username: {user}\n host: {host}\n port: 5432\n database: postgres\n password: {your-password}\n```\n\nExample:\n```text\npostgres=> \\l\n List of databases\n Name | Owner | Removed columns...\n------------------+------------------+-------------------\n postgres | postgres | ...\n pscale_admin | pscale_admin | ...\n pscale_exporter | pscale_admin | ...\n pscale_pgbouncer | pscale_admin | ...\n template0 | pscale_admin | ...\n template1 | pscale_superuser | ...\n(6 rows)\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.512Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":13,"totalLines":91,"estimatedTokens":425}}42{"id":"doc-planetscale_postgres_with_kysely_planetscale-9fc9808a","source":"documentation","title":"PlanetScale Postgres with Kysely - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-kysely","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\npscale role reset-default <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\nnpm install kysely pg\n```\n\nExample:\n```text\nnpm install dotenv\n```\n\nExample:\n```text\nDATABASE_URL='postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=verify-full'\n```\n\nExample:\n```text\nimport 'dotenv/config'\n\nimport { Kysely, PostgresDialect } from 'kysely'\nimport { Pool } from 'pg'\nimport { Database } from './types.ts' // you set this up locally\n\nconst db = new Kysely<Database>({\n dialect: new PostgresDialect({\n pool: new Pool({\n connectionString: process.env.DATABASE_URL,\n database: 'postgres'\n })\n })\n})\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.512Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":12,"totalLines":76,"estimatedTokens":292}}43{"id":"doc-planetscale_cli_commands_connect_planetscale-86f65b55","source":"documentation","title":"PlanetScale CLI commands: connect - PlanetScale","url":"https://planetscale.com/docs/cli/connect","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale connect <DATABASE_NAME> <BRANCH_NAME> <FLAG>\n```\n\nExample:\n```text\npscale connect <DATABASE_NAME> <BRANCH_NAME> --execute 'node app.js'\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.512Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":13,"estimatedTokens":82}}44{"id":"doc-planetscale_postgres_with_bun_planetscale-db70bf71","source":"documentation","title":"PlanetScale Postgres with Bun - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-bun","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\npscale role reset-default <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\nbun init\n```\n\nExample:\n```text\nDATABASE_URL='postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=verify-full'\n```\n\nExample:\n```text\nimport { sql } from 'bun'\n\nconst now = await sql`\n SELECT NOW()\n`\n\nconsole.log(now)\n```\n\nExample:\n```text\nbun index.ts\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.513Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":12,"totalLines":69,"estimatedTokens":222}}45{"id":"doc-planetscale_postgres_with_prisma_planetscale-b10dab6f","source":"documentation","title":"PlanetScale Postgres with Prisma - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-prisma","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\npscale role reset-default <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\nnpm install prisma\n```\n\nExample:\n```text\nnpx prisma init\n```\n\nExample:\n```text\nDATABASE_URL='postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=verify-full'\n```\n\nExample:\n```text\ngenerator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n```\n\nExample:\n```text\nimport 'dotenv/config'\nimport { defineConfig, env } from 'prisma/config'\n\nexport default defineConfig({\n schema: 'prisma/schema.prisma',\n migrations: {\n path: 'prisma/migrations',\n },\n datasource: {\n url: env('DATABASE_URL'),\n },\n})\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.513Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":13,"totalLines":86,"estimatedTokens":303}}46{"id":"doc-planetscale_postgres_with_cloudflare_workers_pla-5ebcda26","source":"documentation","title":"PlanetScale Postgres with Cloudflare Workers - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-cloudflare-workers","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\nnpm create cloudflare@latest -- --template=cloudflare/templates/postgres-hyperdrive-template\n```\n\nExample:\n```text\nnpx wrangler hyperdrive create <hyperdrive-name> --connection-string=\"mysql://<username>:<password>@<host>/<database>\"\n```\n\nExample:\n```text\nnpx wrangler hyperdrive create <hyperdrive-name> --connection-string=\"postgresql://<username>:<password>@<host>:<port>/<database>?sslmode=verify-full\"\n```\n\nExample:\n```text\n{\n \"hyperdrive\": [\n {\n \"binding\": \"HYPERDRIVE\",\n \"id\": \"<your-hyperdrive-id-here>\"\n }\n ]\n}\n```\n\nExample:\n```text\n{\n \"placement\": {\n \"region\": \"aws:us-east-1\"\n }\n}\n```\n\nExample:\n```text\n{\n \"placement\": {\n \"mode\": \"smart\"\n }\n}\n```\n\nExample:\n```text\nnpx wrangler deploy\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.514Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":14,"totalLines":88,"estimatedTokens":316}}47{"id":"doc-planetscale_postgres_with_node_js_planetscale-c920c4b2","source":"documentation","title":"PlanetScale Postgres with Node.js - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-node","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\npscale role reset-default <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\nnpm install pg\n```\n\nExample:\n```text\nnpm install dotenv\n```\n\nExample:\n```text\nDATABASE_URL='postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=verify-full'\n```\n\nExample:\n```text\nrequire('dotenv').config()\n\nconst { Client } = require('pg')\n\n// The connection string carries the host, credentials, and database. The `ssl`\n// option verifies PlanetScale's certificate against your system's CA store,\n// equivalent to sslmode=verify-full.\nconst client = new Client({\n connectionString: process.env.DATABASE_URL,\n ssl: { rejectUnauthorized: true },\n})\n\nasync function main() {\n await client.connect()\n console.log('Connected to PostgreSQL!')\n\n // Read smoke test — works with any role that has pg_read_all_data.\n const now = await client.query('SELECT NOW()')\n console.log(now.rows[0])\n\n // Write/DDL smoke test — creates a table in the `public` schema of the\n // `postgres` database. This requires CREATE on the schema (see the note below).\n await client.query('CREATE TABLE IF NOT EXISTS smoke_test (id serial PRIMARY KEY, created_at timestamptz DEFAULT now())')\n await client.query('INSERT INTO smoke_test DEFAULT VALUES')\n const rows = await client.query('SELECT count(*) FROM smoke_test')\n console.log(`smoke_test rows: ${rows.rows[0].count}`)\n\n await client.end()\n}\n\nmain().catch((err) => {\n console.error('Database error', err)\n process.exit(1)\n})\n```\n\nExample:\n```text\nnode index.js\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.514Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":13,"totalLines":101,"estimatedTokens":510}}48{"id":"doc-planetscale_postgres_with_ruby_on_rails_planetsc-d2d50cdc","source":"documentation","title":"PlanetScale Postgres with Ruby on Rails - PlanetScale","url":"https://planetscale.com/docs/postgres/tutorials/planetscale-postgres-rails","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale --version\n```\n\nExample:\n```text\npscale signup\n```\n\nExample:\n```text\npscale auth login\n```\n\nExample:\n```text\npscale org list\n```\n\nExample:\n```text\npscale org switch <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale region list\n```\n\nExample:\n```text\npscale database create <DATABASE_NAME> --region <REGION_SLUG> --engine postgres\n```\n\nExample:\n```text\npscale role reset-default <DATABASE_NAME> <BRANCH_NAME>\n```\n\nExample:\n```text\ngem \"pg\"\n```\n\nExample:\n```text\nbundle install\n```\n\nExample:\n```text\nrails credentials:edit --environment production\n```\n\nExample:\n```text\nplanetscale:\n username: <username>\n host: <host>\n port: <port>\n database: <database>\n password: <password>\n```\n\nExample:\n```text\nproduction:\n <<: *default\n adapter: postgresql\n username: <%= Rails.application.credentials.planetscale&.fetch(:username) %>\n password: <%= Rails.application.credentials.planetscale&.fetch(:password) %>\n database: <%= Rails.application.credentials.planetscale&.fetch(:database) %>\n host: <%= Rails.application.credentials.planetscale&.fetch(:host) %>\n port: <%= Rails.application.credentials.planetscale&.fetch(:port) %>\n sslmode: verify-full\n```\n\nExample:\n```text\nRAILS_ENV=production rails db:migrate\n```\n\nExample:\n```text\nRAILS_ENV=production rails console\n> User.first\n```\n\nExample:\n```text\nrails db:migrate\n```\n\nExample:\n```text\ngem \"strong_migrations\"\n```\n\nExample:\n```text\nbundle install\nrails generate strong_migrations:install\n```\n\nExample:\n```text\nTotal connections = Puma workers × Puma threads\n```\n\nExample:\n```text\n4 workers × 5 threads = 20 connections\n```\n\nExample:\n```text\nTotal = (Puma workers × threads) + (Sidekiq processes × Sidekiq concurrency)\n```\n\nExample:\n```text\nproduction:\n <<: *default\n pool: <%= ENV.fetch(\"RAILS_MAX_THREADS\") { 5 } %>\n # ... other settings\n```\n\nExample:\n```text\nplanetscale:\n port: 6432\n # ... other settings\n```\n\nExample:\n```text\nproduction:\n <<: *default\n adapter: postgresql\n username: <%= Rails.application.credentials.planetscale&.fetch(:username) %>\n password: <%= Rails.application.credentials.planetscale&.fetch(:password) %>\n database: <%= Rails.application.credentials.planetscale&.fetch(:database) %>\n host: <%= Rails.application.credentials.planetscale&.fetch(:host) %>\n port: <%= ENV.fetch(\"DATABASE_PORT\") { Rails.application.credentials.planetscale&.fetch(:port) } %>\n sslmode: verify-full\n```\n\nExample:\n```text\nDATABASE_PORT=5432 RAILS_ENV=production rails db:migrate\n```\n\nExample:\n```text\nDATABASE_URL=postgresql://postgres.<branch_id>%7Creplica:pscale_pw_xxx@<host>:5432/<database>?sslmode=verify-full&sslrootcert=/etc/ssl/certs/ca-certificates.crt\n```\n\nExample:\n```text\nproduction:\n primary:\n <<: *default\n adapter: postgresql\n username: <%= Rails.application.credentials.planetscale&.fetch(:username) %>\n password: <%= Rails.application.credentials.planetscale&.fetch(:password) %>\n database: <%= Rails.application.credentials.planetscale&.fetch(:database) %>\n host: <%= Rails.application.credentials.planetscale&.fetch(:host) %>\n port: 5432\n sslmode: verify-full\n primary_replica:\n <<: *default\n adapter: postgresql\n username: <%= Rails.application.credentials.planetscale&.fetch(:username) %>|replica\n password: <%= Rails.application.credentials.planetscale&.fetch(:password) %>\n database: <%= Rails.application.credentials.planetscale&.fetch(:database) %>\n host: <%= Rails.application.credentials.planetscale&.fetch(:host) %>\n port: 5432\n sslmode: verify-full\n replica: true\n```\n\nExample:\n```text\nclass ApplicationRecord < ActiveRecord::Base\n primary_abstract_class\n\n connects_to database: { writing: :primary, reading: :primary_replica }\nend\n```\n\nExample:\n```text\nclass UsersController < ApplicationController\n def index\n # This query runs against the replica\n @users = ActiveRecord::Base.connected_to(role: :reading) do\n User.where(active: true).order(:created_at)\n end\n end\nend\n```\n\nExample:\n```text\nclass PostsController < ApplicationController\n def create\n @post = Post.create!(post_params)\n # Read from primary to avoid stale data\n redirect_to @post\n end\nend\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.515Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":30,"totalLines":217,"estimatedTokens":1082}}49{"id":"doc-planetscale_cli_commands_import_planetscale-4d015ebc","source":"documentation","title":"PlanetScale CLI commands: import - PlanetScale","url":"https://planetscale.com/docs/cli/import","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale import d1 <SUB-COMMAND> <FLAG>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.515Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":1,"totalLines":8,"estimatedTokens":56}}50{"id":"doc-planetscale_cli_commands_completion_planetscale-351c24b8","source":"documentation","title":"PlanetScale CLI commands: completion - PlanetScale","url":"https://planetscale.com/docs/cli/completion","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale completion <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\nsource <(pscale completion bash)\n\n# To load completions for each session, execute once:\n# Linux:\npscale completion bash > /etc/bash_completion.d/pscale\n# macOS:\npscale completion bash > /usr/local/etc/bash_completion.d/pscale\n```\n\nExample:\n```text\n# If shell completion is not already enabled in your environment,\n# you will need to enable it. You can execute the following once:\n\necho \"autoload -U compinit; compinit\" >> ~/.zshrc\n\n# To load completions for each session, execute once:\npscale completion zsh > \"${fpath[1]}/_yourprogram\"\n\n# You will need to start a new shell for this setup to take effect.\n```\n\nExample:\n```text\npscale completion fish | source\n\n# To load completions for each session, execute once:\npscale completion fish > ~/.config/fish/completions/pscale.fish\n```\n\nExample:\n```text\npscale completion powershell | Out-String | Invoke-Expression\n\n# To load completions for every new session, run:\npscale completion powershell > pscale.ps1\n# and source this file from your PowerShell profile.\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.516Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":49,"estimatedTokens":314}}51{"id":"doc-planetscale_cli_commands_inspect_planetscale-e6e96367","source":"documentation","title":"PlanetScale CLI commands: inspect - PlanetScale","url":"https://planetscale.com/docs/cli/inspect","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale inspect <check> <database> <branch> --org <org> <FLAG>\n```\n\nExample:\n```text\npscale inspect table-sizes <database> <branch> --org <org>\npscale inspect locks <database> <branch> --org <org> --format json\npscale inspect unused-indexes <database> <branch> --org <org> --format csv\n```\n\nExample:\n```text\npscale inspect all <database> <branch> --org <org>\npscale inspect all <database> <branch> --org <org> --format json\n```\n\nExample:\n```text\npscale inspect table-sizes <database> <branch> --org <org> --keyspace commerce/-80\n```\n\nExample:\n```text\npscale inspect table-sizes <database> <branch> --org <org> --dbname myapp --role admin\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.516Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":5,"totalLines":31,"estimatedTokens":205}}52{"id":"doc-planetscale_cli_commands_maintenance_planetscale-06e2a7e5","source":"documentation","title":"PlanetScale CLI commands: maintenance - PlanetScale","url":"https://planetscale.com/docs/cli/maintenance","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale maintenance <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale maintenance list <DATABASE_NAME> --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale maintenance show <DATABASE_NAME> <SCHEDULE_ID> --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\npscale maintenance windows <DATABASE_NAME> <SCHEDULE_ID> --org <ORGANIZATION_NAME>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.516Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":23,"estimatedTokens":130}}53{"id":"doc-planetscale_cli_commands_deploy_request_planetsc-dfbee062","source":"documentation","title":"PlanetScale CLI commands: deploy-request - PlanetScale","url":"https://planetscale.com/docs/cli/deploy-request","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale deploy-request <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale deploy-request review <DATABASE_NAME> 1 --comment 'Lets wait on this.'\n```\n\nExample:\n```text\npscale deploy-request force-cutover <DATABASE_NAME> <DR_NUMBER>\n```\n\nExample:\n```text\npscale deploy-request throttler update <DATABASE_NAME> <DR_NUMBER> --ratio 25\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.517Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":4,"totalLines":23,"estimatedTokens":128}}54{"id":"doc-planetscale_cli_commands_keyspace_planetscale-df185b45","source":"documentation","title":"PlanetScale CLI commands: keyspace - PlanetScale","url":"https://planetscale.com/docs/cli/keyspace","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale keyspace <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale keyspace read-only-regions <DATABASE_NAME> <BRANCH_NAME> <KEYSPACE_NAME>\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.517Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":2,"totalLines":13,"estimatedTokens":81}}55{"id":"doc-planetscale_cli_commands_mcp_planetscale-750fe86f","source":"documentation","title":"PlanetScale CLI commands: mcp - PlanetScale","url":"https://planetscale.com/docs/cli/mcp","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\nhttps://mcp.pscale.dev/mcp/planetscale\n```\n\nExample:\n```text\npscale mcp <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale mcp install --target <TARGET> --format json\n```\n\nExample:\n```text\npscale mcp install --target cursor --format json\n```\n\nExample:\n```text\n{\n \"status\": \"ok\",\n \"target\": \"cursor\",\n \"hosted_mcp_url\": \"https://mcp.pscale.dev/mcp/planetscale\",\n \"message\": \"Hosted MCP server configured for cursor\"\n}\n```\n\nExample:\n```text\npscale mcp install --target claude-code --format json\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.517Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":6,"totalLines":38,"estimatedTokens":170}}56{"id":"doc-planetscale_cli_commands_audit_log_planetscale-e28f657e","source":"documentation","title":"PlanetScale CLI commands: audit log - PlanetScale","url":"https://planetscale.com/docs/cli/audit-log","text":"Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.\n\nExample:\n```text\npscale audit-log <SUB-COMMAND> <FLAG>\n```\n\nExample:\n```text\npscale audit-log auth-attempts download [flags]\n```\n\nExample:\n```text\npscale audit-log list --org <ORGANIZATION_NAME>\n```\n\nExample:\n```text\nID (25) ACTOR (25) ACTION EVENT REMOTE IP LOCATION CREATED AT\n------------- ----------- ------------------------ ------------------------ --------------- ---------------- ------------\nxxxxxxxxxx Name Open_web_console main branch.open_web_console xxx.xxx.xxx.x Los Angeles, CA 1 day ago\n```\n\nExample:\n```text\npscale audit-log list --limit 5 --starting-after <ID>\n```\n\nExample:\n```text\npscale audit-log auth-attempts download --since 24h --output auth-attempts.zip\n```\n\nExample:\n```text\nGenerating authentication-attempt export for <ORGANIZATION_NAME>...\nSuccessfully downloaded auth attempts (csv) to auth-attempts.zip\n```\n\nExample:\n```text\npscale audit-log auth-attempts download --since 7d \\\n --source-ip 203.0.113.10 --outcome deny --output suspect-ip.zip\n```\n\nExample:\n```text\npscale audit-log auth-attempts download --since 7d \\\n --username app_readonly --outcome deny --output credential.zip\n```\n\nExample:\n```text\npscale audit-log auth-attempts download \\\n --start-at 2026-07-29T00:00:00Z --end-at 2026-07-30T00:00:00Z \\\n --export-format parquet --output window.zip\n```\n\nExample:\n```text\npscale audit-log auth-attempts download --since 24h --output - > report.zip\n```\n\n<|endofdoc|>","metadata":{"transformedAt":"2026-08-18T15:18:07.517Z","totalSectionsIncluded":1,"totalCodeBlocksIncluded":11,"totalLines":65,"estimatedTokens":407}}57 