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.

Subcommand Description
create Register a new site by hostname
link Link an additional hostname to an existing site
list List all registered sites
update Update the status of a site
Terminal window
./cli site create --hostname example.com
Option Description
--hostname Hostname 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
Option Description
--id Site ID to link the hostname to
--hostname Additional hostname to link (e.g. “www.example.com”)
Terminal window
./cli site list
Terminal window
./cli site update --id <id> --status disabled
Option Description
--id Site ID to update
--status New status (active, disabled, or archived)

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

Subcommand Description
create Create a new access token
list List all access tokens
disable Disable an access token
Terminal window
./cli token create --name mytoken
Option Description
--name Name to identify the token
--expires Optional 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>
Option Description
--id Token ID to disable