- I wrote a scripts to copy and generate all commands missing in iris from fig repo: https://github.com/withfig/autocomplete - Add a new script to generate commands docs about which commands currently are inside commands folder 377d4aac663590e504fe39a92eb4dac4cbd333b2 - Add more icons e64d4e70a1db61e62053460a882e093bd6373ab1
80 lines
5.2 KiB
Go
80 lines
5.2 KiB
Go
package ops
|
|
|
|
import (
|
|
"github.com/versenilvis/iris/commands/core"
|
|
)
|
|
|
|
func init() {
|
|
core.Register(&core.Spec{
|
|
Name: "pscale",
|
|
Description: "The client ID for the PlanetScale CLI application",
|
|
Subcommands: []core.Subcommand{
|
|
{Name: "audit-log", Description: "List audit logs"},
|
|
{Name: "list", Description: "List all audit logs of an organization"},
|
|
{Name: "auth", Description: "Login and logout via the PlanetScale API"},
|
|
{Name: "login", Description: "Authenticate with the PlanetScale API"},
|
|
{Name: "logout", Description: "Log out of the PlanetScale API"},
|
|
{Name: "backup", Description: "Create, list, show, and delete branch backups"},
|
|
{Name: "create", Description: "Backup a branch's data and schema"},
|
|
{Name: "delete", Description: "Delete a branch backup"},
|
|
{Name: "restore", Description: "Restore a backup to a new branch"},
|
|
{Name: "show", Description: "Show a specific backup of a branch"},
|
|
{Name: "branch", Description: "Create, delete, diff, and manage branches"},
|
|
{Name: "diff", Description: "Show the diff of a branch"},
|
|
{Name: "promote", Description: "Promote a new branch from a database"},
|
|
{Name: "refresh-schema", Description: "Refresh the schema for a database branch"},
|
|
{Name: "schema", Description: "Show the schema of a branch"},
|
|
{Name: "switch", Description: "Switches the current project to use the specified branch"},
|
|
{Name: "completion", Description: "Generate completion script for your shell"},
|
|
{Name: "connect", Description: "Create a secure connection to a database and branch for a local client"},
|
|
{Name: "database", Description: "Create, read, delete, and dump/restore databases"},
|
|
{Name: "dump", Description: "Backup and dump your database"},
|
|
{Name: "restore-dump", Description: "Restore your database from a local dump directory"},
|
|
{Name: "deploy-request", Description: "Create, review, diff, and manage deploy requests"},
|
|
{Name: "close", Description: "Close a deploy request"},
|
|
{Name: "deploy", Description: "Deploy a specific deploy request"},
|
|
{Name: "review", Description: "Review a deploy request (approve, comment, etc...)"},
|
|
{Name: "help", Description: "Help about any command"},
|
|
{Name: "org", Description: "List, show, and switch organizations"},
|
|
{Name: "password", Description: "Create, list, and delete branch passwords"},
|
|
{Name: "region", Description: "List regions"},
|
|
{Name: "service-token", Description: "Create, list, and manage access for service tokens"},
|
|
{Name: "add-access", Description: "Ddd access to a service token in the organization"},
|
|
{Name: "delete-access", Description: "Delete access granted to a service token in the organization"},
|
|
{Name: "show-access", Description: "Fetch a service token and it's accesses"},
|
|
{Name: "shell", Description: "Open a MySQL shell instance to a database and branch"},
|
|
{Name: "signup", Description: "Signup for a new PlanetScale account"},
|
|
},
|
|
Options: []core.Option{
|
|
{Name: "--client-id", Description: "The client ID for the PlanetScale CLI application"},
|
|
{Name: "--client-secret", Description: "The client ID for the PlanetScale CLI application"},
|
|
{Name: "--database", Description: "The database this project is using"},
|
|
{Name: "--force", Description: "Show help"},
|
|
{Name: "--local-addr", Description: "The organization for the current user"},
|
|
{Name: "--port", Description: "Region for the database"},
|
|
{Name: "--remote-addr", Description: "Open in web browser"},
|
|
{Name: "--api-token", Description: "The API token to use for authenticating against the PlanetScale API"},
|
|
{Name: "--api-url", Description: "Config file (default is $HOME/.config/planetscale/pscale.yml)"},
|
|
{Name: "--debug", Description: "Enable debug mode"},
|
|
{Name: "--format", Description: "Disable color output"},
|
|
{Name: "--service-token", Description: "Service Token for authenticating"},
|
|
{Name: "--service-token-name", Description: "The Service Token name for authenticating"},
|
|
{Name: "--from", Description: "Branch to be created from"},
|
|
{Name: "--restore", Description: "Backup to restore into the branch"},
|
|
{Name: "--web", Description: "Create a branch in your web browser"},
|
|
{Name: "--create", Description: "If enabled, will automatically create the branch if it does not exist"},
|
|
{Name: "--parent-branch", Description: "Generate completion script for your shell"},
|
|
{Name: "--execute", Description: "Run this command after successfully connecting to the database"},
|
|
{Name: "--execute-env-url", Description: "Create, read, delete, and dump/restore databases"},
|
|
{Name: "--notes", Description: "Notes for the database"},
|
|
{Name: "--output", Description: "Comma separated string of tables to dump. By default all tables are dumped"},
|
|
{Name: "--dir", Description: "Directory that contains the files to be used for restoration (required)"},
|
|
{Name: "--deploy-to", Description: "Branch to deploy the branch. By default it's set to 'main'"},
|
|
{Name: "--approve", Description: "Approve a deploy request"},
|
|
{Name: "--comment", Description: "Comment on a deploy request"},
|
|
{Name: "--save-config", Description: "Create, list, and delete branch passwords"},
|
|
{Name: "--version", Description: "Show pscale version"},
|
|
},
|
|
})
|
|
}
|