Authentication
The Codebolt CLI requires authentication to access platform features like publishing agents, listing your projects, and syncing configurations. This guide covers how to authenticate and manage your session.
Overview
Authentication in Codebolt CLI provides:
- Secure access to your Codebolt account
- Permission to publish and manage agents
- Access to private agents and tools
- Synchronization with the Codebolt platform
Login Process
Initial Login
To authenticate with your Codebolt account:
codebolt-cli login
This command will:
- Prompt you for your credentials
- Authenticate with the Codebolt platform
- Store your session securely
- Confirm successful authentication
Interactive Login Flow
The login process includes interactive prompts:
$ codebolt-cli login
? Email: [email protected]
? Password: [hidden]
✓ Successfully logged in!
Session Management
Check Authentication Status
To verify if you're currently logged in:
codebolt-cli listagents
If you're authenticated, this will display your agents. If not, you'll receive an authentication error.
Logout
To end your session:
codebolt-cli logout
This will:
- Clear your stored credentials
- End your current session
- Require re-authentication for future commands
Authentication Storage
Local Storage
The CLI stores authentication data locally in a secure format. The exact location depends on your operating system:
- Windows:
%APPDATA%\codebolt-cli\
- macOS:
~/Library/Application Support/codebolt-cli/
- Linux:
~/.config/codebolt-cli/
Security Considerations
- Credentials are stored securely using system-appropriate methods
- Session tokens have expiration times
- Logout clears all stored authentication data
- Never share your authentication files
Troubleshooting Authentication
Common Issues
Invalid Credentials
Error: Invalid email or password
Solution: Verify your email and password are correct. If you've forgotten your password, reset it on the Codebolt platform.
Session Expired
Error: Authentication token expired
Solution: Log out and log back in:
codebolt-cli logout
codebolt-cli login
Network Issues
Error: Unable to connect to authentication server
Solutions:
- Check your internet connection
- Verify firewall settings
- Try again after a few minutes
Permission Errors
Error: Unable to store authentication data
Solutions:
- Check file system permissions
- Run with appropriate privileges
- Clear existing authentication data
Manual Cleanup
If you encounter persistent authentication issues:
-
Logout completely:
codebolt-cli logout
-
Clear authentication cache (if needed):
# Remove authentication directory
# Windows
rmdir /s "%APPDATA%\codebolt-cli"
# macOS/Linux
rm -rf ~/.config/codebolt-cli -
Login again:
codebolt-cli login
Account Management
Creating an Account
If you don't have a Codebolt account:
- Visit codebolt.ai
- Sign up for a new account
- Verify your email address
- Return to the CLI and login
Password Reset
If you've forgotten your password:
- Visit the Codebolt platform
- Use the "Forgot Password" feature
- Follow the email instructions
- Return to the CLI with your new password
Security Best Practices
Recommendations
- Use Strong Passwords: Ensure your Codebolt account has a strong, unique password
- Regular Logout: Logout when finished, especially on shared machines
- Monitor Sessions: Regularly check your account for unauthorized access
- Keep CLI Updated: Update the CLI regularly for security patches
Multi-Factor Authentication
If your Codebolt account has multi-factor authentication enabled:
- The CLI will prompt for your MFA code during login
- Enter the code from your authenticator app
- The session will be established after successful verification
Commands Requiring Authentication
The following commands require authentication:
codebolt-cli publishagent
- Publish agents to the platformcodebolt-cli listagents
- List your agentscodebolt-cli pullagent
- Pull agent configurationscodebolt-cli cloneagent
- Clone agents (for private agents)
Commands Not Requiring Authentication
These commands work without authentication:
codebolt-cli version
- Check CLI versioncodebolt-cli createagent
- Create local agentscodebolt-cli createtool
- Create local toolscodebolt-cli startagent
- Start local agentscodebolt-cli runtool
- Run local toolscodebolt-cli inspecttool
- Inspect local tools
API Integration
The authentication system integrates with the Codebolt API:
- Endpoint: Secure HTTPS endpoints
- Token-based: Uses JWT tokens for session management
- Refresh: Automatic token refresh when possible
- Expiration: Tokens expire for security
Next Steps
After successful authentication: