Skip to content

Authentication

Use vizzly login for local account commands. Use a project token for commands that create or update cloud resources.

Local development

Run:

Terminal window
vizzly login

The CLI starts a device flow, opens your browser, and stores your auth data in ~/.vizzly/config.json.

When you’re signed in, commands like whoami, orgs, and projects use your user token automatically.

For project uploads from your local checkout, link the checkout to a Vizzly project:

Terminal window
vizzly project link your-org/your-project

That creates a project-scoped credential for run, upload, preview, and finalize.

Check your session

Terminal window
vizzly whoami
vizzly orgs
vizzly projects

whoami --json is the easiest way to inspect the current auth state in scripts.

Sign out

Terminal window
vizzly logout

CI and automation

Use a project token from Vizzly and pass it through VIZZLY_TOKEN.

Terminal window
export VIZZLY_TOKEN=vzt_your_project_token
vizzly run "npm test" --wait

You can also override per command:

Terminal window
vizzly run "npm test" --token vzt_other_token

Auth by command family

There is no single global auth order across every command.

  • run, upload, preview, and finalize use a project token from --token, VIZZLY_TOKEN, or vizzly project link.
  • whoami, orgs, and projects use your logged-in user token first.
  • builds, status, and cloud context commands can use either auth path.
  • comparisons uses a project credential. For account-authenticated comparison investigation, use vizzly context comparison.

Custom home directory

If you need to isolate CLI state, set VIZZLY_HOME:

Terminal window
export VIZZLY_HOME=/custom/path/.vizzly

That changes where the CLI stores account auth, project-link metadata, and other file-backed global state. On macOS, linked-project secrets stay in the system Keychain unless VIZZLY_DISABLE_KEYCHAIN=true is set.

Troubleshooting

If login looks broken, start over:

Terminal window
vizzly logout
vizzly login

If CI fails with an auth error, rotate the project token and update VIZZLY_TOKEN.

Next steps