mirror of
https://github.com/hanzoskill/smart-followups.git
synced 2026-10-30 21:07:59 +00:00
3.3 KiB
3.3 KiB
🚀 Quick Start Guide
Get Smart Follow-ups running in under 5 minutes.
1️⃣ Prerequisites
- Node.js 18+ installed
- Anthropic API key (get one here)
2️⃣ Installation
cd /root/bot/skills/smart-followups
npm install
chmod +x cli/followups-cli.js test.sh
3️⃣ Set API Key
export ANTHROPIC_API_KEY="sk-ant-your-key-here"
Or add to ~/.bashrc / ~/.zshrc for persistence:
echo 'export ANTHROPIC_API_KEY="sk-ant-your-key-here"' >> ~/.bashrc
source ~/.bashrc
4️⃣ Test It!
Quick Test
./test.sh
This runs all output modes with sample data.
Manual Test
# JSON output
cat test-example.json | node cli/followups-cli.js --mode json
# Text output (Signal/iMessage format)
cat test-example.json | node cli/followups-cli.js --mode text
# Telegram button format
cat test-example.json | node cli/followups-cli.js --mode telegram
Custom Test
# Create your own conversation
echo '[{"user":"What is Rust?","assistant":"Rust is a systems programming language..."}]' | \
node cli/followups-cli.js --mode text
5️⃣ Expected Output
Text mode should look like:
💡 Smart Follow-up Suggestions
⚡ Quick
1. What are containers vs VMs?
🧠 Deep Dive
2. Explain Docker's architecture
🔗 Related
3. What about Kubernetes?
Reply with a number (1-3) to ask that question.
JSON mode should return:
{
"quick": "What are containers vs VMs?",
"deep": "Explain Docker's architecture",
"related": "What about Kubernetes?"
}
6️⃣ Integrate with Bot
See SKILL.md for full integration guide.
TL;DR:
- Copy this folder to Bot's skills directory
- Add to
bot.config.json:{ "skills": { "smart-followups": { "enabled": true, "autoTrigger": false } } } - Restart Bot
- Use
/followupsin any conversation
🐛 Troubleshooting
"ANTHROPIC_API_KEY environment variable is required"
Fix: Set the API key (see step 3)
"Error: Cannot find module '@anthropic-ai/sdk'"
Fix: Run npm install in this directory
Very slow responses (>5 seconds)
Check:
- Are you using Haiku? (
--model claude-haiku-4) - Network connection stable?
- Large conversation context?
Errors about JSON parsing
Likely: API returned non-JSON. Check:
# Enable verbose logging (future feature)
DEBUG=* node cli/followups-cli.js ...
📚 Next Steps
- Read README.md for feature overview
- Check examples.md for channel-specific outputs
- Review SKILL.md for Bot integration
- Explore INTERNAL.md for architecture details
💡 Tips
- Use Haiku: Default model, fastest and cheapest
- Manual trigger: Start with
/followupscommand, not auto-mode - Test locally: Verify CLI works before integrating with Bot
- Monitor costs: ~$0.0001 per generation with Haiku
✅ Checklist
- Node.js 18+ installed
- API key set as environment variable
npm installcompleted./test.shruns successfully- CLI produces valid JSON/text output
- Ready to integrate with Bot!
Need help? Check the main README.md or open an issue.