← 返回
开发者工具 Key 中文

Planetscale Cli Skills

Comprehensive PlanetScale CLI (pscale) command reference and workflows for database management via terminal. Use when user mentions PlanetScale CLI, pscale c...
全面的 PlanetScale CLI (pscale) 命令参考和工作流,用于通过终端管理数据库。当用户提及 PlanetScale CLI、pscale 等时使用。
vince-winkintel vince-winkintel 来源
开发者工具 clawhub v1.0.3 2 版本 99905.9 Key: 需要
★ 2
Stars
📥 1,022
下载
💾 13
安装
2
版本
#latest

概述

PlanetScale CLI Skills

Comprehensive pscale command reference and workflows for managing PlanetScale databases via terminal.

Overview

The PlanetScale CLI brings database branches, deploy requests, and schema migrations to your fingertips. This skill provides command references, automation scripts, and decision trees for all pscale operations.

Sub-Skills

CommandSkillUse When
--------------------------
authpscale-authLogin, logout, service tokens, authentication management
branchpscale-branchCreate, delete, promote, diff, list database branches
deploy-requestpscale-deploy-requestCreate, review, deploy, revert schema changes
databasepscale-databaseCreate, list, show, delete databases
backuppscale-backupCreate, list, show, delete branch backups
passwordpscale-passwordCreate, list, delete connection passwords
orgpscale-orgList, show, switch organizations
service-tokenpscale-service-tokenCreate, manage CI/CD service tokens

Decision Trees

Should I use a branch or deploy request?

What's your goal?
├─ Experimenting with schema changes → Create branch (pscale-branch)
├─ Testing schema in isolation → Create branch (pscale-branch)
├─ Ready to deploy schema to production → Create deploy request (pscale-deploy-request)
└─ Reviewing schema changes before production → Review deploy request (pscale-deploy-request)

Service token vs password?

What's your use case?
├─ CI/CD pipeline → Service token (pscale-service-token)
├─ Local development → Password (pscale-password)
├─ Production application → Service token (rotatable, secure)
└─ One-off admin task → Password (temporary)

Direct promotion vs deploy request?

Production readiness?
├─ Immediate promotion (dangerous) → pscale branch promote (pscale-branch)
├─ Review + approval workflow → pscale deploy-request create (pscale-deploy-request)
└─ Safe production deployment → Always use deploy requests

Common Workflows

Schema Migration Workflow

Complete workflow from branch creation to production deployment:

# 1. Create development branch
pscale branch create <database> <branch-name>

# 2. Make schema changes (via shell, ORM, or direct SQL)
pscale shell <database> <branch-name>

# 3. View schema diff
pscale branch diff <database> <branch-name>

# 4. Create deploy request
pscale deploy-request create <database> <branch-name>

# 5. Review and deploy
pscale deploy-request deploy <database> <deploy-request-number>

# 6. Verify deployment
pscale deploy-request show <database> <deploy-request-number>

See scripts/ directory for automation.

Branch Development Workflow

# Create branch from main
pscale branch create <database> <feature-branch> --from main

# Work on schema changes
pscale shell <database> <feature-branch>

# Check diff before deploying
pscale branch diff <database> <feature-branch>

# Create deploy request when ready
pscale deploy-request create <database> <feature-branch>

CI/CD Integration

# Create service token for CI/CD
pscale service-token create --org <org>

# Use in CI/CD pipelines (GitHub Actions, GitLab CI, etc.)
export PLANETSCALE_SERVICE_TOKEN_ID=<token-id>
export PLANETSCALE_SERVICE_TOKEN=<token>

# Deploy via CI/CD
pscale deploy-request create <database> <branch> --auto-approve

Quick Reference

Most Common Commands

# Authentication
pscale auth login
pscale auth logout

# Branch management
pscale branch create <database> <branch> [--from <source-branch>]
pscale branch list <database>
pscale branch delete <database> <branch>

# Deploy requests
pscale deploy-request create <database> <branch>
pscale deploy-request list <database>
pscale deploy-request deploy <database> <number>

# Database operations
pscale database create <database> --org <org>
pscale database list
pscale shell <database> <branch>

Related Skills

  • drizzle-kit - ORM schema management and migrations
  • gitlab-cli-skills - GitLab MR workflow integration
  • github - GitHub PR and CI/CD integration

Automation Scripts

See scripts/ directory for token-efficient automation:

  • create-branch-for-mr.sh - Create PlanetScale branch matching your MR/PR branch name
  • deploy-schema-change.sh - Complete schema migration workflow
  • sync-branch-with-main.sh - Sync development branch with main

Scripts execute without loading into context (~90% token savings).

Resources

  • Official docs: https://planetscale.com/docs/reference/planetscale-cli
  • GitHub: https://github.com/planetscale/cli
  • Community: https://github.com/planetscale/discussion

版本历史

共 2 个版本

  • v1.0.3 当前
    2026-06-14 22:55
  • v1.0.2
    2026-03-29 03:58 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,722
dev-programming

Gitlab Cli Skills

vince-winkintel
全面的 GitLab CLI (glab) 命令参考和工作流,涵盖所有 GitLab 操作。适用于处理合并请求、CI/CD 流水线、问题、发布等场景。
★ 8 📥 6,210
it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,811