staticweb.siteA TurbineWeb.com company

StaticWeb CLI reference

Install sws, connect your project, and deploy from your terminal.

Downloads

Linux guided installation

Download and inspect the installer, then run it. It verifies the release SHA-256 checksum, installs to ~/.local/bin without sudo, and adds the directory to Bash/Zsh profiles. Open a new terminal afterwards. Run the same installer to update. Symlinked profiles are skipped; add ~/.local/bin to PATH yourself in that case.

curl -fsSL https://staticweb.site/install.sh -o install-sws.sh
bash install-sws.sh
sws

Windows guided installation

Use PowerShell on Windows 10/11. The installer verifies the checksum, detects AMD64/ARM64, installs in your local application folder, and updates your user PATH. No administrator access or permanent execution-policy changes are needed. If you launch the installer in a separate PowerShell process, open a new terminal to pick up PATH.

Invoke-WebRequest https://staticweb.site/install.ps1 -OutFile install-sws.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\install-sws.ps1
sws

Guided workspace

Run sws or sws tui in a terminal. Use arrow keys and Enter to sign in, browse and select a project, link an output folder, deploy, inspect deployment status, or sign out. Escape returns without performing an action. Your build commands are never run automatically.

Explicit commands remain available for scripts and return JSON. The interactive menu requires a real terminal. Run sws version to check your release. To uninstall, remove the sws executable and its PATH entry; revoke the device in portal settings before deleting credentials.

Manual binary installation

Download the binary for your operating system and CPU below. SHA256SUMS contains release checksums. Windows ARM64 binaries are also available. On macOS and Linux, mark it executable. Place it on your PATH to use sws from any directory, or invoke ./sws directly. Windows users should download sws-windows-amd64.exe and run it in PowerShell.

The CLI is a standalone executable. No Node installation is required for the CLI itself; your framework may require Node to build locally.

curl -fL https://staticweb.site/downloads/sws-linux-amd64 -o sws
curl -fL https://staticweb.site/downloads/SHA256SUMS -o SHA256SUMS
# Compare sha256sum sws with the matching release entry.
chmod +x sws
./sws help

Sign in securely

Run sws login. A browser page opens and the terminal prints a 12-character code. Sign in to your verified account, enter that code, and authorize access. Approve only a code you initiated. Your account’s normal GitHub/email and authenticator checks still apply.

Tokens expire in 30 days. Credentials are saved under your operating system’s user configuration directory, in staticweb/credentials.json, with restrictive permissions where supported. They are never put in sws.json. Revoke a device in Profile & settings → CLI access or run sws logout.

sws login
sws whoami
sws projects

Deploy local build output

Build your project with your framework’s usual command, then run sws deploy to upload the output. The CLI does not run the build command for you. Your project must use the Upload source type.

The output must contain index.html at its root. Symlinks and special files are rejected. Dotfiles, dot-directories, node_modules, and sws.json are excluded. Do not place private files in your public output; all uploaded assets can become publicly accessible.

npm ci
npm run build
sws deploy
sws status DEPLOYMENT_ID

Trigger a repository build

For an existing Git-source project, sws deploy --remote uses the repository, branch, command, and output folder already saved in the portal. It does not upload your uncommitted local changes. Private GitHub access must already be connected.

Use sws status to check deployment progress, logs, and the live URL. A successful command does not mean the build has finished: wait for the deployment to report ready and its address to be available. Scripts should check the returned deployment status, not just the command’s exit code.

sws deploy --remote
sws status DEPLOYMENT_ID
sws logout

Using the CLI in scripts

Use the explicit CLI commands when you need JSON output for a script. Keep credentials private and never commit them or include them in logs.

Signing in requires browser approval. Dedicated CI access tokens and automatic pull-request previews are not available in this release.