Skip to main content

Retool CLI reference

A command-line tool for interacting with Retool.

Retool CLI is a Node.js command-line tool for interacting wth your Retool organization.

Installation

npm install -g retool-cli

Retool CLI requires Node.js.

Authentication

Retool CLI supports the following authentication options:

  • Google SSO.
  • Email and password.
  • Cookie validation.

Cookie validation is required when 2FA is enabled for your account. You complete this process by passing your xsrfToken and accessToken to the CLI. You can generally find these tokens using your web browser's developer tools or cookie inspector.

You can also log into a localhost version of Retool if you don't want to work with your production instance.

Usage

retool [command] [option] [parameters]

Commands

Available commands for Retool CLI.

login

Sign in to Retool.

retool login

logout

Sign out of Retool.

retool logout

signup

Create a Retool account.

retool signup

whoami

Display information about the user currently logged in

retool whoami

apps

Interact with apps.

--create

Create a new app.

retool apps --create
--create-from-table

Create a new app to visualize a Retool Database table.

retool apps --create-from-table
--delete

Delete the specified app.

retool apps --delete [app-name]
--export

Export the specified app as JSON.

retool apps --export [app-name]
--list

List apps and folders at root level. Optionally provide a folder name to list all apps in that folder.

retool apps --list [folder-name]
--list-recursive

List apps and folders recursively.

retool apps --list-recursive

database

Interact with Retool Database tables.

--create

Create a new table.

retool database --create
--delete

Delete the specified table.

retool database --delete [table-name]
--fromPostgres

Create a table from an existing PostgreSQL database.

retool database --fromPostgres [connection-string]
--gendata

Generate data for a table interactively. Optionally include --gpt to generate data using Retool AI.

retool database --gendata [table-name] --gpt
--list

List all tables.

retool database --list
--upload

Upload a CSV file and create a new table.

retool database --upload [/path/to/csv]

scaffold

Scaffold an app, database table, and workflow. Optionally include --no-workflow to skip workflow generation.

--columns

Column names to use for the database table.

retool scaffold --columns [column1] [column2] ...
--delete

Delete a scaffolded app, database table, and workflow using the specified table name.

retool scaffold --delete [table-name]
--from-csv

Create an app, database table, and workflow using the specified CSV file.

retool scaffold --from-csv [/path/to/csv]
--name

The table name to use for the scaffold.

retool scaffold --name [table-name]

custom-component

Interact with custom components.

--clone

Clone Retool's custom component repository to the working directory.

retool custom-component --clone

telemetry

Control telemetry.

--disable

Disable telemetry.

retool telemetry --disable
--enable

Enable telemetry.

retool telemetry --enable

workflows

Interact with workflows.

--delete

Delete the specified workflow.

retool workflows --delete [workflow-name]
--list

List workflows and folders at root level. Optionally provide a folder name to list all workflows in that folder.

retool workflows --list [folder-name]
--list-recursive

List workflows and folders recursively.

retool workflows --list-recursive