CLI
Polars cloud comes with a command line interface (CLI) out of the box. This allows you to interact with polars cloud resources from the terminal.
pc --help
Command line interface for Polars Cloud
Usage: pc [OPTIONS] [COMMAND]
Commands:
authenticate Authenticate with Polars Cloud
login Force new login through the browser
setup Set up organization and workspace
organization Manage Polars Cloud organizations
workspace Manage Polars Cloud workspaces
compute Manage Polars Cloud compute clusters
service-account Manage Polars Cloud service accounts
help Print this message or the help of the given subcommand(s)
Options:
-v, --verbose Output debug logging messages.
-t, --token <TOKEN> Authentication token to override other auth methods
-p, --token-path <TOKEN_PATH> Path to authentication token file
-h, --help Print help
-V, --version Print version
If you're just starting out with Polars Cloud then pc setup will guide you through setting up your
environment to be able to quickly run queries.
Workspaces
# Create a workspace without any infrastructure attached to it.
pc workspace create --workspace-name my-workspace --organization-name my-org
# Create it and connect your AWS account in one go.
pc workspace create --workspace-name my-workspace --organization-name my-org --connect-aws
The organization is created for you if it does not exist yet.
Managing the AWS connection
# Connect an AWS account to an existing workspace.
pc workspace aws connect --workspace-name my-workspace
# Report whether AWS is connected, and where the setup got to if it is not.
pc workspace aws verify --workspace-name my-workspace
# Detach AWS again, keeping the workspace and any non-AWS clusters.
pc workspace aws disconnect --workspace-name my-workspace
connect opens a CloudFormation setup flow in your browser and then waits for it to finish. Pass
--no-verify to return immediately instead.
verify answers right away and does not wait: it exits successfully when AWS is connected, and
otherwise says whether the setup is still running, failed, or was removed. Use it to check on a
connection started with --no-verify.