Getting Started with the CLI

Authentication, configuration and shell completion.

Once installed (see CLI Overview), the first thing to do is authenticate and verify the connection.

Login#

BASH
zensailor login

The interactive flow asks for your instance URL and an API token (create it in the dashboard under Settings → Security). The CLI stores the pair in ~/.zensailor/config.json with owner-only file permissions.

BASH
zensailor logout          # clear the saved session
zensailor config show     # print the active instance/identity context

Self-signed instances#

Home-lab and LAN installs use self-signed certificates. Pass the global --insecure flag to skip TLS verification for that invocation:

BASH
zensailor --insecure login
zensailor --insecure service deploy <service-id>

Shell completion#

BASH
zensailor completion bash     # or: zsh, fish

Add the output to your shell's rc file, and zensailor's commands and flags autocomplete from then on.

Mistakes are cheap: most destructive commands (service rm, node rm, backup deletes) prompt for confirmation. Non-interactive scripts should pass --yes/--confirm explicitly when the docs for the command show it.