Skip to content

CLI

wgw-deploy publishes a static directory or a single file to a public wgw.lol URL. The default command deploys dist from the current working directory.

Terminal window
npx wgw-deploy

Use --dir when your build output is somewhere else. Use --cwd when the project root is not the shell’s current directory.

Terminal window
npx wgw-deploy --dir public
npx wgw-deploy --cwd /path/to/app --dir build

The local project identity is based on --cwd plus --dir. Reuse the same values when listing, deleting, or changing the domain for a project.

Add --json when another tool or agent needs to parse the result. Progress output is suppressed and the CLI prints one JSON object on success.

Terminal window
npx wgw-deploy --dir dist --json

Example deploy output:

{
"projectSlug": "bright-field-mqstr7zz",
"productionUrl": "https://bright-field-mqstr7zz.wgw.lol/",
"revisionUrl": "https://bright-field-mqstr7zz--26704cb219eb67f3.wgw.lol/",
"projectHash": "4d0c...",
"revisionId": "26704cb219eb67f3",
"files": 18,
"bytes": 428911,
"uploadedAssets": 18
}

The productionUrl always points at the latest deploy for the project. The revisionUrl is pinned to one immutable revision.

--list reads locally tracked projects from the CLI config directory. By default that is ~/.config/wgw-deploy/projects; WGW_DEPLOY_CONFIG_DIR overrides it, and XDG_CONFIG_HOME is respected.

Terminal window
npx wgw-deploy --list
npx wgw-deploy --list --json

JSON list output is an array. Each item includes the cwd, deployDir, statePath, current domain, productionUrl, revision IDs, timestamps, and expired.

Assign a WGW subdomain:

Terminal window
npx wgw-deploy --domain preview-build
npx wgw-deploy --domain preview-build.wgw.lol --json

Assign an external hostname:

Terminal window
npx wgw-deploy --domain docs.example.com --json

External hostname output includes DNS instructions:

{
"projectSlug": "bright-field-mqstr7zz",
"productionUrl": "https://docs.example.com/",
"projectHash": "4d0c...",
"revisionId": "26704cb219eb67f3",
"revisionUrl": "https://docs.example.com/_rev/26704cb219eb67f3/",
"dns": {
"type": "CNAME",
"name": "docs.example.com",
"value": "cname.wgw.lol"
}
}

Remove the assigned custom domain and return the project to its generated *.wgw.lol domain:

Terminal window
npx wgw-deploy --delete-domain
npx wgw-deploy --delete-domain --cwd /path/to/app --dir build --json

--delete removes the remote project and deletes the local project state for the selected --cwd and --dir.

Terminal window
npx wgw-deploy --delete
npx wgw-deploy --delete --cwd /path/to/app --dir build --json

JSON delete output:

{
"projectHash": "4d0c...",
"projectSlug": "bright-field-mqstr7zz",
"deleted": true
}

--skill prints the packaged WGW Deploy skill markdown. It exits after printing the skill and does not deploy.

Terminal window
npx wgw-deploy --skill
  • --dir <path>: deploy a directory or a single file. Defaults to dist.
  • --cwd <path>: resolve --dir from another project directory.
  • --domain <host>: assign a WGW subdomain or external custom hostname.
  • --list: list locally tracked projects.
  • --delete-domain: remove the assigned custom domain.
  • --delete: delete the selected project locally and remotely.
  • --json: print machine-readable success output.
  • --quiet, -q: suppress progress output.
  • --skill: print the agent skill markdown.
  • --help, -h: print CLI help.

The CLI rejects positional arguments. Use --dir for deploy targets.