Tiny Habits

approved

by Diego Nazoa

Habit tracking in a calendar table

10 stars1,508 downloadsUpdated 1mo ago0BSD
View on GitHub

Logo

Tiny-Habits

An Obsidian plugin for keeping track of your habits
Explore the docs »

View Demo · Report Bug · Request Feature

image PRs Welcome Test Linting Buy me a coffee

Table of Contents

Tiny Habits

An Obsidian Plugin built with Svelte to track different habits.

All the entries are stored inside your notes frontmatter. Everything stays local and within your markdown notes.

Features:

  • Mark habits as completed, failed, skipped, or not started.
  • A table of your habit entries, in the beloved format of a heatmap we see in Github or Anki.
  • Keyboard navigation support
  • Navigation both to future and past entries.

Preview:

A preview of this plugin

Usage

  • Make a code block with habits in the first line

  • Open brackets and indicate the folder path. Make sure you write the full folder path, otherwise it won't work.

  • Create a note in that folder to see the new habit in your habits table.

  • Voila!

    ```habits
    {
      "folderPath": "Areas/Habits/Tiny - Morning"
    }
    ```
    

You can use as many markdown blocks as you like in the same file. And if they get too big, you can collapse them by clicking the table header.

Keyboard support

You can navigate both with arrows and the hjkl keys. To mark a habit entry, you can do so by focusing on the entry and pressing enter.

To mark an entry with an specific status these are the shortcuts:

  • Completed - 1
  • Failed - 2
  • Skip - 3
  • Not started - 4

Options

```habits
{
  "folderPath": "Areas/Habits/Tiny - Morning", // the absolute path to the folder containing your habits
  "displayName": "Morning" // (optional) To customize the name that appears in the table
}
```

How to run it locally

If you are a developer and you wish to run it locally, follow these steps:

  • Clone this repo.
  • Make sure your NodeJS is at least v16 (node --version).
  • pnpm i to install dependencies.
  • pnpm run dev to start compilation in watch mode.

Manually installing the plugin

  • Copy over main.js, styles.css, manifest.json to your vault VaultFolder/.obsidian/plugins/your-plugin-id/.

Tests

Test

Run with pnpm run test

Linting

Linting

Run with pnpm run lint

Making a release

pnpm run version:new

Support

If you like the extension feel free to buy me a coffee! https://buymeacoffee.com/nzoadiego

Hope this extension makes your life a little easier.

Credits

Special thanks to zincplusplus https://github.com/zincplusplus/habit-tracker for the original idea, and an extension that I found so useful it motivated me to build my own.

API Documentation

See https://github.com/obsidianmd/obsidian-api

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.