@edpear/cli
v1.0.0
Published
EdPear CLI - Connect your account and manage API keys
Downloads
8
Readme
EdPear CLI
Command-line interface for EdPear - AI-powered educational components.
Installation
npm install -g @edpear/cliUsage
Authentication
# Login to your EdPear account
edpear loginThis will open your browser for authentication. After logging in, copy the authentication token and paste it in the terminal.
Generate API Key
# Generate a new API key
edpear generate-keyThe CLI will prompt you for a name for your API key and automatically save it to your .env.local file.
Check Status
# View your account status and API keys
edpear statusLogout
# Logout from EdPear
edpear logoutConfiguration
The CLI stores configuration in ~/.edpear/config.json. This includes:
- Authentication token
- User information
- API keys
- Preferences
Environment Variables
EDPEAR_API_URL: Override the default API URL (default: https://api.edpear.com)
Examples
Basic Workflow
# 1. Install and login
npm install -g @edpear/cli
edpear login
# 2. Generate API key
edpear generate-key
# 3. Check status
edpear statusUsing with SDK
After generating an API key, you can use it with the EdPear SDK:
const { EdPearClient } = require('@edpear/sdk');
const client = new EdPearClient({
apiKey: process.env.EDPEAR_API_KEY
});Troubleshooting
Authentication Issues
If you're having trouble with authentication:
- Make sure you're logged in to the correct account
- Try logging out and logging back in:
edpear logout && edpear login - Check your internet connection
API Key Issues
If your API key isn't working:
- Verify the key is correct:
edpear status - Check your credits:
edpear status - Generate a new key if needed:
edpear generate-key
Support
For support and questions:
- Documentation: https://docs.edpear.com
- Support: [email protected]
- GitHub Issues: https://github.com/edpear/cli/issues
