Auth Command
Manage authentication credentials for Kodezi CLI including login, status checks, logout, and storage details.
The auth command handles all authentication operations for Kodezi CLI, including logging in, checking token validity, and securely removing stored credentials.
Authentication is required to unlock:
- AI model access
- Usage limits & billing sync
- Saved session history
- Project preferences
- MCP/LSP initialization
If you try to use the CLI without authentication, you will be prompted automatically.
Usage
kodezi auth [subcommand]Available subcommands:
login: Authenticate with email + tokenstatus: Check authentication and token validitylogout: Clear stored credentials
Subcommands
Login
Authenticate your CLI using your Kodezi email and API token
Command:
kodezi auth loginThis opens an interactive prompt.
Interactive flow:
Kodezi CLI Authentication
========================
Enter your Kodezi email: user@example.com
Enter your Kodezi token: ********************************
Validating credentials...
[OK] Successfully authenticated!
[OK] Email: user@example.com
[OK] Credentials saved to: ~/.kodezi-cliWhere to get your token?
- Go to https://kodezi.com
- Sign in
- Navigate to: Settings → Developer → API Tokens
- Click Generate Token
- Copy and paste it in the CLI prompt
The token input is masked for security. Credentials are validated before being saved.
Keep Your Token Secure
Your API token gives full access to your AI resources. Never commit it to Git, share it, or expose it publicly.
Status
Check your current authentication status and validate token:
Command:
kodezi auth statusWhen authenticated:
Authentication Status
=====================
Email: user@example.com
Token: abcd123456...wxyz (64 chars)
Last Verified: 2 hours ago
Validating token...
[OK] Token is validWhen not authenticated:
[X] Not authenticated
Run 'kodezi auth login' to authenticateWhen token is invalid or expired
Authentication Status
=====================
Email: user@example.com
Token: ***************
[ERROR] Token is invalid or expired
Run: kodezi auth loginLogout
Remove your stored credentials:
kodezi auth logoutOutput:
[OK] Successfully logged out
[OK] Credentials removed from configurationThis does not delete your account, only local CLI credentials.
Storage Location
Kodezi CLI uses a secure configuration directory to store your login information.
You can view the path using:
kodezi dirsGlobal Flags
Global CLI flags also work with auth commands.
# Use custom data directory
kodezi --data-dir /path/to/dir auth login# Run in a different working directory
kodezi --cwd /project auth status# Debug authentication
kodezi -d auth loginSee kodezi --help for all global flags.