varitykit login / auth
Log in to Varity from the CLI using a deploy key from the developer portal. Authentication is required for deploying apps and managing domains.
# Top-level shortcutvaritykit login
# Or use the auth subcommandvaritykit auth loginBoth commands do the same thing: prompt you for a deploy key and save it locally.
Prerequisites
Section titled “Prerequisites”You need a deploy key from the Varity developer portal:
-
Go to the developer portal
Open developer.store.varity.so/dashboard/settings in your browser.
-
Copy your deploy key
Find the deploy key section on the Settings page and copy the key.
-
Run the login command
Terminal window varitykit loginThe CLI will open the settings page in your browser automatically. Paste the key when prompted (input is hidden for security).
-
Verify you are logged in
Terminal window varitykit auth status
Commands
Section titled “Commands”Log in with your deploy key. The CLI opens the developer portal in your browser, then prompts you to paste the key.
varitykit login# orvaritykit auth loginExample 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, gateway key, database credentials Your domains are now protected. 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.
logout
Section titled “logout”Remove your saved credentials from this machine.
varitykit auth logoutThis removes the deploy key, gateway key, and database credentials from your local config file. You will need to run varitykit login again to deploy or manage domains.
status
Section titled “status”Show your current login status.
varitykit auth statusExample output when logged in:
Logged in (key: dk_live_...7f2a)Example output when not logged in:
Not logged in. Run 'varitykit login' to connect your developer account.Where Credentials Are Stored
Section titled “Where Credentials Are Stored”Credentials are saved to ~/.varitykit/config.json with restricted file permissions:
| Path | Permissions |
|---|---|
~/.varitykit/ | 700 (owner-only access) |
~/.varitykit/config.json | 600 (owner-only read/write) |
The config file may contain:
| Key | Description |
|---|---|
deploy_key | Your developer portal deploy key |
gateway_api_key | API key for the Varity gateway (auto-configured) |
jwt_secret | Database credentials (auto-configured) |
When Is Authentication Required?
Section titled “When Is Authentication Required?”| Command | Requires Login |
|---|---|
varitykit app deploy | Yes |
varitykit domains list | Yes |
varitykit doctor | No |
varitykit init | No |
varitykit template list | No |
Troubleshooting
Section titled “Troubleshooting””Not logged in” when deploying
Section titled “”Not logged in” when deploying”Run varitykit login and paste your deploy key from the developer portal.
”Invalid deploy key”
Section titled “”Invalid deploy key””Make sure you copied the full key from the developer portal Settings page. The key must be at least 10 characters long.
Credentials not persisting
Section titled “Credentials not persisting”Check that the CLI has write access to your home directory:
ls -la ~/.varitykit/If the directory does not exist, varitykit login will create it automatically.
Next Steps
Section titled “Next Steps”- Deploy your app - Deploy to production
- CLI Overview - All CLI commands
- Quick Start - Complete tutorial
Related Resources
Section titled “Related Resources”- Managed Credentials - How Varity manages your credentials
- Environment Variables - Required configuration