Tasks for MarkdownObsidian Tasks-compatible task management for Markdown files in VS Code and Cursor. (한국어: README.ko.md)
Your tasks stay in your notes as plain checklist lines — no database, no lock-in:
The extension indexes every
Highlights
Getting started
Commands (Command Palette → "Tasks:")
Settings (
|
| Setting | Default | What it does |
|---|---|---|
taskFormat |
emoji |
Format used when writing fields (emoji or dataview) |
globalFilter |
"" |
Only lines containing this text (e.g. #task) are tasks |
include / exclude / respectGitignore / maxFileSizeKB |
What gets scanned | |
setDoneDate / setCancelledDate / setCreatedDate |
true / true / false |
Automatic ✅ ❌ ➕ dates |
statuses |
4 core statuses | Custom checkbox symbols, names, next symbol and type |
recurrence.insertPosition / idHandling / copyDependsOn / removeScheduledDate |
above / keep / true / false |
Next-instance behaviour |
decorations.*, codeLens.mode, autoSuggest.* |
Editor assistance | |
preview.enabled / preview.renderBadges |
true |
Markdown preview rendering |
savedQueries |
[] |
Saved queries (also .tasks/queries/*.md) |
query.allowFunctions |
false |
Allow by function JavaScript in queries (trusted workspaces only) |
editModal.accessKeys / editModal.hiddenFields |
true / [] |
Edit dialog |
notifications.* |
on, 09:00, 1 day |
Daily summary and due-soon digest, OS notifications |
archive.file / afterDays / linkStyle |
Archive.md / 30 / wiki |
Archive command |
calendar.newTaskFile |
"" |
File that receives tasks created from the calendar |
query.showTree |
true |
Query results as a tree (sub-tasks under their parent); per block show tree / hide tree |
decorations.strikeCancelled |
true |
Strike through cancelled tasks ([-]) in the editor; done tasks use decorations.strikeDone (off) |
requireDueDate |
true |
Refuse new tasks without a due date (dialog, API, CLI, MCP) and warn in the editor |
api.writePolicy |
confirm |
Writes through the public API: confirm once per caller / allow / deny |
rendered.maxWidth |
0 |
Max width (px) of the rendered column; 0 = full editor width (default) |
rendered.sourceWhenNoTasks |
true |
With the rendered view as default editor, notes without tasks open in the text editor |
rendered.fieldsAlign |
columns |
Rendered view: fields in aligned columns (columns: status, description+priority+tags, due, created, everything else), at the right edge (right) or after the description (inline) |
rendered.fontSize / rendered.lineHeight |
14.5 / 1.6 |
Rendered view body font size (px) and line height |
rendered.fieldStyle |
plain |
Task-line fields in the rendered view: as in the source (plain) or pill badges (badges) |
calendar.fontSize |
13 |
Font size (px) of tasks in calendar cells |
calendar.fullScreen |
maximize |
Full screen button: maximize the editor group only, or window for the whole window |
updateCheckUrl |
"" |
latest.json location for .vsix installs |
API and automation
Four ways for other programs to read and write tasks. Details in docs/api.en.md.
| From | How |
|---|---|
| Another VS Code/Cursor extension | getExtension('HastyCapybara.tasks-for-markdown').exports.getAPI(1, { extensionId }) → query.run(...), edit.setStatus(...), edit.addNote(...). For types, copy the self-contained file src/api/types.ts |
| Keybindings, macros | Commands tasksmd.api.<ns>.<method> (e.g. tasksmd.api.query.run with { "query": "due today" }) |
| Terminal, scripts, CI | npx @hastycapybara/tasks-cli query "not done\ndue before today" --root ~/notes — no editor needed |
| AI agents (Claude Code, Cursor, …) | claude mcp add tasks -- npx -y @hastycapybara/tasks-cli mcp --root "$PWD", then ask in plain language |
// from another extension
const tasks = (await ext.activate()).getAPI(1, { extensionId: 'my.extension' });
const r = await tasks.query.run('not done\nhappens on or before today'); // same as the sidebar's "Today"
await tasks.edit.setStatus({ path: r.tasks[0].path, line: r.tasks[0].line, expectedText: r.tasks[0].originalMarkdown }, 'x');
Writes ask the user once per caller by default (tasksmd.api.writePolicy). Everything is plain JSON; errors are { code, message }. Notes and dependencies (isBlocked / isBlocking) work through the extension API, the CLI and MCP alike. By default new tasks need a due date; check the installed version's features and settings with info() (CLI tasksmd info, MCP tasks_info). Need only the Node library? @hastycapybara/tasks-core.
Notes on the Markdown preview
The built-in preview renders task lines with checkboxes and badges and ```tasks blocks as live results, refreshed whenever tasks change. The classic preview cannot send clicks back to extensions, so checkboxes there are display-only — toggle tasks from the editor, the sidebar or the kanban board instead.
Documentation
Development
pnpm install
pnpm build # extension + webview bundles
pnpm test # unit tests (vitest)
pnpm test:integration # runs a VS Code instance
pnpm package # production build + .vsix + latest.json
Press F5 in VS Code to launch an Extension Development Host.
Credits
This extension would not exist without Obsidian Tasks. The task syntax, the query language and parts of the core logic (parser, recurrence, urgency) are ported from it (MIT license), and its documentation is the reference for how each feature behaves. Many thanks to Martin Schenck, who created the plugin, Clare Macrae, who has led it for years, and every contributor.
- If you use Obsidian, try the original plugin: Tasks documentation · repository
- You can support the original project: GitHub Sponsors (Clare Macrae)
- Ported code and license notices: NOTICE.md
This project is not affiliated with or endorsed by the Obsidian Tasks project or Obsidian (Dynalist Inc.).
License
MIT
