“Reflect. Focus. Improve.” — A developer-first tool to help you log your work, stay focused, and get AI-powered daily insights — all from your terminal.
🚩 TL;DR
I built Reflex CLI, a privacy-first, AI-enhanced productivity tracker for developers who live in the terminal. It helps you:
- 📋 Manage daily tasks
- ⏱️ Run Pomodoro-style focus sessions
- 🧠 Reflect on your work using AI reviews (OpenAI, Claude, Gemini, or even local LLMs)
- 🔒 Work entirely offline if you prefer
👉 Try it here: GitHub – reflex-cli
💡 The Motivation Behind Reflex
Like many devs, I bounce between writing code, reviewing PRs, documenting features, and debugging production issues. I often ended my day feeling busy but not productive.
I tried productivity tools like Notion, Todoist, and even paid SaaS platforms — but most felt either too bloated, invasive, or not developer-friendly. I wanted something minimal, offline-first, and native to my workflow: the terminal.
Also, I was experimenting with LLMs and prompt engineering, and wondered:
“What if AI could help me reflect on how I worked today — not just answer questions?”
That’s where Reflex was born.
🔧 The Process: How I Built Reflex
The goal was to make it simple yet powerful. Here’s how I approached it:
1. Designing the CLI UX
- I used Typer to define commands like
add
,log
,focus
,stats
, andreview
. - Rich handled the pretty printing — tables, progress bars, terminal formatting.
2. Task & Focus Tracking (Local DB)
- Everything is stored locally using SQLite at
~/.reflex/reflex.db
. - Schema is minimal: tasks, focus_sessions, logs — with timestamps.
3. Integrating AI Providers
This was the hardest part. I added support for:
- OpenAI (gpt-3.5 / gpt-4)
- Anthropic Claude
- Google Gemini
- Ollama (local LLM runtime)
You can switch providers via .env
, and Reflex works even if you use no AI at all.
4. Offline & Privacy-First
- No data leaves your machine unless you hit the
review
command. - Everything — from tasks to logs — stays local.
😓 Problems I Faced
- Cross-platform bugs on Windows terminal formatting
- Prompt tuning for meaningful AI reviews from sparse logs
- Dealing with inconsistent API responses across providers
- Designing CLI ergonomics that feel intuitive (especially around logging and reviewing)
🧠 What I Learned
- Prompt Engineering = UX Design: Your AI is only as helpful as your prompts are intentional.
- Good developer tools respect context: I stayed terminal-first, offline-first, AI-optional — and it made the tool feel like it belonged.
-
Local LLMs are practical: Ollama surprised me. With
llama2
locally, AI reviews were good enough for most cases — and free.
📊 Reflex in Action
reflex add "Write blog post"
reflex start-focus
reflex log "Wrote 700 words on Medium"
reflex review --provider openai
Here’s an example of what the AI review looks like:
• You completed 3 of 4 tasks
• Focus sessions totaled 85 minutes
• Commits indicate steady progress
• Suggests breaking big tasks next time
🔮 What’s Next
- 🧵 Threaded Logs: Tag your logs by task or project
- 📅 Weekly AI Summaries: Not just daily — long-term insights
- 🧪 Goal-based Tracking: “Did I actually move toward X?”
- 🔌 API Plugin Support: Maybe even integration with GitHub Projects, Linear, etc.
🧭 Why Reflex Matters
In a world of noisy productivity tools, Reflex gives developers:
- 🔒 Full control over their data
- ⚡ A lightning-fast, local workflow
- 🧠 Real reflection with AI
- 💻 Terminal-native design that doesn’t break flow
If you're someone who wants to understand, not just log your work — this tool is for you.
🛠️ Try It Out
git clone https://github.com/priyanshunawaldev/reflex-cli.git
cd reflex-cli
pip install -e .
reflex add "Build something useful"
reflex start-focus
reflex review
It takes 5 minutes to set up. The .env.example has all configs to get started with any provider or offline mode.
💬 Let’s Connect
This was a personal project that turned into something I genuinely use daily. I’m actively improving Reflex and would love feedback or contributors.
👉 GitHub Repo
👤 LinkedIn
Top comments (0)