- Frontend: http://localhost:5173
- Backend: http://localhost:3001
The error "Failed to generate hooks" is because you need to add your OpenAI API key.
- Go to https://platform.openai.com/api-keys
- Sign in or create an account
- Click "Create new secret key"
- Copy the key (it starts with
sk-)
-
Open the file:
server/.env -
Replace this line:
OPENAI_API_KEY=your_openai_api_key_hereWith your actual key:
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxxx -
Save the file
The servers are already running, but you need to restart them after adding the API key:
Option A - From your terminal:
# Stop the current session (Ctrl+C)
# Then run:
bun run devOption B - Let me restart it for you: Just let me know and I'll restart the servers.
- Go to http://localhost:5173
- Click "Generate Hooks"
- Enter a topic like "productivity tips for developers"
- Click "Generate Hooks"
You should now see 5 AI-generated hooks!
- GPT-5.2 costs ~$0.03 per request
- Each hook generation = 1 request
- Each hook analysis = 1 request
- Your first $5 is free (on new accounts)
If you still see errors after adding the API key:
-
Check the key is valid
- Make sure it starts with
sk- - No extra spaces or quotes
- The key hasn't been deleted from OpenAI
- Make sure it starts with
-
Check the .env file
- File is in:
server/.env - Format is:
OPENAI_API_KEY=sk-your-key - No quotes around the key
- File is in:
-
Restart the servers
- The .env file is only read on startup
- You must restart after changing it
-
Check server logs
- Look in the terminal where
bun run devis running - Any errors will appear there
- Look in the terminal where
The app will:
- Generate 5 unique hooks for any topic
- Analyze hooks with scores 0-100
- Provide detailed feedback
- Save all hooks to history
Enjoy building better hooks! 🚀