Skip to content

CLI

The CLI is used to administrate your yawa server. It runs directly on the server and is not exposed over the network — all commands connect to a local-only port, so you need to exec into your Docker container to use it:

Terminal window
docker exec -it <container-name> ./cli <command>

Manage the sites yawa collects analytics for.

SubcommandDescription
createRegister a new site by hostname
linkLink an additional hostname to an existing site
listList all registered sites
updateUpdate the status of a site
Terminal window
./cli site create --hostname example.com
OptionDescription
--hostnameHostname to register (e.g. “example.com”)

If your site is reachable on more than one hostname (for example a yourdomain.com and its www.yourdomain.com subdomain), link the extra hostname to your site so it can be tracked.

Terminal window
./cli site link --id <site-id> --hostname www.example.com
OptionDescription
--idSite ID to link the hostname to
--hostnameAdditional hostname to link (e.g. “www.example.com”)
Terminal window
./cli site list
Terminal window
./cli site update --id <id> --status disabled
OptionDescription
--idSite ID to update
--statusNew status (active, disabled, or archived)

Administrate access tokens. Tokens are used to authenticate MCP clients.

SubcommandDescription
createCreate a new access token
listList all access tokens
disableDisable an access token
Terminal window
./cli token create --name mytoken
OptionDescription
--nameName to identify the token
--expiresOptional expiry datetime in ISO 8601 format (e.g. “2027-01-01T00:00:00Z”)
Terminal window
./cli token list
Terminal window
./cli token disable --id <id>
OptionDescription
--idToken ID to disable