Building a Life Tracker with AI CLI Tools: How to “Vibe Code” Your Perfect Self-Use App

As you know, I got into self hosting and home labbing in the persuit of data redundancy and the hunt to find that one, do-it-all life organizing app. From my note-taking app adventures to building out the MiniLab server rack, I love tinkering with systems that make life better, or at least a bit easier.

My drive for home labbing stems from my brain struggling to keep up with the hustle and bustle of a high-demand world. I want to write down all my tasks, but not clutter up a “completed” tasks section when looking back on the year. I want a minute-by-minute note taker, but not clutter up Obsidian with 50,000 one-word notes. I wanted a medication reminder if I had already taken them or not today. Or even quickly see how long it’s been since… idk the last time I rode my motorcycle. But I just don’t want clutter when tracking all of this.

So, what if I told you that you can build your own custom life tracker app without really knowing how to code? Thanks to AI CLI tools like Claude, Gemini, and OpenCode, you can “vibe code” your way to a perfectly tailored application.

What We’re Building: Djotter – A Life Tracker

Djotter is an otter-themed daily journal application that tracks:

  • Health metrics (sleep, heart rate, exercise, mood)
  • Daily journaling with Markdown support
  • Activity logging with minute-by-minute tracking
  • Data export to your favorite second-brain apps
  • Multi-user support with admin controls
  • Docker-ready deployment
    The beauty of Djotter is that it’s designed to be a self-hosted, privacy-first solution that you control completely.

Why AI CLI Tools Are Game-Changers

Before we dive in, let’s talk about why AI CLI tools are perfect for this kind of project:

1. Natural Language to Code

Instead of learning complex frameworks, you can describe what you want in plain English and let the AI handle the implementation.

2. Context Awareness

These tools can read your existing files, understand your project structure, and maintain consistency across your codebase.

3. Real-time Problem Solving

When you hit a roadblock, the AI can help debug, suggest alternatives, and explain concepts in ways you understand.

The AI CLI Landscape: Which Tool to Use?

I tested three major AI CLI tools for this project. Here’s my breakdown:

1. OpenCode (Winner for This Project)

Pros:

  • Open source and privacy-focused
  • Excellent local file context handling
  • Built specifically for coding tasks
  • Supports 75+ LLM providers
  • Free models included
    Cons:
  • Newer tool, smaller community
  • Learning curve for advanced features
    Best for: Privacy-conscious developers who want full control over their AI models.

2. Claude CLI

Pros:

  • Superior code understanding
  • Excellent at maintaining context
  • Great at explaining complex concepts
  • Strong with full-stack applications
    Cons:
  • Requires Anthropic subscription
  • Less local file integration
  • More expensive for heavy use
    Best for: Complex applications where code quality and understanding are paramount.

3. Gemini CLI

Pros:

  • Fast response times
  • Good with modern frameworks
  • Competitive pricing
  • Strong Google ecosystem integration
    Cons:
  • Inconsistent with complex codebases
  • Less context awareness
  • Sometimes misses nuanced requirements
    Best for: Quick prototyping and simpler projects.

Step 1: Setting Up Your AI CLI Environment

Let’s start with OpenCode since it’s the most flexible option:

# Install OpenCode
curl -fsSL https://opencode.ai/install | bash
# Initialize your project directory
mkdir djotter-ai
cd djotter-ai
# Start OpenCode with your preferred model
opencode --model claude-3.5-sonnet

For Claude CLI:

# Install Anthropic CLI
npm install -g @anthropic-ai/cli
# Authenticate
anthropic auth login
# Start coding
anthropic code

Step 2: Understanding the Djotter Architecture

Before we start building, let’s examine the Djotter structure:

Djotter/
├── server/                 # Node.js backend
│   ├── index.js           # Main server file
│   └── routes/            # API route handlers
├── client/                # React frontend
│   ├── src/               # React source code
│   └── dist/              # Built frontend
├── data/                  # SQLite database directory
├── journal/               # Markdown journal entries
├── docker-compose.yml     # Docker Compose configuration
└── package.json          # Node.js dependencies

Step 3: Cloning and Understanding the Base Project

First, let’s get the original Djotter code to understand what we’re working with:

# Clone the original repository
git clone https://github.com/RubeHicksCube/Djotter.git
cd Djotter
# Examine the structure
ls -la
cat README.md

Now, let’s use our AI CLI to understand the codebase:

# Start OpenCode
opencode
# In the OpenCode interface, ask:
"Analyze this Djotter project structure. What are the main components, 
what technologies are used, and what would be the best approach to 
customize this for personal use?"

The AI will break down the project into understandable components and suggest customization paths.

Step 4: Customizing with AI Assistance

Here’s where the magic happens. Let’s customize Djotter for our specific needs:

Personalizing the Theme

# In OpenCode:
"I want to change the otter theme to a wolf theme. Update all the 
references, icons, and styling to reflect a wolf/moon aesthetic 
instead of otters/water."

The AI will:

  • Find all otter references in the code
  • Suggest wolf alternatives
  • Update CSS variables for color schemes
  • Modify icons and imagery

Adding Custom Tracking Fields

# In OpenCode:
"Add custom tracking fields for:
1. Daily water intake (in glasses)
2. Meditation minutes
3. Reading time
4. Weather conditions
5. Productivity score (1-10)
Make sure these integrate with the existing tracker system 
and appear in exports."

The AI will:

  • Modify the database schema
  • Update the frontend forms
  • Integrate with the export system
  • Add validation and error handling

Creating Personalized Dashboards

# In OpenCode:
"Create a personalized dashboard that shows:
1. Weekly trends for mood and energy
2. Habit streaks for meditation and exercise
3. A 'quote of the day' feature
4. Quick-add buttons for common activities
5. A monthly review section
Use the existing data structure and make it responsive."

Step 5: Working with Local Files and Context

One of the biggest advantages of AI CLI tools is their ability to work with your local files. Here’s how to maximize this:

Setting Up Context Files

Create a context.md file in your project root:

# Project Context
## My Goals
- Track daily habits and mood patterns
- Export data to Obsidian for second-brain integration
- Maintain privacy and self-host everything
- Create a calming, minimalist interface
## Technical Preferences
- Use Docker for deployment
- SQLite for data storage
- React for frontend
- Node.js for backend
- No external dependencies
## Personal Notes
- I work night shifts, so the app should handle date changes at 6 AM
- I prefer dark themes
- I want to track my sleep schedule carefully
- Export should be compatible with Obsidian's format

Using the Context Effectively

# In OpenCode:
"Read the context.md file and understand my preferences. 
Now suggest improvements to the Djotter codebase that align with my goals and technical preferences. Focus on:
1. Night shift date handling
2. Dark theme optimization
3. Obsidian export compatibility"

Step 6: Advanced Customization Techniques

Adding AI-Powered Insights

# In OpenCode:
"Add an AI insights feature that:
1. Analyzes mood patterns and suggests correlations
2. Identifies habit streaks and breaks
3. Provides weekly summaries
4. Suggests optimal times for activities based on historical data
Use the existing data and keep everything self-hosted."

Creating Custom Export Formats

# In OpenCode:
"Create custom export templates for:
1. Obsidian-compatible Markdown with YAML frontmatter
2. PDF with personalized formatting
3. CSV for data analysis
4. JSON for backup/restore
Make sure each export includes all custom fields and 
maintains data relationships."

Step 7: Testing and Debugging with AI

When things go wrong (and they will), AI CLI tools are invaluable:

# In OpenCode:
"The Docker container won't start. Here's the error log:

Can you identify the issue and provide a step-by-step solution to fix it?”

Or for frontend issues:

# In OpenCode:
"The custom tracker form isn't submitting properly. 
The console shows [error]. Can you debug this issue 
and explain what went wrong?"

Step 8: Deployment and Maintenance

Docker Deployment

# In OpenCode:
"Create a production-ready Docker setup that:
1. Uses environment variables for sensitive data
2. Includes proper volume mounting for data persistence
3. Has health checks and restart policies
4. Optimizes for resource usage on a home server"

Backup and Updates

# In OpenCode:
"Create automated backup scripts that:
1. Back up the SQLite database daily
2. Export journal entries weekly
3. Create monthly archives
4. Include restore instructions
Make this work with Docker volumes and cron jobs."

Why You Should Do This Too

1. Perfect Fit for Your Needs

Commercial apps are built for everyone, which means they’re perfect for no one. Building your own ensures it matches your exact workflow.

2. Privacy and Control

Self-hosting means your data stays yours. No ads, no data mining, no sudden policy changes.

3. Learning and Growth

Even with AI assistance, you’ll learn about web development, databases, APIs, and system administration.

4. Cost-Effective

Once set up, there are no subscription fees. Just the cost of your home server (which you probably already have).

5. Creative Satisfaction

There’s something deeply satisfying about using a tool you built yourself, customized exactly how you like it.

The AI CLI Advantage: What Makes This Possible

Before AI CLI tools, this kind of project would require:

  • Months of learning web development
  • Understanding multiple programming languages
  • Debugging complex issues alone
  • Reading through endless documentation
    Now, you can:
  • Describe your vision in natural language
  • Get instant code suggestions and explanations
  • Debug problems with AI assistance
  • Learn concepts as you go

Common Challenges and Solutions

Challenge 1: “I Don’t Know What to Ask”

Solution: Start with the basics. Ask the AI to explain the codebase, then gradually move to modifications.

Challenge 2: “The AI Doesn’t Understand”

Solution: Provide more context. Use the context.md file and be specific about your goals.

Challenge 3: “The Code Doesn’t Work”

Solution: Ask the AI to debug step by step. Provide error logs and describe what you expected to happen.

Challenge 4: “I’m Overwhelmed”

Solution: Break it down. Focus on one small feature at a time and celebrate small wins.

Future Enhancements to Consider

Once you have your basic life tracker running, consider these AI-assisted additions:

1. Voice Input Integration

"Add voice-to-text functionality for quick journal entries 
using Web Speech API. Make it work offline for privacy."

2. Data Visualization

"Create interactive charts and graphs using Chart.js to 
visualize trends in mood, energy, and habits over time."

3. Smart Reminders

"Implement an intelligent reminder system that learns 
from your habits and suggests optimal times for activities."

4. Mobile App

"Create a React Native mobile app that syncs with the 
self-hosted backend. Focus on offline functionality."

Conclusion: The Power of AI-Assisted Development

Building your own life tracker with AI CLI tools isn’t just about the end product—it’s about the journey. You’ll learn, create, and end up with something perfectly tailored to your needs.
The combination of AI assistance and your vision creates something powerful. You don’t need to be a coding expert anymore; you just need to know what you want and be willing to experiment.

So grab your favorite AI CLI tool and start building. Your perfect life tracker is waiting to be created.

Resources Mentioned:

Related Posts:

Have you built your own life tracker? Share your experience in the comments below!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *