The Render CLI
Manage your Render resources from the command line.
Use the Render CLI to manage your Render services and datastores directly from your terminal:
Among many other capabilities, the CLI supports:
- Triggering service deploys, restarts, and one-off jobs
- Opening a psql session to your database
- Viewing and filtering live service logs
The CLI also supports non-interactive use in scripts and CI/CD.
The Render CLI is in public beta.
Please submit bugs and feature requests on the project’s public GitHub repository.
Setup
+ Did you install the Render CLI before November 2024?
The previous implementation of the Render CLI was released in January 2023 as an alpha without official support. To prevent configuration issues, remove any existing installations before proceeding with this new CLI.
If you installed the previous CLI with Homebrew, run the following commands to uninstall it:
brew uninstall render
brew untap render-oss/render
1. Install
Homebrew (MacOS, Linux)
Installation commands for Homebrew:
brew tap render-oss/homebrew-render
brew update
brew install render
After installation completes, open a new terminal tab and run render
with no arguments to confirm.
Direct download
Visit the CLI’s GitHub releases page and download the executable that corresponds to your system’s architecture.
If you use an architecture besides those provided, you can build the CLI from source.
Build from source
We recommend building from source only if no other installation method works for your system.
-
Install the Go programming language if you haven’t already.
-
Clone and build the CLI project with the following commands:
git clone git@github.com:render-oss/cli.git cd cli go build -o render
2. Log in
The Render CLI uses a CLI token to authenticate with the Render platform. Generate a token with the following steps:
-
Run the following command:
render login
Your browser opens a confirmation page in the Render Dashboard.
-
Click Generate token.
You’re all set! The CLI saves the token to its local configuration file.
CLI tokens expire after seven days.
Each time your token expires, run render login
again to generate a new one.
Learn more about managing CLI tokens.
3. Set your active workspace
Before you run any other commands, you need to specify which of your Render workspaces you’re operating in.
Set the CLI’s active workspace with the following command:
render workspace set
Select any of your workspaces from the displayed list.
Change your active workspace at any time by running the same command.
Command reference
During the beta, supported commands are documented within the CLI itself:
- Run
render
with no arguments for a list of available commands. - Run
render help <command>
for details about a specific command.
Using in scripts and CI/CD
By default, the Render CLI uses interactive, menu-based navigation. This default is great for manual use, but not for scripting or automation.
Configure the CLI for non-interactive use in automated environments with the following steps:
1. Authenticate via API key
The Render CLI can authenticate using an API key instead of render login
. Unlike CLI tokens, API keys do not periodically expire. For security, use this authentication method only for automated environments.
-
Generate an API key with these steps.
-
In your automation’s environment, set the
RENDER_API_KEY
environment variable to your API key:export RENDER_API_KEY=rnd_RUExip…
If you provide an API key this way, it always takes precedence over CLI tokens you generate with render login
.
2. Set non-interactive command options
Set the following options for all commands you run in non-interactive mode:
Flag | Description |
---|---|
|
Sets the output format. For automated environments, specify |
|
Skips any confirmation prompts that the command would otherwise display. |
For example, to list the active workspace’s services in JSON format:
render services --output json --confirm
Local config
By default, the Render CLI stores its local configuration at the following path:
$HOME/.render/cli.yaml
You can change this file path by setting the RENDER_CLI_CONFIG_PATH
environment variable.
Managing CLI tokens
View a list of your active CLI tokens from your Account Settings page in the Render Dashboard. You can manually revoke a CLI token that you no longer need or that might be compromised. Expired and revoked tokens tokens do not appear in the list.