A simple command-line habit tracker that helps you build and maintain daily habits.
Monthly view of all habit completions
Last 30 days of habit tracking
Detailed view of a single habit's tracking
Completion statistics and streaks
List of habits not yet completed today
- Track multiple habits from the command line
- View your habits in a visual grid by day, week, month, or custom ranges
- Get statistics on your streaks and completion rates
- Import and export your data
- Minimal and fast interface
- Cross-platform: works on Windows, macOS, and Linux
- Go 1.20 or higher
# Clone the repository
git clone https://github.com/yourusername/habit-cli.git
cd habit-cli
# Run the installation script
chmod +x install.sh
./install.sh
The install script will:
- Build the binary
- Install it to
~/.local/bin/
- Add this directory to your PATH if using fish shell
- Provide instructions for other shells
# Clone the repository
git clone https://github.com/yourusername/habit-cli.git
cd habit-cli
# Run the PowerShell installation script (in an elevated PowerShell terminal)
.\install.ps1
The Windows installation script will:
- Build the binary
- Install it to
%USERPROFILE%\AppData\Local\Programs\habits-cli\
- Add this directory to your user PATH
- You'll need to restart any open command prompts for the PATH change to take effect
If the installation scripts don't work for you, you can manually build and install:
# Clone the repository
git clone https://github.com/yourusername/habit-cli.git
cd habit-cli
# Build the binary
go build -o habits habits.go # On Windows: go build -o habits.exe habits.go
# Move it to a directory in your PATH
# Linux/macOS:
mv habits /usr/local/bin/ # or another directory in your PATH
# Windows (PowerShell):
# Create destination folder
mkdir -Force -Path "$env:USERPROFILE\AppData\Local\Programs\habits-cli"
# Copy binary
Copy-Item -Path .\habits.exe -Destination "$env:USERPROFILE\AppData\Local\Programs\habits-cli"
# Add to PATH (optional)
$env:Path += ";$env:USERPROFILE\AppData\Local\Programs\habits-cli"
habits [command] [args]
habits list
- List all your tracked habitshabits add "Habit Name"
- Add a new habit to trackhabits done <habit>
- Mark a habit as completed for todayhabits delete <habit>
- Delete a habit from trackinghabits tracker [habit]
- View habit tracker (for a specific habit or all habits)habits stats [habit]
- Show statistics about your habits
habits export --file <filename>
- Export your habits data to JSONhabits import --file <filename>
- Import habits data from JSONhabits edit <habit> --name "New Name"
- Edit a habit's namehabits undone
- List habits not completed today
Run habits help
to see all available commands.
To try the application with sample data, you can use the included seed file:
# Import the seed data
habits import --file seed_data.json
- For the best experience on Windows, we recommend using Windows Terminal or PowerShell
- The default Windows Command Prompt (cmd.exe) has limited support for colors and formatting
- If you see garbled text or missing colors, try using Windows Terminal instead
- The application should work in most terminal emulators on macOS and Linux
- For the best experience, use a terminal that supports 256 colors
MIT