No description
Find a file
Diego Marrufo 41a391d56c simplify DateRange to backwards-only API
Remove unused direction branching from DateRange and update call sites/tests to the leaner signature. Also fix a duplicated lockfile entry so pnpm install works.
2026-06-21 20:38:10 +02:00
.github Update dependabot.yml 2026-01-10 14:10:09 +01:00
components simplify DateRange to backwards-only API 2026-06-21 20:38:10 +02:00
llm-context added llm txt file. Made noHabits variable reactive 2025-07-04 21:33:07 +02:00
models simplify DateRange to backwards-only API 2026-06-21 20:38:10 +02:00
repositories updating an entry loaded all entries. Every entry would need to be instantiated and proccessed all over again. If you have a year worth of entries, it will do it 365 times per habit. Instead, we should filter those entries we are dealing with by date 2026-02-20 20:22:13 +01:00
scripts add commit command to new version script 2026-01-11 19:19:16 +01:00
specs simplify DateRange to backwards-only API 2026-06-21 20:38:10 +02:00
stores New eslint rules for formatting. No more semicolons, always single quotes and some other things. Fixed wrong config between svelte and typescript files regarding tabs indentation 2025-08-24 20:55:51 +02:00
UI fix reference to local state warning by svelte 2026-02-13 20:49:54 +01:00
.gitignore added vitest coverage and coverage ui 2025-06-19 22:19:10 +02:00
esbuild.config.mjs set up svelte and example of rendering a svelte componet and using a onclick event increment a counter 2025-05-02 15:01:35 +02:00
eslint.config.js jsdoc linting rules. 2025-08-24 21:32:43 +02:00
LICENSE upgraded package versions, particuraly typescript. Removed unused code. Adding a release workflow 2025-06-15 13:50:20 +02:00
main.ts simplify DateRange to backwards-only API 2026-06-21 20:38:10 +02:00
manifest.json 1.1.10 2026-02-20 20:43:48 +01:00
package.json Merge pull request #97 from nazoadiego/dependabot/npm_and_yarn/stylistic/eslint-plugin-5.10.0 2026-04-07 08:57:41 +02:00
pnpm-lock.yaml simplify DateRange to backwards-only API 2026-06-21 20:38:10 +02:00
preview.png keyboard navigation refactor. Updated Readme. Added button to go back to the present. Made the date control buttons look nice 2025-07-12 23:31:27 +02:00
README.md update script to bump version. Automated a few things to make it simpler 2026-01-11 19:16:49 +01:00
styles.css swith back to the color red from before, as it is less opaque 2025-07-04 22:39:39 +02:00
svelte.config.js New eslint rules for formatting. No more semicolons, always single quotes and some other things. Fixed wrong config between svelte and typescript files regarding tabs indentation 2025-08-24 20:55:51 +02:00
tiny-habit.png made the readme look nice, added a link to grab me a coffee 2025-06-20 18:18:12 +02:00
tsconfig.json update vite and vitest. Fixed configuration breaking change regarding aliases and globals for tests: it was not importing when you used an alias 2025-12-27 19:40:11 +01:00
versions.json 1.1.10 2026-02-20 20:43:48 +01:00
vite.config.ts update vite and vitest. Fixed configuration breaking change regarding aliases and globals for tests: it was not importing when you used an alias 2025-12-27 19:40:11 +01:00


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