The ricochet CLI
The ricochet CLI is a Rust-based command-line tool that deploys and manages content on ricochet servers. Use its interactive prompts to create, update, and monitor your deployments.
Installation
Section titled “Installation”curl -fsSL https://raw.githubusercontent.com/ricochet-rs/cli/main/install.sh | shcurl.exe -fsSL https://raw.githubusercontent.com/ricochet-rs/cli/main/install.ps1 -o install.ps1; .\install.ps1; Remove-Item install.ps1Check that it works:
ricochet --versionHomebrew (macOS)
Section titled “Homebrew (macOS)”On macOS, you can also install with Homebrew:
brew tap ricochet-rs/homebrew-tapbrew install ricochetWindows
Section titled “Windows”Manual Installation
Section titled “Manual Installation”Pre-built binaries are available for macOS, Linux, and Windows. Download one from:
https://s3.eu-central-003.backblazeb2.com/ricochet-cli/$VERSION/ricochet-$VERSION-$OS_ARCH.tar.gzUse one of these $OS_ARCH values:
aarch64(Linux ARM64)x86_64(Linux x86)windows.exe
Extract the archive and move the binary to a folder on your PATH:
tar -xzf ricochet-$VERSION-$OS_ARCH.tar.gzmv ricochet-$VERSION-$OS_ARCH/ricochet /usr/local/bin/Authentication
Section titled “Authentication”Logging In
Section titled “Logging In”Run login and pass the server URL with the -S flag:
ricochet login -S https://try.ricochet.rsYour browser opens so you can sign in. The CLI then stores your credentials locally and uses them for later commands.
Remote Sessions
Section titled “Remote Sessions”Over SSH, in a dev container, or in a remote editor window, the browser can’t hand the key back to the CLI.
Add --no-browser instead:
ricochet login -S https://try.ricochet.rs --no-browserThe CLI prints your server’s credentials page. Create an API key there and paste it at the prompt. In a script, pipe the key to stdin instead:
echo "$RICOCHET_KEY" | ricochet login -S https://try.ricochet.rs --no-browserMultiple Instances
Section titled “Multiple Instances”You can log in to more than one ricochet server. The CLI stores each server’s credentials apart, keyed by the server URL.
To switch servers, pass the -S flag with your command:
# Deploy to productionricochet deploy -S https://ricochet.example.com
# Deploy to stagingricochet deploy -S https://staging.ricochet.example.comLogging Out
Section titled “Logging Out”To remove the stored credentials for a server:
ricochet logout -S https://try.ricochet.rsDeployment
Section titled “Deployment”Basic Deployment
Section titled “Basic Deployment”Go to your project folder and run:
ricochet deployIf there is no _ricochet.toml file, the CLI walks you through an interactive setup:
-
Choose a language: R, Julia, or Python
-
Select content type: Shiny, Plumber, Quarto, and so on
-
Specify the entrypoint: the file that starts your app, such as
app.R -
Name your content: the name shown in the ricochet UI
-
Set visibility: Private, Internal, or External
When you finish, the CLI creates a _ricochet.toml file in your project folder.
See Using _ricochet.toml for all settings.
Redeploying
Section titled “Redeploying”Later deploys reuse the settings in your _ricochet.toml:
ricochet deploy