Skip to main content
The superun CLI exposes a running application’s backend capabilities in the terminal. It can query and update PostgREST data, call Postgres RPCs, and discover and invoke Edge Functions from an OpenAPI manifest. It is designed for operating and automating an app—not for downloading its source code or publishing it. For project development and deployment, use the Suxiaoqiang CLI.

Before you start

You need:
  • Node.js 20 or later;
  • the backend URL and anon key for the app you are authorized to use;
  • a login method supported by that app.
For an app built on superun, start from Build → Skill Library → Agent Friendly. The generated setup guide contains the configuration for that app and is the recommended way to connect a trusted AI assistant. See Agent Friendly.

Install

Confirm that the superun command is available:

Connect and log in

Register a backend and give it a local alias:
Then sign in as an application user:
If you already have an access token, you can use it directly:
Check the active identity before performing a write:

Work with app data

update and delete require a filter by default. A whole-table operation requires the explicit --all flag. All requests use the current user’s session, so the app’s Row Level Security policies still apply. A command can only access data that the signed-in user is allowed to access.

Call Edge Functions

The CLI discovers app-specific functions from the app’s OpenAPI manifest. Explore from broad groups to a single function:
Refresh the cached function manifest after the app’s APIs change:

Manage multiple apps

Use -a to target a different configured app for one command without changing the active app:

Command reference

Run superun <command> --help for all flags and input requirements.

Safety and troubleshooting

  • Run superun app show and superun whoami before a sensitive write.
  • Treat access and refresh tokens as secrets. Only provide Agent Friendly setup instructions to an AI assistant or environment you trust.
  • A 401 usually means the session is no longer valid for this backend. Log in again with a token issued by the same app.
  • If superun fn is empty or outdated, run superun app refresh. The app must expose a valid CLI manifest for function discovery.
  • Database and function calls can have immediate business effects. Inspect the command and payload before running it.

superun CLI on npm

View the published package and current version.

Source code

Read the complete reference or report an issue.