██████╗ █████╗ ███████╗███████╗ ██████╗██╗ ██╗██████╗ ███████╗ ██████╗ ██████╗
██╔════╝██╔══██╗██╔════╝██╔════╝ ██╔════╝██║ ██║██╔══██╗██╔════╝██╔═══██╗██╔══██╗
██║ ███████║█████╗ █████╗ ██║ ██║ ██║██████╔╝███████╗██║ ██║██████╔╝
██║ ██╔══██║██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██╗╚════██║██║ ██║██╔══██╗
╚██████╗██║ ██║██║ ███████╗ ╚██████╗╚██████╔╝██║ ██║███████║╚██████╔╝██║ ██║
╚═════╝╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝
A CLI tool for managing and sending Cursor credits to event attendees via email.
- Upload and manage attendee lists from CSV
- Upload and track Cursor credit codes
- Send personalized emails with credit codes using Resend
- Track credit status (available, assigned, sent, redeemed)
- Local Mode: Run without a database using CSV files for storage
- Bun (v1.0 or later)
- Convex account (optional, only for Cloud Mode)
- Resend account with verified domain (optional, only for Cloud Mode)
git clone <repository-url>
cd cafe-cursor-clibun installbun run cliThat's it for Local Mode! The CLI will use CSV files for storage and no external services are required.
If you want to use Cloud Mode with database sync and email sending, follow these additional steps:
# Login to Convex
bunx convex login
# Initialize Convex (creates a new project)
bunx convex devThis will create a new Convex project and start syncing your schema.
Create a .env file in the root directory:
CONVEX_URL=https://your-deployment.convex.cloud
RESEND_API_KEY=re_xxxxxxxxxxxxx
RESEND_FROM_EMAIL=credits@yourdomain.comYou can find your CONVEX_URL in the Convex dashboard after running bunx convex dev.
Go to your Convex Dashboard:
- Select your project
- Go to Settings > Environment Variables
- Add:
RESEND_API_KEY- Your Resend API keyRESEND_FROM_EMAIL- Your verified sender email
When you start the CLI, you'll be prompted to select a storage mode:
-
Cloud Mode (Convex Database)
- Uses Convex database for storage
- Requires environment variables (CONVEX_URL, RESEND_API_KEY, RESEND_FROM_EMAIL)
- Data synced across devices
- Sends actual emails via Resend
-
Local Mode (CSV Files)
- Uses CSV files in the current directory for storage
- No database setup required
- Files created:
cafe_people.csv,cafe_credits.csv - Credits are assigned but no emails are sent
- Send Cursor Credits - Browse attendees and send credits via email
- Upload Cursor Credits - Import credit codes from a CSV file
- Upload Attendees - Import attendees from a CSV file
first_name,last_name,email,What is your LinkedIn profile?,What is your X (Twitter) handle?,What would you like to drink?,What would you like for Snacks?,What are you working on?
John,Doe,john@example.com,https://linkedin.com/in/johndoe,@johndoe,Coffee,Croissant,Building an AI startup
Required columns: first_name, last_name, email
url,code,amount
https://cursor.com/referral?code=ABC123,ABC123,20
bun testbun run buildbunx convex devcafe-cursor-cli/
├── convex/ # Convex backend (optional, for Cloud Mode)
│ ├── schema.ts # Database schema
│ ├── credits.ts # Credit mutations/queries
│ ├── people.ts # People mutations/queries
│ ├── email.ts # Email sending action
│ └── emailHelpers.ts # Email helper mutations
├── src/
│ ├── cli.tsx # Main CLI entry point
│ ├── screens/ # CLI screens
│ ├── components/ # Reusable components (includes ModeSelector)
│ ├── context/ # React contexts (StorageContext for mode)
│ ├── hooks/ # Custom hooks (storage abstraction)
│ ├── emails/ # Email templates
│ └── utils/ # Utility functions (includes localStorage)
└── test/ # Test files