Logging in
The CLI talks to the Trustisto API as you, with your e-mail and API token. Templates you deploy belong to your organization.
Get the API token
In the panel go to Settings > Integrations and copy the API token. Treat it like a password: anyone with the token can act on your account.
Log in
trustisto loginlogin asks for the e-mail and the token (the token is not shown while you type), checks them with the API and saves them. To check who you are logged in as:
trustisto whoamiyou@example.com (organization 1234) on https://trustisto.comThe login is saved in credentials.json in the CLI’s config folder (~/.config/trustisto on macOS and Linux), readable only by your user. trustisto logout removes it.
In CI and scripts
Set two environment variables instead of running login. When both are set, the CLI uses them and ignores the saved login:
| Variable | Value |
|---|---|
TRUSTISTO_EMAIL |
Account e-mail |
TRUSTISTO_TOKEN |
API token |
Keep the token in your CI’s secret variables, never in the repository.
Outside a terminal the CLI cannot ask questions. A command that would ask one fails and names the flag that answers it instead, for example --name and --yes for template deploy. See Deploying from CI.
Logging in with flags
login also takes the values as flags, which is handy in a script that should save the login once:
trustisto login --email you@example.com --token "$TRUSTISTO_TOKEN"