malv login

Authenticate with the MALV registry. Required for publishing apps and accessing private apps.

Usage

malv login

What It Does

Opens your browser for OAuth authentication. After you sign in:

  1. Your identity is verified
  2. An auth token is saved locally
  3. You can publish and access private apps

Output

$ malv login

Opening browser for authentication...

Waiting for authentication... (press Ctrl+C to cancel)

✓ Logged in as [email protected]
  Organizations: @malv, @acme

Token saved to ~/.malv/auth.json

When Authentication Is Required

Action Auth Required
Publishing apps Yes
Installing private apps Yes
Managing organizations Yes
Installing public apps No
Local development No

Token Storage

The auth token is saved to ~/.malv/auth.json with restricted permissions (600). It contains:

Check Current User

See who you're logged in as:

malv whoami

Output:

Logged in as [email protected]
  User ID: usr_abc123
  Name: John Doe

Organizations:
  @malv (member)
  @acme (owner)

Token expires in 28 days.

Log Out

Remove your stored credentials:

malv logout

Output:

✓ Logged out from [email protected]
Token removed from ~/.malv/auth.json

Token Expiration

Tokens expire after 30 days. The CLI automatically refreshes tokens when possible. If your token expires:

Error: Token expired. Run 'malv login' to re-authenticate.

Run malv login again to get a new token.

Multiple Accounts

The CLI stores one account at a time. To switch accounts:

malv logout
malv login  # Sign in with different account

CI/CD Authentication

For automated environments, set the MALV_AUTH_TOKEN environment variable instead of using malv login:

export MALV_AUTH_TOKEN="your-token-here"
malv publish

Generate a CI token from your account settings on the MALV website.

Troubleshooting

Browser doesn't open

The CLI prints a URL you can copy manually:

Opening browser for authentication...
If browser doesn't open, visit: https://auth.malv.ai/cli?code=abc123

Authentication fails

"Not authorized" after login

Your account may not have access to the resource. Check:

Related Commands