Appearance
Install, sign in, and deploy a static site from the command line.
Before you start
The CLI binary is behindgate. From any command you can show usage with -h or --help, and you can check the installed version with:
behindgate --versionThe CLI reads behindgate.json from the current directory to know which tenant, site, and app you are working with, plus the environment. See Configure behindgate.json below.
Sign in
Run the login command:
behindgate login [--email <e>] [--password <p>] [--new-password <p>]On success, the CLI prints:
Signed in as {...}.
To confirm who you are signed in as at any time, run:
behindgate whoamiIf you are not signed in, the CLI prints Not logged in.
To sign out, run:
behindgate logoutOn success, the CLI prints Logged out.
Configure behindgate.json
The CLI reads behindgate.json from the current directory. Place this file in the root of your project.
The file supports these fields:
| Field | Type | Description |
|---|---|---|
tenantId | string | Your workspace/tenant. |
siteId | string | The site to deploy to. |
appId | string | The app within the site. |
apiBaseUrl | string | Base URL the CLI talks to. |
auth.region | string | Auth region. |
auth.userPoolId | string | Auth user pool ID. |
auth.userPoolClientId | string | Auth user pool client ID. |
To use a config file in another location, pass --config <path> to deploy, publish, or rollback.
Deploy a build folder
Build your static site so the output lives in a directory.
Deploy that directory:
behindgate deploy <dir> [--config <path>]Replace
<dir>with the path to your build output.
When the deploy is live, the CLI prints:
✓ {...}/{...} is live on release {...}.Note the release ID from this message — you use it to publish or roll back.
Publish a release
To publish a specific release, pass its release ID:
behindgate publish <releaseId> [--config <path>]If you omit the release ID, the CLI prints {...} needs a <releaseId>.
On success, the CLI prints:
✓ {...} {...}/{...} to {...}.Roll back a release
To roll back to a specific release, pass its release ID:
behindgate rollback <releaseId> [--config <path>]As with publishing, if you omit the release ID, the CLI prints {...} needs a <releaseId>.
On success, the CLI prints Rolled back.
Custom domains
Custom domains are not yet supported.