A feature-rich plugin for Obsidian that helps you track your daily habits with an intuitive and visually appealing interface.
- Multiple Habit Views: Track your habits in three different ways:
- GitHub-style Year View: A familiar contribution graph showing your activity over the past year.
- Month View: A traditional monthly calendar for a detailed daily view.
- Year Overview: See all 12 months of the year at a glance, perfect for reviewing long-term progress.
- Comprehensive Habit Management: Easily add, edit, and delete habits using a clean UI with a custom dropdown selector.
- Interactive Tracking: Click on any day in the calendar views to toggle a habit as completed or not completed for that day.
- Automatic Data Persistence: All your habit data is automatically saved and loaded with your vault. No manual configuration files needed.
- Streak Calculation: The plugin automatically calculates and displays your current habit streak (visible in the GitHub-style view).
- Responsive Design: The interface adapts to different screen sizes and Obsidian themes.
You can open the Habit Tracker view in several ways:
- Click the calendar icon in the left-hand ribbon.
- Use the command palette (
Ctrl/Cmd+P) and search for the "Open Habit Tracker" command.
- In the Habit Tracker view, click the "Add" button in the control bar.
- An "Add Habit" modal will appear. Type the name of your new habit (e.g., "Exercise", "Read 30 minutes").
- Click "Add" or press
Enterto save it.
Your new habit will be automatically selected and ready for tracking.
- Select a Habit: Use the dropdown menu in the control bar to choose which habit you want to view or track.
- Mark as Complete: Click on any day in the calendar view to mark that habit as completed for that day. The day will turn green.
- Mark as Incomplete: Click on a completed (green) day to mark it as incomplete. It will revert to its default color.
- View Different Time Periods:
- Use the view type buttons (Year, Month, Year Overview) to switch between the different tracking views.
- In the Month View, use the arrow buttons (
◀and▶) to navigate between months, or click "Today" to jump back to the current month. - In the Year View and Year Overview, use the year selector on the right to view data from previous years.
- Edit a Habit:
- Select the habit you want to edit from the dropdown.
- Click the "Edit" button in the control bar.
- An "Edit Habit" modal will appear. Change the name of your habit.
- Click "Save" to confirm the change.
- Delete a Habit:
- Select the habit you want to delete from the dropdown.
- Click the "Delete" button in the control bar.
- A confirmation modal will appear. Click "Delete" to permanently remove the habit and all its associated data.
- Go to
Settings>Community Plugins. - Disable
Safe mode. - Click
Browseand search for "Habit Tracker". - Click
Installnext to the plugin. - Once installed, click
Enableto activate the plugin.
- Download the latest release files (
main.js,manifest.json,styles.css) from the GitHub repository. - Create a new folder named
habit-tracker-obsidianinside your vault's.obsidian/plugins/directory. - Copy the downloaded files into the
habit-tracker-obsidianfolder. - Reload Obsidian (
Ctrl+RorCmd+R). - Enable the plugin in
Settings>Community Plugins.
To set up the development environment and build the plugin:
# Clone the repository
git clone https://github.com/rengas/habit-tracker-obsidian.git
cd habit-tracker-obsidian
# Install dependencies
npm install
# Build the plugin for production
npm run build
# Watch for changes during development (rebuilds automatically)
npm run devAfter running npm run dev, you can load the plugin from the main.js file in your local Obsidian development vault for testing.
This plugin is licensed under the MIT License. See the LICENSE file for details.