____ _____ __ __ __ __
/ __ \__ ______ / ___// /_________ ____ _/ /__ / //_/__ ___ ____ ___ _____
/ / / / / / / __ \ \__ \/ __/ ___/ _ \/ __ `/ //_/ / ,< / _ \/ _ \/ __ \/ _ \/ ___/
/ /_/ / /_/ / /_/ /___/ / /_/ / / __/ /_/ / ,< / /| / __/ __/ /_/ / __/ /
/_____/\__,_/\____//____/\__/_/ \___/\__,_/_/|_| /_/ |_\___/\___/ .___/\___/_/
/_/ [JavaScript]
β οΈ Important: This is an educational project demonstrating API integration with Node.js. It uses unofficial Duolingo endpoints that may change without notice. Use at your own risk β automated use may violate Duolingo's Terms of Service.
This tool automatically purchases streak freezes for your Duolingo account when needed, protecting your learning progress. Run it daily and it will:
- β Log into your Duolingo account
- β Check if you have an active streak freeze
- β Purchase one (200 gems) if you don't
- β Send you an email notification (optional)
No more losing your streak because you forgot to practice!
- Node.js 18+ β Download here
- A Duolingo account with 200+ gems
- 15 minutes to set up
1. Download the project
git clone https://github.com/marcbal77/DuolingoStreakApp.git
cd DuolingoStreakApp2. Install dependencies
npm install3. Create your config file
cp .env.example .env4. Add your credentials
Open .env in any text editor and fill in:
DUOLINGO_USERNAME=your_email_or_username
DUOLINGO_PASSWORD=your_password5. Test it out
npm run dry-run6. Run for real
npm startduo-streak-keeper-js/
βββ index.js # CLI entry point
βββ src/
β βββ duolingo-api.js # API client
β βββ streak-manager.js # Business logic
β βββ notifications.js # Email alerts
βββ .env.example # Config template
βββ package.json
node index.js # Run streak keeper
node index.js --dry-run # Preview without purchasing
node index.js --status # Check current streak info
node index.js --no-email # Disable email notifications
node index.js --help # Show all optionsnpm start # Run streak keeper
npm run dry-run # Preview mode
npm run status # Check status onlyGet alerts when:
- β Streak freeze purchased
β οΈ Gem balance running low- β Unable to purchase (not enough gems)
- π Streak broken
Gmail Setup:
- Enable 2-Step Verification
- Create an App Password
- Add to
.env:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
NOTIFICATION_EMAIL=your_email@gmail.comRun daily at 11 PM:
crontab -eAdd:
0 23 * * * cd /path/to/DuolingoStreakApp && node index.js >> /dev/null 2>&1
Create .github/workflows/streak.yml:
name: Maintain Streak
on:
schedule:
- cron: '0 23 * * *'
workflow_dispatch:
jobs:
maintain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm install
- run: node index.js
env:
DUOLINGO_USERNAME: ${{ secrets.DUOLINGO_USERNAME }}
DUOLINGO_PASSWORD: ${{ secrets.DUOLINGO_PASSWORD }}- β
Credentials stored locally in
.env(never committed) - β Password cleared from memory after login
- β No data sent anywhere except Duolingo's servers
- β Open source β inspect the code yourself
Disclaimer: This software is provided "as is" without warranty. The author is not responsible for any consequences of using this tool, including but not limited to account suspension.
Terms of Service: Using automated tools with Duolingo may violate their ToS. Use at your own risk for educational/personal purposes only.
This is the JavaScript/Node.js version. There's also a Python version available:
| Version | Repository | Best For |
|---|---|---|
| JavaScript (you are here) | DuolingoStreakApp | Node.js users, web developers |
| Python | duo-streak-keeper | Python users, data scientists |
Both versions have the same features β pick whichever language you prefer!
MIT License β see LICENSE for details.
Found a bug? Have an idea? Open an issue or submit a PR!
Built with β to protect π₯ streaks