Skip to content

varitykit login and auth command

Varity TeamCore Contributors

Log in to Varity from the CLI using a deploy key from the developer portal. Authentication is required for deploying apps and managing domains.

Terminal window
# Top-level shortcut
varitykit login
# Or use the auth subcommand
varitykit auth login

Both commands do the same thing: prompt you for a deploy key and save it locally.

You need a deploy key from the Varity developer portal:

  1. Go to the developer portal

    Open developer.store.varity.so/dashboard/settings in your browser.

  2. Copy your deploy key

    Open the Deploy keys tab and click Create deploy key, then copy the key. Either varitykit login or the VARITY_DEPLOY_KEY environment variable supplies it.

  3. Run the login command

    Terminal window
    varitykit login

    In an interactive terminal the CLI opens the settings page in your browser and asks you to paste the key (input is hidden for security). In CI or any non-interactive shell, pass the key instead: varitykit login --key <key>.

  4. Verify you are logged in

    Terminal window
    varitykit auth status

Log in with your deploy key. The CLI opens the developer portal in your browser, then prompts you to paste the key.

Terminal window
varitykit login
# or
varitykit auth login

Example output:

╭─────────────────────────────────────────────────────╮
│ Get your deploy key from the developer portal: │
│ https://developer.store.varity.so/dashboard/settings│
╰─────────────────────────────────────────────────────╯
Opening https://developer.store.varity.so/dashboard/settings in your browser...
(input will be hidden for security)
Paste your deploy key: ********
Deploy key saved securely.
Logged in successfully!
Configured: deploy key
Run 'varitykit app deploy' to deploy.

If you are already logged in, the CLI will show your current key (masked) and ask if you want to replace it.

Remove your saved credentials from this machine.

Terminal window
varitykit auth logout

This removes the deploy key from your local config file. You will need to run varitykit login again to deploy.

Show your current login status.

Terminal window
varitykit auth status

Example output when logged in:

Logged in (key: vk_...7f2a)

Example output when not logged in:

Not logged in.
Run 'varitykit login' to connect your developer account.

Credentials are saved to ~/.varitykit/config.json with restricted file permissions:

PathPermissions
~/.varitykit/700 (owner-only access)
~/.varitykit/config.json600 (owner-only read/write)

The config file holds one credential:

KeyDescription
deploy_keyYour developer portal deploy key
CommandRequires Login
varitykit app deployYes
varitykit app listYes
varitykit migrateYes
varitykit doctorNo

Run varitykit login and paste your deploy key from the developer portal.

Make sure you copied the full key from the developer portal Settings page. The key must be at least 10 characters long.

Check that the CLI has write access to your home directory:

Terminal window
ls -la ~/.varitykit/

If the directory does not exist, varitykit login will create it automatically.