Retool CLI reference
Use the Retool CLI to build Retool apps from the command line.
This reference lists every command available in the Retool CLI, grouped by function. To install the CLI and learn the recommended build flow, refer to the installation guide.
Most commands need an active, authenticated session on a Retool instance. You can work in one or more Retool instances at a time.
Authentication
Sign in to a Retool instance, choose which instance commands target, and manage your session.
retool auth login
Sign in to a Retool instance. Opens a browser to authenticate by default.
retool auth status
Show the session for one instance, with token scopes and expiry. With no --host, and outside a local app directory, lists every instance you're signed in to and marks the one commands target by default.
retool auth use <url>
Set the default Retool instance for commands that get no --host. Does not sign you in or out.
retool auth logout
Sign out and remove stored credentials for an instance.
retool whoami
Show the signed-in user's cached name, email, and instance.
App lifecycle
List, scaffold, validate, preview, and publish apps.
retool apps
List every app and classic app in your organization, with its name, UUID, and folder ID. Use it to find the app UUID that clone requires. clone can only access apps, not classic apps.
retool branches <app>
List the branches for an app. <app> is an app UUID or editor URL. Pass a branch name from this list to clone --branch.
retool init [dir]
Provision a new Retool app and scaffold it locally, then pull its resource types. With [dir], creates that directory and names the app after it, PascalCased. Requires an empty directory outside any git repository.
retool clone <app>
Download an existing app to a local directory. <app> is an app UUID or editor URL.
retool check
Validate the app once and report any errors. Regenerates the use<Fn> hooks first. Makes no network call.
Run this command from inside the local app directory.
retool start
Pull resource types for a linked app, then watch the local app and re-validate on every save. Runs until you stop it with Ctrl-C.
Run this command from inside the local app directory.
retool pull
Fast-forward the local app to its branch on the server, then refresh its resource types and generated hooks. If the two have diverged, pull stops and prints the git command to run.
If your app is protected, this command also fast-forwards your changes on the branch of your external source control repository.
Run this command from inside the local app directory.
retool checkout <ref>
Switch the current local app to an existing app branch. Refuses a switch that would overwrite local files, or a local target branch that holds commits absent from the server.
Run this command from inside the local app directory.
retool push
Validate the app locally, then push your changes to Retool and start a preview build. Local validation failures block the push before anything is committed.
If your app is protected this command also applies your changes to the branch in your external source control repository.
Run this command from inside the local app directory.
retool preview
Return the current preview URL, or the build state, without pushing again.
Run this command from inside the local app directory.
retool publish
Publish the app to a live URL. Blocks and lists any functions that still need approval.
If your app is protected, this command opens a pull request in your source control manager. Your changes are not published until the pull request is merged.
Run this command from inside the local app directory.
Resources
Inspect the resources your app code can call, and create new ones.
retool resource explore
Read backend TypeScript from stdin and run it against your organization's resources, so you can inspect their real data and shape before writing code against them. The CLI classifies the code locally and runs read-only code by default.
Run this command from inside the local app directory.
retool resource create
Create a resource for your organization. With no credentials, Retool creates the resource and prints the URL where you finish configuring it. Resources are org-global, so this command needs no local app checked out.
Skills
Give your coding agent retool-ready, the skill that describes the shape a Retool app has to take. It is the only skill the CLI ships, and the name is optional in both commands.
retool skill install retool-ready
Install the skill into each agent's skills directory. The installed file points at skill show, so it stays current as the CLI updates.
retool skill show retool-ready
Print the skill to stdout. Use it for an agent that can't read an installed skill file.
Feedback
Report a CLI bug or a rough edge.
retool feedback
Send feedback about the CLI. Attaches your CLI and platform versions, plus the app and branch identifiers when you run it in a local app. It sends no logs or file contents.
Updates
Keep the CLI core in step with your Retool instance.
retool update
Install the CLI version your instance recommends. The new version takes effect on your next command.
Global flags
These flags apply to every command. --host is not a global flag; only a subset of commands accept it.
Environment variables
Set environment variables to include flags and their values with every command automatically. This is useful for using the CLI programmatically, such as in CI and other non-interactive contexts.