https://github.com/quipex/obsidian-habit-tracking
Habit tracking in Obsidian via DataviewJS — one‑click logs, streaks, heatmap.
https://github.com/quipex/obsidian-habit-tracking
dataviewjs habit-tracker habit-tracking habits obsidian vibe-coding
Last synced: 23 days ago
JSON representation
Habit tracking in Obsidian via DataviewJS — one‑click logs, streaks, heatmap.
- Host: GitHub
- URL: https://github.com/quipex/obsidian-habit-tracking
- Owner: Quipex
- Created: 2025-09-10T22:59:49.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-09-29T00:05:19.000Z (about 1 month ago)
- Last Synced: 2025-09-29T00:16:50.632Z (about 1 month ago)
- Topics: dataviewjs, habit-tracker, habit-tracking, habits, obsidian, vibe-coding
- Language: JavaScript
- Homepage:
- Size: 655 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Obsidian Habit Button
This plugin lets you track your habits in a single tap. Features like streaks and heatmaps will help you staying motivated, while grace and warning periods will allow you to stay flexible within your timeline.
You can drop in your habit buttons anywhere including Canvas. To not lose the focus on lots of habits, there are groups that provide a quick status.
## Demo
### Habit Button
- render a tap-to-log habit card with streak, heatmap, and overdue hints
- supports per-block icons, grace periods, and granular layouts
### Habit Group
- aggregate multiple habits into a summarized status bar
- highlight streak health with ordered emerald/amber/gray segments
### Canvas Mashup
- mix and match buttons and groups on an Obsidian Canvas for quick daily reviews

## Installation
To use the plugin simply install it from the marketplace.
## Usage
### Habit Button block
Use a fenced code block with language `habit-button`:
```markdown
\`\`\`habit-button
title: Morning Stretch
icon: ☀️
gracePeriodHours: 24
warningWindowHours: 6
heatLayout: row
border: true
\`\`\`
```
Key properties:
- `title` *(required)* — label shown on the card; also used to derive the habit key.
- `gracePeriodHours` *(default 24)* — hours allowed before the streak resets.
- `warningWindowHours` *(default 24)* — hours that keep the streak active but mark it as at-risk (amber stripes).
- `heatLayout` — `grid` or `row`. Combine with `weeks`, `days`, and size options for fine-tuning.
- `border`, `icon`, `group`, and other advanced options inherit sensible defaults from plugin settings.
### Habit Group block
Summarize related habits with a `habit-group` block:
```markdown
\`\`\`habit-group
title: Morning Rituals
group: morning
icon: ☕
habitsLocations:
- habits/morning.md
- habits/stretching.md
eagerScan: true
\`\`\`
```
Groups read live data from the habit registry. Use `habitsLocations` when habits live in other notes or folders; enable `eagerScan` to rescan each render.
### Canvas placement
Drag the rendered blocks onto a Canvas or embed them via copy/paste. The plugin keeps stats in sync, so the Canvas view updates automatically when you mark a habit done elsewhere.
## Features
- **One-tap logging with history-aware streaks** — click the button to append a timestamped entry, update the streak, and repaint the heatmap instantly.

- **Adaptive warnings and styled progress** — warning windows render amber striped segments, while active habits stay emerald and inactive habits gray.

- **Habit groups with sortable segments** — see emerald (healthy), amber (warning), and gray (stalled) habits aligned in a single progress bar and aggregate counter.

- **Canvas-ready layout** — combine multiple cards and groups into dashboards, drag them around, and keep everything synchronized with your vault data.
