Skip to content

Tasks

Assign work with a plain checkbox line. It reads correctly in Obsidian and on GitHub with no plugin at all:

- [ ] @mpstaton @tanujsk Task title #Docs ~3d 2026-11-15

Turn on taskMetadata and LFM also reads that line as data, without changing the text.

const tree = await parseMarkdown(body, {
taskMetadata: { collaborators: ['mpstaton', 'tanujsk'] },
});
tree.data.tasks;
// [{ text: 'Task title', markdown: 'Task title', checked: false, section: 'Phase 1', line: 12,
// assignees: ['mpstaton', 'tanujsk'], tags: ['Docs'], estimate: '3d', due: '2026-11-15' }]
Token Rule
@handle Directly after the checkbox. Anywhere else, or in backticks, it stays text.
#Tag Anywhere after whitespace, with at least one letter, so #123 stays text.
~3d At the end of the title, with a unit.
2026-11-15 The last thing on the line, and a real date. 📅 2026-11-15 also works.

Set collaborators if you display assignees. Without it, a task that starts with a bare @page reads as assigned to page.

Aggregating a repo with lfm-tasks

The lfm-tasks script reads a git repo’s tracked markdown files and writes one Markdown file for reading on GitHub, with every task linking to the line it came from.

Terminal window
lfm-tasks -o TASKS.md
lfm-tasks context-v --group-by section --title "Open Work" --exclude context-v/extra
lfm-tasks -o TASKS.md --collaborators mpstaton,tanujsk
# Tasks
2 open tasks across 2 documents. Generated by `lfm-tasks`, so edit the linked documents rather than this file.
## @mpstaton
- [ ] @mpstaton Ship it #Docs 2026-11-15 ([plans/Launch.md:5](plans/Launch.md?plain=1#L5))
## Unassigned
- [ ] Unowned ([README.md:1](README.md?plain=1#L1))

Finished tasks collapse into a <details> block at the end, and sub-tasks come out flat. The output has no timestamp, so regenerating it only changes the file when the tasks changed.

GitHub shows [[path/to/Page-Name.md]] as literal text, so the script turns a page reference in a task into a relative link. Your source documents keep the wikilink for Obsidian. A reference that doesn’t settle on one tracked file keeps its display text and gets no link.

Changelog directories are skipped, because they’re history rather than open work. Pass --include-changelog to read them anyway.

Keeping TASKS.md current

Terminal window
lfm-tasks --install-hook

This adds a local git hook. When a commit touches a context-v/ Markdown file, it regenerates TASKS.md and adds it to that commit, so the file goes up with the same push and nothing runs on GitHub. It reads the staged content, so unstaged edits stay out of the list.

  • It never blocks a commit. If the script can’t run, you get a warning and the commit goes ahead without the update.
  • Each clone installs its own. Git doesn’t share hooks, and the hook points at this clone’s copy of the script, so rebuild after changing it.
  • It won’t overwrite your hooks. It refuses if a pre-commit or post-commit hook already exists, or if core.hooksPath is set.
  • Commits outside context-v/ don’t trigger it. A task added to a README appears the next time a context-v/ commit runs, or when you run lfm-tasks -o TASKS.md by hand.

To turn it off, delete pre-commit and post-commit from .git/hooks.

To build something else, use the functions underneath, which never touch the filesystem. Strip frontmatter before parsing, as everywhere in this pipeline.

import { aggregateTasks, groupTasks, tasksToMarkdown } from '@lossless-group/lfm';
const tasks = aggregateTasks([{ source: 'context-v/plans/Launch.md', tree }]);
groupTasks(tasks, 'assignee'); // or 'section', 'tag', 'source'
const markdown = tasksToMarkdown(tasks, { title: 'Launch' });