npm install- Install PostgreSQL locally or use a cloud service like Railway, Supabase, or Neon
- Create a database named
whisper_db - Copy
.env.exampleto.envand update theDATABASE_URL
cp .env.example .envUpdate your .env file to use SQLite:
DATABASE_URL="file:./dev.db"# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate dev --name init
# (Optional) Seed the database
npx prisma db seed# Development mode
npm run dev
# Production mode
npm startThe API will be available at http://localhost:3000
API Documentation: http://localhost:3000/docs
The package is published as @whisper/whisper-cli to avoid conflicts with existing packages.
- Passport.js: Industry-standard authentication library
- JWT Tokens: Secure token-based authentication
- Bcrypt: Password hashing with salt rounds of 12
- Rate Limiting: Built-in protection against brute force attacks
- CORS: Configurable cross-origin resource sharing
- Helmet: Security headers for production
# Login to your Whisper account
whisper auth login
# Check authentication status
whisper auth status
# Logout
whisper auth logoutCopy .env.example to .env and configure:
# Required
DATABASE_URL="postgresql://username:password@localhost:5432/whisper_db"
JWT_SECRET="your-super-secret-jwt-key"
# Optional
PORT=3000
NODE_ENV=development
# AI Provider API Keys (Backend Only)
# These are managed centrally - users don't need to configure these
OPENAI_API_KEY="your-openai-key"
GEMINI_API_KEY="your-gemini-key"
ANTHROPIC_API_KEY="your-anthropic-key"- Authentication and profile management
- API key generation for CLI access
- Role-based access control (OWNER, ADMIN, MEMBER, VIEWER)
- Team management and collaboration
- Shared projects and scans
- Organization-level subscriptions
- Code repositories and scan configurations
- Custom security rules and settings
- Security scan results and findings
- Historical tracking and analytics
- Billing and usage tracking
- Plan limits and features
POST /api/v1/auth/register- User registrationPOST /api/v1/auth/login- User loginPOST /api/v1/auth/refresh- Token refreshGET /api/v1/auth/me- Get current user profilePOST /api/v1/auth/logout- Logout user
GET /health- API health status
# Install dependencies
npm install
# Start development server
npm run dev
# Run database migrations
npx prisma migrate dev
# View database in Prisma Studio
npx prisma studio
# Generate Prisma client
npx prisma generate
# Reset database
npx prisma migrate reset
# Lint code
npm run lint
# Run tests
npm test- Set
NODE_ENV=production - Use a secure
JWT_SECRET - Configure production database URL
- Set appropriate CORS origins
npx prisma migrate deploy- Update default JWT secret
- Configure CORS for production domains
- Set up SSL/TLS certificates
- Configure rate limiting
- Set up monitoring and logging
- Enable database backups
-
Database Connection Error
- Check if PostgreSQL is running
- Verify DATABASE_URL in .env file
- Ensure database exists
-
JWT Token Issues
- Verify JWT_SECRET is set
- Check token expiration
- Ensure proper Authorization header format
-
Permission Errors
- Check user roles and permissions
- Verify organization membership
- Ensure account is active
For support and issues, please visit:
- GitHub Issues: https://github.com/whisper-cli/whisper/issues
- Documentation: https://whisper-cli.dev