-
Notifications
You must be signed in to change notification settings - Fork 2
Knightwatch cli
Yousef Ghadiri edited this page Jul 1, 2026
·
1 revision
knightwatch-cli is a command-line client for talking to a knightwatch server over its REST API — locally or remote.
See Installation — pass --package knightwatch-cli (shell) or -Package knightwatch-cli (PowerShell).
knightwatch-cli --url http://localhost:8083 health| Option | Env var | Default |
|---|---|---|
--url / -u
|
KW_URL |
http://localhost:8083 |
--token / -t
|
KW_TOKEN |
— |
If the server has auth enabled, log in once and reuse the token:
knightwatch-cli login -u admin -p secret # prints a bearer token
export KW_TOKEN=<token>Commands mirror the server's API Reference one-to-one:
-
Common —
health,info,shutdown -
Auth —
login,logout -
Screenshot —
screenshot -
Process —
root-pids,process-tree,top-processes,kill-process,track-pid, poll controls, etc. -
System resources —
system,cpu,memory,disks,networks,gpus,battery,set-thresholds, poll controls, etc. -
Systemd —
systemd,unit,failed-units, poll controls, etc. -
Docker —
docker-containers,container,stop-container,restart-container, poll controls, etc. Command names with commands requiring server flags (e.g.--allow-process-commands) will fail if that feature isn't enabled on the server.
Run knightwatch-cli --help or knightwatch-cli <command> --help for the full list of commands and their arguments.