CLI
Common Widefleet commands, app selection, authentication and deployment output.
For installation and your first deployment, start with CLI setup.
Use widefleet --version and widefleet --help to check the installed release.
Each command also accepts --help; newer commands require matching platform components.
Authentication and target
| Setting or command | Meaning |
|---|---|
PLATFORM_URL / --url URL |
Explicit management origin; overrides saved and managed configuration. |
widefleet login |
Sign in through your browser; requests platform:read platform:write by default. |
widefleet login --email EMAIL / --domain DOMAIN |
Discover the installation using a work email or company domain, then log in. |
widefleet config show |
Inspect the selected platform URL, its source and configuration paths. |
widefleet config set-url URL / unset-url |
Save or clear the platform URL without changing credentials. |
PLATFORM_CONFIG_FILE / --config-file PATH |
Use one explicit configuration file instead of the user and managed defaults. |
widefleet whoami |
Inspect the authenticated user. |
widefleet organizations |
List available organizations (0.4.0 or newer). |
PLATFORM_ORGANIZATION / --organization ID |
Select an organization for API commands (0.4.0 or newer). |
widefleet logout |
Revoke the stored refresh token and remove the saved session. |
PLATFORM_SESSION_FILE / --session-file PATH |
Choose an unencrypted Unix session file instead of automatic credential storage. |
PLATFORM_ACCESS_TOKEN |
Externally supplied token; overrides saved credentials for API commands and does not renew automatically. |
Keep session files outside projects and shared artifacts. The CLI restricts file permissions and renews saved sessions automatically. See headless login.
Login uses a configured platform address or finds one through your email in the browser, then saves it for future commands. See CLI configuration for version requirements and address precedence, and agent login for signing in while working with an agent.
Use --organization or PLATFORM_ORGANIZATION to select the organization for
API commands. See organization selection.
Create an organization
With platform and CLI 0.4.13 or newer, sign in with a verified personal account and run these commands on an installation that offers organization creation:
widefleet organizations create --name "Example Team" --slug example-team
widefleet organizations list
Creation prints { "id": "...", "name": "Example Team", "slug": "example-team" }.
Use the returned ID with --organization ID for subsequent app commands.
widefleet organizations also lists your organizations.
If setup asks you to retry, run the creation command again. If creation is unavailable, ask an administrator for an invitation. See the API reference for permissions and errors.
App commands
Platform and CLI 0.4.0 or newer also provide widefleet account,
widefleet members and widefleet invitations. See member management
for complete examples and permissions. widefleet account prints your link status and
the browser URL for company sign-in. Accounts with matching verified company email are linked during SSO.
APP_UUID, DEPLOYMENT_UUID and ARTIFACT_UUID below are placeholders. Find app
IDs with widefleet apps and deployment IDs and artifact IDs with widefleet history APP_UUID.
| Command | Purpose |
|---|---|
widefleet init DIRECTORY [--template TEMPLATE] |
Create an independent app; defaults to SvelteKit. No login required. |
widefleet apps |
List apps you can manage. |
widefleet deploy [APP_UUID] |
Build and deploy; normally selects the configured app name. |
widefleet preview |
Build and deploy an isolated preview of an existing app. |
widefleet history APP_UUID |
Read deployment history as JSON. |
widefleet events APP_UUID DEPLOYMENT_UUID |
Read deployment events. |
widefleet rollback APP_UUID ARTIFACT_UUID |
Activate a retained code artifact. |
widefleet logs --level error --since 1h |
Query app runtime errors; --follow keeps polling. |
widefleet migrations list DB / apply DB |
Inspect or explicitly apply SQL migrations to a deployed D1 binding. |
widefleet access |
Inspect app usage rules; set changes the group list. |
widefleet network |
Inspect external destinations; allow and deny change grants. |
widefleet services |
Browse apps and their service entrypoints. |
widefleet services describe APP |
Read an app’s active API documentation as JSON (slug or UUID). |
widefleet connect TARGET --as BINDING |
Grant the current app access to another app’s API. |
widefleet disconnect BINDING |
Revoke an app connection. |
widefleet secret list / put NAME / delete NAME |
Manage the selected app’s private secrets. |
widefleet connections |
Inspect desired and active app connections and deployed app resources. |
widefleet catalog list |
List published app launch URLs. |
widefleet catalog templates list [--search TEXT] |
Find available app templates and a prompt for creating your own app. |
widefleet catalog templates show ID |
Read a template’s source, Markdown instructions and setup prompt. |
widefleet delete APP_UUID --yes |
Request removal of an app and all its previews. |
The target is the selected platform URL, organization context and name in wrangler.jsonc. The first deploy creates that app; subsequent deploys update it after checking the user’s app permissions. A changed name selects a different app. The server assigns the host, and existing apps keep their host and data.
Logs, access, network, connections and migrations also use project context; history, events and
rollback require IDs. Each command’s help lists its selection options.
See app templates for using a ready-made app and app services and connections for permissions, activation states and app selection.
Create a project
Use CLI 0.3.3 or newer for the TanStack Start template and the Node.js 22.18
minimum. Check the installed version with widefleet --version.
widefleet init my-app
widefleet init my-react-app --template tanstack-start
--template accepts sveltekit and tanstack-start. Omitting the option is
equivalent to --template sveltekit. The CLI includes both templates, so project
creation needs no platform login or template download. Dependency installation
still requires the package registry or a populated local package cache.
DIRECTORY must not exist. The CLI derives the app name in wrangler.jsonc from
the directory name; review it before deploying. An unknown template exits with an
error and does not create a project. If the installed CLI rejects --template,
check widefleet --version and upgrade to CLI 0.3.3 or newer.
Inside either project, run pnpm install --frozen-lockfile, pnpm check, then
pnpm dev. Follow app development for identity,
bindings and the next deployment.
Deployment flags and output
These flags apply to both deploy and preview:
| Flag | Behavior |
|---|---|
--config PATH |
Read another Wrangler configuration; project paths are relative to that file. |
--skip-build |
Upload the existing build instead of running the app build. |
--no-source |
Deploy without saving source to Widefleet Git. Conflicts with --source-branch and --allow-branch-mismatch. |
--source-branch BRANCH |
Identify a Git preview’s branch in a detached CI checkout. |
--allow-branch-mismatch |
Allow this command to publish the main app from a different local branch or a checkout without a branch. |
--no-wait |
Return the queued deployment; activation follows asynchronously. |
--json |
Print one result on stdout; build output and progress go to stderr. |
Previews with saved source use the current branch for both their name and code.
Use --source-branch when CI checks out a commit without a local branch. If a
local branch is checked out, the flag must match it. A preview’s branch cannot
be changed. See previews.
After activation, the command prints Deployment succeeded and the app URL. Headless apps have no launch URL; their JSON deployment result uses url: null. For automation, use widefleet deploy --json: stdout contains one JSON object with the final deployment fields and url, while build output and progress go to stderr. The id field identifies the deployment and appId identifies the app. Existing scripts that parsed the default JSON output must add --json. With --no-wait --json, the result describes the queued deployment. Uploading with --no-wait requires only platform:write; waiting for deployment events and history also requires platform:read. Failures exit nonzero and leave stdout empty. Update the management server together with the CLI so it can provide the complete URL, including its configured HTTPS port.
Each command’s help documents its output options.
When code is saved to Widefleet Git, the JSON result includes source with
commit, branch and directory. The directory is the app’s path within the
repository, or . for an app at its root. Without source saving, source is null.
Source repositories
Use these commands to recover an app’s code or connect it to a local project. They require Git and management access to the app, and use your selected installation and organization. See source code for availability and a walkthrough.
| Command | Behavior |
|---|---|
widefleet source status [--app NAME_OR_ID] [--config PATH] |
Show the repository, branch, latest saved commit and deployed commit as JSON. Defaults to the configured app. |
widefleet source clone NAME_OR_ID DIRECTORY [--branch BRANCH] [--read-only] |
Clone the app’s branch and set up Git authentication. Use --branch to clone another branch. |
widefleet source connect [--app NAME_OR_ID] [--config PATH] [--remote NAME] |
Add an authenticated Git remote to the current project, creating the app’s repository if needed. |
Cloning and connecting set up a remote named widefleet. Connecting preserves
existing remotes and does not commit or push. Use connect --remote NAME to choose
another remote name. Neither command changes the app’s assigned branch.
Git uses the Widefleet login and organization chosen when you clone or connect.
The CLI obtains Git credentials automatically when needed. Use clone --read-only
with a token limited to platform:read. Cloning without that flag, connecting
and pushing require platform:write.
widefleet apps includes each app’s assigned source branch and deployed commit.
Use source status for the latest saved commit. See the
API reference for the JSON fields,
including how to distinguish missing source from a temporary Git error.
For a complete task, follow sharing an app or deployments and recovery.
See CLI authentication for credential stores and headless sessions.