id = "pscale" name = "PlanetScale CLI" homepage = "https://github.com/planetscale/cli" description = "The pscale command line tool brings branches, deploy requests, and other PlanetScale concepts to your fingertips." icon = "SimpleIcons:planetscale" executables = ["pscale"] [dotfiles] # internal/config/config.go: `defaultConfigPath = "~/.config/planetscale"` and # `configName = "pscale.yml"`, joined by `DefaultConfigPath()`. # internal/config/global.go, `FileConfig`, is what gets written there: `org`, # `database` and `branch` as YAML — the organization `pscale org switch` put in # focus and the default database and branch. The `.pscale.yml` the same file # names is the project copy, written at the root of a git repository, so it is # not user-level. paths = ["~/.config/planetscale/pscale.yml"] exclude = [] # internal/config/config.go: `keyringKey = "access-token"` and # `accessTokenPath()` = ConfigDir()/access-token. `pscale auth login` prefers # the OS keyring, but on a machine with no keyring backend # `writeAccessTokenPath` drops the raw OAuth token into that file at mode 0600. # The whole file is the token. secret = ["~/.config/planetscale/access-token"] # Read once per command; no resident process holds it. side_effect = false # No machine_lines: org, database and branch describe the user's PlanetScale # account, not the machine they are typing on. [commands] format = 1 label = "PlanetScale CLI" description = "Use the subcommand tabs to create databases and branches or open a local connection. Other commands and authentication options are left out." quality = "ai-draft" base = "fig:pscale" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pscale.ts" license = "MIT" [[commands.subcommand]] path = ["database", "create"] label = "Create a database" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pscale.ts" license = "MIT" [[commands.subcommand.field]] id = "database" label = "Database name" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "region" label = "Region" description = "Region for the database." type = "string" option = ["--region"] sources = ["fig"] [[commands.subcommand.field]] id = "notes" label = "Notes" type = "string" option = ["--notes"] sources = ["fig"] [[commands.subcommand.field]] id = "web" label = "Open in browser" type = "boolean" option = ["--web"] sources = ["fig"] [[commands.subcommand.field]] id = "format" label = "Output format" type = "string" option = ["--format", "-f"] suggestions = [{ value = "human", label = "Human" }, { value = "json", label = "JSON" }, { value = "csv", label = "CSV" }] sources = ["fig"] [[commands.subcommand.task]] id = "create" label = "Create database" fields = ["database", "region", "notes"] required = ["database"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["database", "region", "notes"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["web", "format"] [[commands.subcommand]] path = ["branch", "create"] label = "Create a branch" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pscale.ts" license = "MIT" [[commands.subcommand.field]] id = "database" label = "Source database" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "branch" label = "New branch" type = "string" position = 1 sources = ["fig"] [[commands.subcommand.field]] id = "from" label = "From branch" description = "Branch to be created from." type = "string" option = ["--from"] sources = ["fig"] [[commands.subcommand.field]] id = "region" label = "Region" type = "string" option = ["--region"] sources = ["fig"] [[commands.subcommand.field]] id = "restore" label = "Backup to restore" type = "string" option = ["--restore"] sources = ["fig"] [[commands.subcommand.field]] id = "web" label = "Open in browser" type = "boolean" option = ["--web", "-w"] sources = ["fig"] [[commands.subcommand.task]] id = "create" label = "Create branch" fields = ["database", "branch", "from"] required = ["database", "branch"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["database", "branch", "from"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["region", "restore", "web"] [[commands.subcommand]] path = ["connect"] label = "Connect locally" description = "Open a secure local proxy to a database branch." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pscale.ts" license = "MIT" [[commands.subcommand.field]] id = "database" label = "Database" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "branch" label = "Branch" type = "string" position = 1 sources = ["fig"] [[commands.subcommand.field]] id = "port" label = "Local port" type = "string" option = ["--port"] sources = ["fig"] [[commands.subcommand.field]] id = "host" label = "Local host" type = "string" option = ["--host"] sources = ["fig"] [[commands.subcommand.field]] id = "org" label = "Organization" type = "string" option = ["--org"] sources = ["fig"] [[commands.subcommand.field]] id = "execute" label = "Command to run after connecting" type = "string" option = ["--execute"] sources = ["fig"] [[commands.subcommand.task]] id = "proxy" label = "Open proxy" fields = ["database", "branch", "port"] required = ["database", "branch"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["database", "branch", "port", "host", "org", "execute"]