CLI reference
On this page
The dokwe CLI deploys, configures, and monitors your projects from the terminal. This page lists every command with its usage line, description, and flags.
Install and update#
curl -sSL https://dokwe.com/install-cli.sh | bashirm https://dokwe.com/install-cli.ps1 | iexThe macOS and Linux installer supports amd64 and arm64 and installs to /usr/local/bin, creating the folder if it's missing and asking for your password only when it needs sudo. Without sudo it installs to ~/.local/bin and tells you how to add that to your PATH. On a Mac, the CLI needs macOS 12 (Monterey) or later. The Windows installer installs dokwe.exe to %LOCALAPPDATA%\dokwe and adds that folder to your user PATH.
To update in place, run:
dokwe updatedokwe upgrade is an alias. The CLI also checks for a newer version after most commands and prints a hint when one is available.
Check your installed version with dokwe --version.
Global flags#
These flags work with every command.
| Flag | Type | Default | Description |
|---|---|---|---|
-p, --project | string | Project ID (overrides .dokwe link) | |
-h, --help | Help for any command |
--project also accepts a project slug or name. Without it, commands use the project linked to the current folder in .dokwe/. Link a folder with dokwe link, or automatically with dokwe create or dokwe pull.
Set DOKWE_API_URL to point the CLI at a different API before you run dokwe login.
Auth#
dokwe login#
dokwe login [flags]Log in to Dokwe (email + password, or --api-key). Without flags, the CLI prompts for the API URL, then your email and password.
| Flag | Type | Default | Description |
|---|---|---|---|
-k, --api-key | string | Authenticate non-interactively with an API key (dk_pak_…) | |
--api-url | string | Override the API URL for this run |
dokwe logout#
dokwe logoutLog out.
dokwe whoami#
dokwe whoamiShow current user.
Projects#
dokwe projects#
dokwe projects [flags]List all projects.
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Output as JSON |
dokwe create#
dokwe create [name]Create a new project. Prompts for a name if you don't pass one, then for a GitHub repo URL. Leave the URL blank to deploy with the CLI. If you enter a URL, it also prompts for a branch (default main). Links the current folder to the new project.
dokwe link#
dokwe linkLink current directory to a project. Shows a numbered list of your projects to pick from.
dokwe pull#
dokwe pull [project] [flags]Clone a project and configure credentials. Uses your stored GitHub credentials, so you don't need to set up GitHub locally.
| Flag | Type | Default | Description |
|---|---|---|---|
--path | string array | Sparse-checkout path (repeatable). Implies --filter=blob:none when not otherwise set. | |
--filter | string | Partial clone filter (e.g. blob:none, tree:0) — passed straight to git clone. |
dokwe pull my-repo # full clone
dokwe pull my-repo --path apps/frontend # only apps/frontend + top-level files
dokwe pull my-repo --path apps/frontend --path libs # multiple paths
dokwe pull my-repo --filter blob:none # full tree, blobs on demanddokwe sparse#
dokwe sparse <command>Manage sparse-checkout on the current project. Wraps git sparse-checkout and must run inside a Dokwe-linked project.
| Command | Usage | Description |
|---|---|---|
list | dokwe sparse list | Show the active sparse-checkout paths |
set | dokwe sparse set <path>... | Replace the sparse-checkout paths |
add | dokwe sparse add <path>... | Add paths to sparse-checkout |
remove | dokwe sparse remove <path>... | Drop paths from sparse-checkout |
disable | dokwe sparse disable | Turn off sparse-checkout and materialise the full tree |
reapply | dokwe sparse reapply | Re-materialise the working tree from the current sparse config |
Deploy#
dokwe deploy#
dokwe deploy [flags]Deploy from current directory. Pushes the folder to Dokwe's built-in git server, initialising a git repository first if there isn't one. See Deploy from the CLI.
| Flag | Type | Default | Description |
|---|---|---|---|
--from-git | bool | false | Trigger Git-based deploy |
With --from-git, Dokwe deploys from the project's connected repository instead and streams the build logs.
dokwe push#
dokwe push [flags]Commit changes and trigger a deployment. Stages, commits, and pushes to GitHub. The webhook then starts a new deployment.
| Flag | Type | Default | Description |
|---|---|---|---|
-m, --message | string | Commit message | |
-a, --all | bool | false | Stage all changes without prompting |
dokwe rollback#
dokwe rollback [deployment-id]Rollback to a previous deployment. Without an ID, the CLI picks a recent deployment from the project's last five. See Rollbacks.
dokwe status#
dokwe statusShow project status.
dokwe open#
dokwe openOpen project in browser.
dokwe restart#
dokwe restartRestart project containers.
dokwe stop#
dokwe stopStop project. Asks you to confirm, because this takes the app offline.
dokwe start#
dokwe startStart/unpause project.
dokwe serve#
dokwe serve [flags]Expose your local app on a public preview URL. Builds a Docker image of the current folder and serves it on a random preview subdomain while the command runs. Press Ctrl+C to stop and clean up.
| Flag | Type | Default | Description |
|---|---|---|---|
--port | int | 3000 | Port your app listens on inside the container |
--skip-build | bool | false | Skip Docker build (use existing image) |
--image | string | auto-generated | Docker image tag to use |
Check and secure#
dokwe check#
dokwe check [flags]Check that this project is ready to deploy. Reads the project's build files (never source code or .env), runs rule checks against how Dokwe will build it, then an AI review. Each workspace gets 5 free AI reviews a week; after that it uses your own AI key from Settings → AI and integrations. Exits with status 1 when something will break the deploy. See Check before you deploy.
| Flag | Type | Default | Description |
|---|---|---|---|
-d, --dir | string | the linked project's root | Folder to check |
--json | bool | false | Print the result as JSON |
--no-ai | bool | false | Run the rule checks only |
dokwe security#
dokwe security [folder] [flags]Scan this codebase for security problems, on this machine: vulnerable dependencies, leaked secrets, insecure code and risky deploy configuration. Nothing is uploaded. The scanner is a one-time download of about 45 MB, which it asks about first. Exits with status 1 at --fail-on severity or above. See Security scan.
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Print the result as JSON |
--sarif | string | Also write SARIF 2.1.0 to this file (GitHub code scanning) | |
--fail-on | string | high | Exit with status 1 at this severity or above: critical, high, medium, low |
--history | bool | false | Also scan git history for secrets (slower) |
--update-db | bool | false | Refresh the vulnerability database now |
--offline | bool | false | Never download anything |
--include-tests | bool | false | Also check tests and fixtures for insecure code |
--exclude | string array | Paths or globs to leave out (repeatable) | |
--skip | string array | Leave out a check: deps, secrets, code, config | |
-y, --yes | bool | false | Download the scanner without asking (for CI) |
Environment#
dokwe env#
dokwe env [flags]
dokwe env <command>Manage environment variables. On its own, lists the project's variables. These commands manage project-level variables. See Environment variables.
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Output as JSON |
| Command | Usage | Description |
|---|---|---|
set | dokwe env set KEY=VALUE | Set an environment variable |
get | dokwe env get KEY | Get an environment variable |
remove | dokwe env remove KEY | Remove an environment variable |
import | dokwe env import [file] | Import from .env file (defaults to .env) |
pull | dokwe env pull [flags] | Download env vars to .dokwe/.env.prod |
push | dokwe env push [flags] | Upload .dokwe/.env.prod to Dokwe (resolves 1Password refs) |
edit | dokwe env edit [flags] | Open env file in your editor |
Flags for pull, push, and edit:
| Command | Flag | Type | Default | Description |
|---|---|---|---|---|
pull | --env | string | prod | Environment name (prod, staging, etc.) |
push | --env | string | prod | Environment name (prod, staging, etc.) |
edit | --env | string | prod | Environment name |
--env selects the local file .dokwe/.env.<name>. edit opens it with $EDITOR, then $VISUAL, then vi (notepad on Windows).
dokwe vault#
dokwe vault <command>Manage 1Password vault integration. Requires the 1Password CLI (op).
| Command | Usage | Description |
|---|---|---|
status | dokwe vault status | Check 1Password CLI status |
resolve | dokwe vault resolve [flags] | Resolve 1Password references in env file (dry run) |
| Command | Flag | Type | Default | Description |
|---|---|---|---|---|
resolve | --env | string | prod | Environment name |
Domains#
dokwe domains#
dokwe domains
dokwe domains <command>Manage custom domains. On its own, lists the project's domains with their type and SSL status. See Custom domains and HTTPS.
| Command | Usage | Description |
|---|---|---|
add | dokwe domains add <domain> | Add a custom domain |
remove | dokwe domains remove <id-or-domain> | Remove a custom domain |
verify | dokwe domains verify <id-or-domain> | Verify domain DNS. Exits with an error and lists the missing records if a check fails |
Services#
dokwe services#
dokwe services [flags]
dokwe services <command>Manage services (databases, caches). On its own, lists your services. See Databases.
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Output as JSON |
| Command | Usage | Description |
|---|---|---|
create | dokwe services create [name] | Create a new service. Prompts for the type: postgres, mysql, or redis. |
info | dokwe services info <id-or-slug> | Show service details and connection info |
stop | dokwe services stop <id-or-slug> | Stop a service |
start | dokwe services start <id-or-slug> | Start a service |
delete | dokwe services delete <id-or-slug> | Delete a service |
Logs#
dokwe logs#
dokwe logs [flags]Stream container logs. See Logs and terminal.
| Flag | Type | Default | Description |
|---|---|---|---|
--build | bool | false | Show build logs instead of container logs |
--token | string | Share token — stream logs without logging in |
dokwe logs share#
dokwe logs share [flags]Generate a share token for log streaming. Anyone with the token can run dokwe logs --token <token>.
| Flag | Type | Default | Description |
|---|---|---|---|
--label | string | Human-readable label for this token |
dokwe ps#
dokwe psShow container metrics.
Fleet#
dokwe fleet#
dokwe fleet <command>Manage Dokwe Fleet hosts and workloads. These are read-only commands. See Fleet.
dokwe fleet list#
dokwe fleet list [flags]List Fleet hosts in your workspace.
| Flag | Type | Default | Description |
|---|---|---|---|
--cluster | string | Filter by cluster id | |
--site | string | Filter by site id | |
--os | string | Filter by OS family (linux | windows | darwin) | |
--status | string | Filter by status (online | offline | degraded | error) | |
-q, --q | string | Free-text search (hostname, IP, OS version) | |
--json | bool | false | Output as JSON |
dokwe fleet describe#
dokwe fleet describe <host> [flags]Show detail for one Fleet host (by id or hostname).
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Output as JSON |
dokwe fleet workloads#
dokwe fleet workloads [flags]List managed workloads.
| Flag | Type | Default | Description |
|---|---|---|---|
--host | string | Filter by host id | |
--cluster | string | Filter by cluster id | |
--kind | string | Filter by execution kind (systemd, container, …) | |
--mode | string | Filter by management mode (1, 2, or 3) | |
--json | bool | false | Output as JSON |
Utilities#
dokwe init#
dokwe init [flags]Detect the framework in the current directory and write a starter dokwe.yml. The generated file always uses mode: native and is validated before the command exits. See dokwe.yml reference.
| Flag | Type | Default | Description |
|---|---|---|---|
-o, --out | string | dokwe.yml | Output path |
--framework | string | Force framework: laravel | nextjs | node | php | generic | |
--non-interactive | bool | false | Skip prompts; use flags + defaults (CI mode) |
--host | string | BYOS server name | |
--domain | string | Primary domain (services.web.domain) | |
--destination | string | Host filesystem path (deploy.destination) | |
--force | bool | false | Overwrite an existing dokwe.yml |
dokwe validate#
dokwe validate [flags]Validate dokwe.yml against the manifest schema (no network). Runs JSON Schema validation plus native-mode cross-field checks and prints errors and warnings. Exits with status 1 if there are errors.
| Flag | Type | Default | Description |
|---|---|---|---|
-f, --file | string | dokwe.yml | Path to manifest |
dokwe update#
dokwe updateUpdate Dokwe CLI to the latest version. Alias: upgrade.