The beam
CLI is a command-line utility that lets you work with Beam using beam
commands, from uploading files to volumes to deploying your applications.
You can use the --help
flag to get information about any command.
You’ll be using these a lot!
beam deploy
– deploy an app to the cloudbeam shell
– SSH into a container to debug it interactivelybeam serve
– create a temporary live preview of your appbeam logs
– stream logs from a task, container, or deploymentThis installs the Beam SDK and CLI in your Python environment.
You can find instructions for installing the CLI on Windows here.
Beam will create a credentials file in ~/.beam/config.ini
. When you run beam config create
, your API keys will be saved to this file.
Configures your Beam API keys and saves a profile to ~/.beam/config.ini
Context Name
(required) — the name of the profile i.e. prod or staging.Gateway Host
(optional) — used only for self-hosting. If you are using the beam.cloud, you can leave this blank.Gateway Port
(optional) — used only for self-hosting. If you are using the beam.cloud, you can leave this blank.Token
(required) — your API token, found on this page of the dashboard.Create a new context.
If you are prompted to enter a value for Gateway Host
or Gateway Port
, you
can leave both fields blank.
Delete a saved context.
Lists saved contexts.
Set the default context.
Deploys your app and creates a persistent web endpoint to access it.
You can run this command with beam deploy [...]
or beam deploy create [...]
.
Lists all deployments.
Stops a deployment.
Starts an inactive deployment.
Deletes a deployment.
Allows you to interactively access a container on Beam.
You can also shell into a running container, by passing in a container_id
:
Creates a temporary deployment preview.
Manage the containers running in your account.
Lists all containers.
Terminate a running container.
Any code you run on Beam creates a task. Any time you run a function or invoke an API, a task is created.
Lists all tasks.
Stops a task.
Beam allows you to create highly-available storage volumes that can be used across tasks. You might use volumes for things like storing model weights or large datasets.
Creates a volume.
List all volumes mounted to your apps.
List all contents of a volume.
Copies a file to a volume.
Move files around a volume.
Remove a file from a volume.
You can download directories and individual files.
Secrets and environment variables can be injected into the containers that run your apps. After a secret is saved, it can be used in your application code like this:
Lists all secrets that exist.
Creates a secret
Shows the value of a secret.
Modifies the value of a secret.
Permanently deletes a secret.
You can stream logs from a task, deployment, or a container to your shell.
Streams logs for a deployment.
You can find the deployment ID by running beam deployment list
.
Streams logs for a task.
You can find the task ID by running beam task list
.
Streams logs for a container.
You can find the container ID by running beam container list
.
Streams logs for a stub ID.
Manage the machines available on Beam.
List the available GPUs at any given moment.
You can create a .beamignore
file in your project’s root directory to tell Beam which local files and directories to ignore when syncing to Beam.
This follows the conventions of .gitignore
Ignoring Files
Ignoring Folders
The beam
CLI is a command-line utility that lets you work with Beam using beam
commands, from uploading files to volumes to deploying your applications.
You can use the --help
flag to get information about any command.
You’ll be using these a lot!
beam deploy
– deploy an app to the cloudbeam shell
– SSH into a container to debug it interactivelybeam serve
– create a temporary live preview of your appbeam logs
– stream logs from a task, container, or deploymentThis installs the Beam SDK and CLI in your Python environment.
You can find instructions for installing the CLI on Windows here.
Beam will create a credentials file in ~/.beam/config.ini
. When you run beam config create
, your API keys will be saved to this file.
Configures your Beam API keys and saves a profile to ~/.beam/config.ini
Context Name
(required) — the name of the profile i.e. prod or staging.Gateway Host
(optional) — used only for self-hosting. If you are using the beam.cloud, you can leave this blank.Gateway Port
(optional) — used only for self-hosting. If you are using the beam.cloud, you can leave this blank.Token
(required) — your API token, found on this page of the dashboard.Create a new context.
If you are prompted to enter a value for Gateway Host
or Gateway Port
, you
can leave both fields blank.
Delete a saved context.
Lists saved contexts.
Set the default context.
Deploys your app and creates a persistent web endpoint to access it.
You can run this command with beam deploy [...]
or beam deploy create [...]
.
Lists all deployments.
Stops a deployment.
Starts an inactive deployment.
Deletes a deployment.
Allows you to interactively access a container on Beam.
You can also shell into a running container, by passing in a container_id
:
Creates a temporary deployment preview.
Manage the containers running in your account.
Lists all containers.
Terminate a running container.
Any code you run on Beam creates a task. Any time you run a function or invoke an API, a task is created.
Lists all tasks.
Stops a task.
Beam allows you to create highly-available storage volumes that can be used across tasks. You might use volumes for things like storing model weights or large datasets.
Creates a volume.
List all volumes mounted to your apps.
List all contents of a volume.
Copies a file to a volume.
Move files around a volume.
Remove a file from a volume.
You can download directories and individual files.
Secrets and environment variables can be injected into the containers that run your apps. After a secret is saved, it can be used in your application code like this:
Lists all secrets that exist.
Creates a secret
Shows the value of a secret.
Modifies the value of a secret.
Permanently deletes a secret.
You can stream logs from a task, deployment, or a container to your shell.
Streams logs for a deployment.
You can find the deployment ID by running beam deployment list
.
Streams logs for a task.
You can find the task ID by running beam task list
.
Streams logs for a container.
You can find the container ID by running beam container list
.
Streams logs for a stub ID.
Manage the machines available on Beam.
List the available GPUs at any given moment.
You can create a .beamignore
file in your project’s root directory to tell Beam which local files and directories to ignore when syncing to Beam.
This follows the conventions of .gitignore
Ignoring Files
Ignoring Folders