Command-line client (CLI)
webshield is the official command-line client for the WebShield API. It manages domains and DNS records, edge settings of proxied hosts, publishes static sites (including incremental publishing from CI), and shows statistics and billing usage.
Source code and releases: github.com/webshieldpro/webshield-cli.
Installation
Section titled “Installation”The installer detects your OS and architecture, downloads the latest release, verifies the SHA-256 checksum and installs the binary to ~/.local/bin:
curl -fsSL https://raw.githubusercontent.com/webshieldpro/webshield-cli/main/install.sh | shPrebuilt binaries are available for Linux (x86_64, aarch64 — static, no dependencies) and Windows on the releases page. You can also build from source with Rust:
git clone https://github.com/webshieldpro/webshield-clicd webshield-clicargo build --releasemv target/release/webshield ~/.local/bin/Shell completion
Section titled “Shell completion”Each release archive ships completion scripts; the binary can also generate them for bash, zsh, fish, PowerShell, elvish and nushell:
# bashwebshield completion bash > ~/.local/share/bash-completion/completions/webshield# zsh (the target dir must be on $fpath)webshield completion zsh > ~/.zfunc/_webshield# fishwebshield completion fish > ~/.config/fish/completions/webshield.fishAuthentication
Section titled “Authentication”The CLI uses a personal API token (wsk_…). Create one in the control panel under Settings → API tokens with the scopes you need — see API tokens. For CI, prefer a narrow token bound to a single domain or site.
webshield auth login # prompts for the token and saves it to a profilewebshield auth status # shows the active profile and verifies accessAlternative ways to pass the token: the --token flag or the WS_TOKEN environment variable (convenient in CI). Profiles are stored in ~/.config/webshield/config.toml; several profiles are supported via --profile (or WS_PROFILE), like in aws or gh.
Domains
Section titled “Domains”webshield domains list # your domains and delegation statuswebshield domains add example.com # add a domain (imports existing records by scanning)webshield domains add example.com --import nonewebshield domains check example.com # check delegation to WebShield nameserverswebshield domains remove example.comDNS records
Section titled “DNS records”webshield dns list example.comwebshield dns list example.com --type A
webshield dns add example.com www A 203.0.113.10 # add a value to the setwebshield dns set example.com @ A 203.0.113.10 # make the set exactly this valuewebshield dns remove example.com www A 203.0.113.10 # remove a single valuewebshield dns remove example.com www TXT # remove the whole record set
webshield dns add example.com www CNAME foo.example.com # trailing dot added automaticallywebshield dns add example.com @ MX "10 mail.example.com" --ttl 3600Semantics for multi-value types (A, AAAA, TXT, MX): add appends values to the existing set, set makes the set exactly the given values, remove deletes only the listed values (without values — the whole set). CNAME/NS are single-valued and always replaced.
webshield dns dnssec status example.com # DS records for the registrarwebshield dns dnssec enable example.comwebshield dns dnssec disable example.com # blocked while a DS is live in the parent zoneSee DNSSEC for the delegation-side steps.
Static sites
Section titled “Static sites”webshield sites listwebshield sites create www.example.com --domain example.comwebshield sites publish www.example.com --dir ./public # incremental publishwebshield sites publish --site-id 6 --dir ./public # by id (narrow sites:publish tokens)webshield sites publish www.example.com --dir ./public --dry-run # show the plan onlywebshield sites publish-from-bucket www.example.com --bucket web --path public/ # from your S3 bucketwebshield sites files www.example.compublish-from-bucket publishes the site straight from one of your own object-storage buckets (upload it there with any S3 tool first). The command starts the async publish and waits until it finishes.
publish computes a stateless diff against the server (by content hash), uploads only changed files, deletes vanished ones and atomically publishes a new version — safe to run from CI on every build. A minimal GitHub Actions step:
- name: Publish site env: WS_TOKEN: ${{ secrets.WS_PUBLISH_TOKEN }} run: | curl -fsSL https://raw.githubusercontent.com/webshieldpro/webshield-cli/main/install.sh | sh ~/.local/bin/webshield sites publish www.example.com --dir ./publicMore on hosting modes and CI tokens — Hosting static sites.
Proxied hosts and redirects
Section titled “Proxied hosts and redirects”webshield proxy listwebshield proxy get app.example.comwebshield proxy set app.example.com --domain example.com --ssl true --bot-protection truewebshield proxy set old.example.com --domain example.com \ --mode redirect --redirect-target example.comwebshield proxy remove app.example.comproxy set creates the host config or partially updates an existing one; boolean flags are sent only when specified, other settings stay untouched.
Statistics and billing
Section titled “Statistics and billing”webshield stats summary example.com --range 7d # traffic/requests summarywebshield stats bans example.com # active bans and challenges
webshield billing balancewebshield billing usage example.com # traffic vs the plan limitwebshield billing tariffs example.comScripting
Section titled “Scripting”Every command supports machine-readable output:
webshield -o json domains list | jq -r '.[].name'Interface language is selected with --lang en|ru (or WS_LANG); by default it follows the system locale. --yes skips confirmation prompts for destructive operations.