Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mdgrid

日本語

A tool that opens a folder of Markdown notes as a table in the terminal and lets you edit the values in place.

When you would want it

You have forty task notes and want to set status: done on the finished ones. A few reading notes are missing their rating. You would like to look at your bookmarks folder by folder. Too many notes to open one at a time in an editor, and a shame to flatten into a spreadsheet.

Give mdgrid the folder and the notes become rows, the frontmatter keys become columns. Enter on a cell edits it; Ctrl+S shows the diff and saves. Only the lines with changed values are written. Key order, comments and the body stay as they were. The notes remain plain Markdown, so the same folder stays open in your editor or note app. .base views open as they are.

What it looks like

Besides the table: groups, a folder tree, a map of how the tables link to each other, the counts of a column’s values, and one note in detail. The tree, the map, the counts and the detail are one key away; groups come from the view settings. Esc brings the table back. They are laid out one screen each in Ways to see your notes; what you can do with them is in What mdgrid can do.

Try it on the sample

The quickest way in is an archive from Releases: unpack it and put mdgrid on your PATH. With Rust installed, cargo install mdgrid --locked works too, but the build takes a few minutes. The samples are in the repository.

git clone https://github.com/S6U5/mdgrid && cd mdgrid
cp -R examples/studio /tmp/mdgrid-sample
mdgrid /tmp/mdgrid-sample/Tasks

If the task table of “Northwind Studio” appears, it worked. j and k move, Enter edits, q quits. You are on a copy, so saving never changes the samples. Other ways to install and a tour of the screen are in Getting started.

On your own notes

Five starters are built in: tasks, tasks shared with AI agents (with routines), bookmarks, reading, and people with meetings. Each writes a marker, templates and samples into an empty folder, so you start with a table already shaped.

mdgrid ~/books --init-workspace --starter reading --with-samples
mdgrid ~/books

Starters are there from 0.4.0. See Create a ledger from a starter. If you already have notes, just pass their folder.

Contents

  • Ways to see your notes — table, view tabs, groups, tree, relation map, value counts, the filter band, themes. One screen each
  • What mdgrid can do — by use case (tasks, bookmarks, reading, people and meetings), then editing, saving, bulk edits, finding, creating notes, views, .base, links, starters, other commands, read-only, looks. One screen per feature
  • Getting started — install, first run on the samples, reading the screen, the first keys
  • Task guides — edit and save, find and filter, edit many rows, create notes, open a .base, save a view, give a folder its own command, register tables, link tables, group tables into workspaces, create a ledger from a starter, use with other commands
  • How mdgrid sees your notes — tables, views, saving, registered tables, links, workspaces, the relation map, and where mdgrid keeps things
  • Make it look the way you like — themes, cells as parts or text, frames, what is shown around the table, terminal and fonts
  • When something looks wrong — marks in cells, cells you cannot edit, links with ?, the relation map, misaligned columns, colors, speed

Reference

The rules are listed on reference pages whose contents are checked by tests.

Ways to see your notes

日本語 · Contents

The same notes can be shown in several screens. Each one is a key away, or a few choices in the view settings. None of them writes to your notes, and Esc brings the table back. This page shows one screen per way of seeing; the links tell you how.

Table

The basic screen. One row per note, one column per frontmatter key, the file name first. Enter on a cell edits it in place. The bar at the bottom shows how many changes are unsaved and which keys work right now.

Getting started explains the parts of the screen.

View tabs

A view is a named set of columns, filters and sorting. Views sit in tabs above the table; [ and ] switch between them. Open a .base file and its table views become tabs as they are. Views you make yourself are kept in the config folder, never next to the notes.

Shape a view and save it

Groups

Rows gather under heading rows, one per value of a column. Enter on a heading folds it. Groups from a .base look the same. Handy for going through tasks one status at a time. When the view has summaries, each heading shows its group’s subtotal on the right, and it stays there when the group is folded.

Shape a view and save it (the sort and group section of the view settings)

Tree

Write tree = { path = "folder" } on the table in the workspace file (.mdgrid/workspace.toml), and T turns the paths in that column (bar > Dev > Web) into a folder tree: the tree with counts on the left, the notes of the selected folder on the right. Click a row on the right again to go to it in the table; click the URL of the selected row again to open it in your browser. Good for bookmarks and reference material; the built-in bookmarks starter is set up this way. The tree screen is there from 0.4.0.

The tree setting, Create a ledger from a starter

Gantt

C turns the rows of the current view into bars on a time axis. The start and end columns come from gantt = { start = "start", end = "due" } in the workspace marker, or, without a setting, are inferred from date columns named like start and due. With parent/child rows and WBS in the view settings, the order, numbers and progress (the fill of the bar) stay the same, and a parent without dates gets the span of its children. + and - switch between day, week and month, t goes to today, and r switches the period between this week, this month, the quarter and everything. Weeks, including this week, start on the day set in dates.week_start (Sunday by default). The bar on the bottom edge of the window (◀ ▶, the units, Today and the periods) does the same with a click. To reschedule, select a row and press H or L to move its bar by one unit, or < and > to shorten or extend its end. The dates are held as pending changes until you save, like edits in the table, and u undoes them. The gantt screen is there from 0.4.0.

The gantt section of Key bindings, Configuration

Kanban

B lays out the rows of the current view as cards in lanes, one lane per status. The lanes follow the allowed values of the column ([rules.status] values), so todo, doing, waiting and done line up in that order, and a status with no cards still has its empty lane to move a card into. H and L move the selected card to the next lane and change its status; like an edit in the table, the change waits as unsaved until you save. The column comes from kanban = { column = "status" } in the workspace marker, or is inferred from a column named like status. The kanban screen is there from 0.4.0.

In the sample task ledger, each card shows its due date and priority under the name. That comes from card = ["due", "priority"] in the marker: list the columns you want to read without going back to the table, such as the author and progress of a book or the time and attendees of a meeting. The values look as they do in the table cells. Long names wrap onto a second line, so a long question is not cut after its first few words.

The kanban section of Key bindings, Configuration

Chart

P counts the rows of the current view and draws a chart: tasks per status, estimates summed per owner, due dates per month, at a glance and without counting the table. There are five kinds, bar, stacked bar, line, scatter and heatmap; Tab switches between them, x picks the column to split by, y the value (a count or the sum of a number column) and b the breakdown column. Splitting by a number column gives counts per range (a histogram), and % on a stacked bar shows percentages. Enter on a bar narrows the table to the rows with that value. Charts you look at often can go in the workspace marker as chart = { kind = "line", x = "due", unit = "month" }, and with several of them [ and ] move between them; without a setting the screen guesses from columns such as status. If the values have names and icons in [rules.<column>], bar names, legends and heatmap headings show them the way the table’s group headings do (“icon name”). Weekly buckets start on the day set in dates.week_start (Sunday by default). Colors follow the theme’s background, so heatmap numbers stay readable on light themes too. The chart screen is there from 0.4.0.

The chart section of Key bindings, Configuration

Parent/child indent and WBS

If notes carry parent: "[[Parent]]", the parent/child section of the view settings indents children under their parent. Z folds and opens. Turn on WBS in the same section and rows get 1.2.1 numbers and a progress figure from the status column (a parent shows the average of its descendants). The sample notes have no parents, so there is no screen here; the release recording shows it moving.

Shape a view and save it

Relation map

R draws the tables of the workspace as boxes and the link columns as arrows. You can see which table points at which, and Enter opens the one under the cursor. A column that points inside its own table, such as a parent, loops back to its box, and the columns in each box carry their type marks and the same names as the table headings.

The relation map

Stacked tables

Up to four different tables share the screen, one above the other. Each has a title line, “table · view · rows”, and keys act only on the table marked with ▶. Ctrl+w j and k move between them, and an arrangement can be saved by name as a page.

Stack tables

Value counts

% lists every value of the current column with its count and share. Enter keeps only the rows with that value. Use it to see how many tasks are in each status, or whether one person has too many.

The freq section of Key bindings

One note in detail

K lists every key and value of the selected row top to bottom. For the moment when there are more columns than the screen is wide. A long URL that wraps opens in full too: click it to select it, then click it again or press O.

The detail section of Key bindings

Filter band

The filters, sorting and grouping in effect sit above the table as chips. f moves into the band and Backspace removes one. You never lose track of what the table is filtered by.

Find, filter and sort

Row numbers, stripes and column lines

The Display section of the view settings adds row numbers, alternating row colors and column lines. Each view remembers its own.

Shape a view and save it

Frozen columns

F pins the columns up to the current one on the left. Scroll sideways and the file name and status stay in view.

The table section of Key bindings

Themes and part shapes

Twelve color themes, and a choice of shapes for chips and checkboxes. Only the look changes; the text and marks stay the same. Compare them in the look catalog and paste the settings it gives you into config.toml.

Make it look the way you like, Themes

Easy to step back

Esc brings the table back from any screen (q as well in the tree and the relation map, K from the detail, f from the band). On the table itself q quits mdgrid. ? lists the keys, : finds a command by name. Switching screens never touches a file; only saving does.

What mdgrid can do

日本語 · Contents

One screen and a few lines per feature. The how-to is behind each link. Ways to see your notes lists the screens; this page lists what you can do with them.

By use case

Four starters are built in, and each one is a sample of a way to use mdgrid. The screens below open the sample ledgers made from them (examples/tasks and so on).

Tasks. One note per task, with status tabs (Open, Overdue, Doing, Waiting, Done), due date, priority and tags. A new note asks for the start date, the due date, the priority, a URL and tags; the status and the created date are filled in for you. The name of a new note starts with today’s date, like 20261118_, so you can make a task with the same title on another day; the table and the name field hide that date, so you type only the title and the date is added for you. Setting the status to done fills the done date (done_at) with today. Setting it to doing fills the start date (start) with today when it is empty, so a task you began without planning a start still gets a bar in the Gantt; a start date you planned stays as it is. Next to the due date, the “Time left” column says how near it is: “in 3 days”, “5 days ago”. With its start and due columns, C shows it as a Gantt too.

Bookmarks. One note per bookmark, with its place written as folder: bar > Dev > Web; T shows them as a folder tree, and o on the tree screen opens the URL in your browser. In the table, O does the same. With the mouse, click a URL cell to select it and click it again to open it; a URL cut short with … by the column width still opens in full.

Reading. Books, articles, films and talks, one note each, with the tabs Queue, Now and Done, and columns for kind, author and rating.

People and meetings. Two linked tables, people (role, organization, contact) and meetings (date, attendees, next actions), with R for the relation map.

Create a ledger from a starter

Edit values in place

Enter on a cell. Text columns offer the values other notes use, and typing narrows them. You can order the choices by name, by how often they are used or by how recently they changed, and keep finished tasks out of the parent choices. Dates get a calendar, tags toggle on and off, checkboxes flip. A value that does not fit the column’s type is shown with a ! and left alone.

Edit values and save

Review the diff and save

Edits are held as pending changes until Ctrl+S, which shows a diff per file before writing. Only the lines with changed values are written; other keys, their order, comments and the body stay byte for byte.

Edit values and save, Write-back safety

Edit many rows at once

Mark rows with Space and set one value on all of them. Tags can be added or removed in bulk the same way, and marked rows can be handed to the next command.

Edit many rows at once

Type dates in words

Type tomorrow, next fri, eom or +2w in a due date cell and you get that day, without counting on the calendar. As you type, the date it reads as appears next to the field, such as 2026-10-16 (Fri), and the calendar moves there, so you can check it before pressing Enter. Japanese words such as 明日 and 来週の金曜 work too, whatever language the screen is in. The same words work when you edit many rows at once and in filter values.

Type dates in words

Find, filter and sort

\ narrows the rows as you type, / searches, s sorts by the column. Keep only the rows with the same value, count a column’s values and keep one (%), hide the columns you do not need.

When a table has an order of its own, like news newest first, write it once in the workspace marker: views without a sort, a table without views, --print and the kanban cards all follow it. Sort by status from a heading and each status group stays in that order. The sort window marks those rules “default · marker”, and “Back to default” brings the order back.

Find, filter and sort, default sort of a table

Filter with named conditions

Give a name to a condition such as “due within a week” and write it once in the config. One digit key then keeps only the matching rows, Esc clears them all at once, and cond("name") works in any expression. You can also hide rows you rarely need, such as plans far in the future, in every table. mdgrid --count prints how many rows match.

Filter with named conditions

Conditions and notices per ledger

“Not contacted lately” for a people ledger, “payment due soon” for a money ledger: write the conditions, notices and notifications one ledger needs in its marker, and they travel with the ledger. Digit keys start at 1 with the ledger’s conditions, and the task conditions in your config stay out of ledgers that have no due date or owner columns. Put them in a starter’s marker and every ledger made from it has them.

Filter with named conditions

Notices above the table

Show how many tasks are overdue, or a few lines you wrote yourself, in a small box above the header. Only people who write it in the config see it. Jump from the box straight to the rows, and print the same notices with mdgrid --notices for a tmux status line.

Notices above the table

Get notified when a row matches

Get an OS or terminal notification when a reminder time or a due date comes. Each row that starts to match a named condition is notified once, and rows that keep matching stay quiet. Register mdgrid --notify with your OS scheduler, and notifications arrive while mdgrid is closed too.

Get notified when a row matches

Create routine runs

Write your recurring work (a weekly review, the invoices at the end of the month) as routine notes with a rule like weekly mon, and mdgrid makes the note for each run in another folder: “Weekly review 2026-11-23”, linked back to its routine. The open screen shows the names and asks first; mdgrid --runs from your OS scheduler makes them while mdgrid is closed. Only the latest run is made, and nothing is overwritten.

Create routine runs

Search across the workspace

Was that estimate in a task, or in a project note? Instead of opening one table after another, type the word into “Search across the workspace” in the palette. The matching rows from every table in the workspace show up per table, with the column and value that matched, and picking one opens its table with that row selected. The command is there only for people who turn it on in the config.

Search across the workspace

Create a note

a (or “+ New” at the right end of the view bar) opens a form with the name and one field per column and writes one note. The fields take the same candidates and keys as editing a cell, so a link column such as a quote’s source lets you pick from the notes of the linked table. The folder, the file name and the body template come from the workspace marker. It can also start the file name with today’s date or a short id ({uid}), and put a UUID ({uuid}) in the frontmatter. Keep several body templates in a folder and the form lets you pick one.

Create a note

Delete a note and bring it back

Press u right after creating a note by mistake and it moves to the trash; Ctrl+R brings it back. “Delete the note” does the same for a note that was already there. The file is never erased, so “Restore from the trash” still returns it to its place after you close mdgrid.

Delete a note and bring it back

Shape a view and save it

o sets the columns, filters, sorting, grouping and display; save it under a name and it becomes a tab. The sections are numbered, so 3 takes you straight to sorting. Choose “Set as default view” and the folder opens on that view next time.

Group by status and the groups come in the order of the column’s allowed values (todo, doing, waiting, done), not the alphabet. Give those values a glyph and a name (icons, labels) and the headings, the kanban lanes, the cells and the detail view all read “○ To do”. When you edit, each choice shows the value after its name (“○ To do todo”), so you see what gets written. The notes and --print keep todo.

Shape a view and save it, Column rules

Subtotals per group and number formats

Put summaries on a view grouped by month or by category, and each group heading shows that group’s total on its right, lined up with the column. Folded groups keep it, so folding them all leaves a list of spending per month. The summary row under the table stays the grand total. Write prefix = "¥" and thousands = true under [format.amount] and the cells, the total and the subtotals all read ¥98,000, while the notes and --print keep 98000. To call “Filled 13” “Books 13”, add summary_labels to the view.

Number formats, Summaries

See the schedule as a gantt

C turns the rows of the current view into bars from the start date to the due date. With parent/child rows and WBS, the numbers and the progress (the fill of the bar) stay the same, and a parent without dates gets the span of its children. + and - switch between day, week and month; t goes to today, and r switches the period between this week, this month, the quarter and everything. The bar on the bottom edge of the window (◀ ▶, the units, Today and the periods) does the same with a click. To reschedule, select a row and press H or L to move its bar by one unit, or < and > to shorten or extend its end. The dates are held as pending changes until you save, like edits in the table, and u undoes them. The start and end columns come from the marker, or are inferred from date columns named like start and due. In a table with children in the marker, a child bar that runs past its parent’s dates puts a ! at the end of both rows, and selecting one shows by how many days. With gantt = "extend", stretching the child stretches the parent’s end too.

Gantt in the list of views, Key bindings

Move tasks across a kanban board

B shows every status at once: one lane per status, the tasks as cards. Press L on a todo card and it moves to doing, with its status rewritten as an unsaved change; u takes it back, and Ctrl+s shows the diff before anything is written. The lanes follow the allowed values of the status column, so an empty status still has a lane to move into.

Write children = { key = "parent" } in the marker’s [[table]] and every view lists children indented under their parent, with the number of children after the parent’s name, like (2). The number stays when you fold the parent, so you can see how many are left without opening it. Select a row and press c to open the new-note form with that row as the parent, so you can add children and grandchildren on the spot. On a person, c also makes a meeting with that person among the attendees (a quote from a book, a news item from a question work the same way), and brings you back to the row when you are done. When grouping by tags or status splits a parent and its children, the children’s group shows a faint copy of the parent above them, so you can still see whose children they are. Move a parent’s card to done (or set it in the table) and its unfinished children become done with it; one u takes it all back. You can also keep the parent open while children are left (on_done = "refuse"), or finish only the parent and be told how many are left ("keep"). Add closed_by = "closed_by" and the children closed together with their parent carry that mark, so setting the parent back can bring them back too (on_reopen = "reopen") or ask you on the spot ("ask"). Children you finished yourself stay finished.

Kanban in the list of views, Key bindings

Show values on kanban cards

When a card shows only a name, you keep going back to the table to see who wrote that book or when that meeting is. Write card = ["author", "rating"] in the marker’s kanban and each card lists the author and the rating under the title, one per line. Dates follow your date format, values with a name in the rules show that name, and links show the name of the note they point to, just as in the table cells. Columns outside the view and computed columns work too, and a column with no value on that row gets no line.

A long title wraps onto a second line in its lane and is cut with … if it still does not fit. With cards of different heights, j and k scroll the lane until the selected card is fully in sight, and H, L and clicks work the same way.

Kanban in the configuration, Kanban in the list of views

See the numbers in a chart

P turns the rows of the current view into a chart: how many tasks per status, how many due dates per month, how much estimate per owner. Tab switches between bar, stacked bar, line, scatter and heatmap, and x, y and b choose the columns. Enter on a bar takes you back to the table with only the rows of that value, so you can go from the numbers straight to fixing the rows.

Chart in the list of views, Key bindings

Open a .base file

Pass a .base file and its table views line up as tabs. Filters, sorting, grouping, summary rows and part of the formulas are read; the .base is never written. You can also export the current view to a .base, or import a .base view.

Open a .base file, Obsidian Bases support

A link such as project: "[[mdgrid]]" turns folders into linked tables: pick a target by name, open it, list the notes that point here. Tables that belong together form a workspace, and R draws the relation map. Settings choose whether links are written as [[…]] or as Markdown links, and whether the path is the name only, relative to the note or from the root; renaming a note brings the links to it along (or asks each time, or leaves them).

Link tables with relations, Group tables into workspaces

Read and gather values from linked notes

A reading note can show the author of the book it quotes, and a person can show the last day you met, taken from the meetings. A formula reads a value from the note a link points to (source.asFile().properties.author), and gathers values from the notes that link here, split by the column they link from: count them, or take the latest date or a total (file.linkedFrom("attendees") with filter, map and max). Nothing is written into the notes, so marking a meeting done updates the person’s row too. Looked-up values look like the cells they come from: a note by its name, a date in your date format, a value with its name.

Linked notes in Obsidian Bases support

Create a ledger from a starter

Pick “Create a ledger from a starter” from the palette (:), or run --init-workspace --starter <name>. It writes the marker, templates and samples into an empty folder, so you start with a table already shaped. Your own starters go in the same form.

Create a ledger from a starter

Use with other commands

--print writes the table as CSV, TSV, JSON or Markdown; edit the CSV in a spreadsheet and bring it back with --apply; --pick hands the paths of the chosen notes to the next command; --new-note adds one note in the same shape as the form. In a ledger with several tables, add a table’s name like --table News and every command works on that table; opening the table’s folder directly gives that table too. A .csv or .tsv file opens directly as a ledger. For AI agents there is a skill that teaches these commands; an agent writes directly only the columns you let it change and leaves the rest as a proposal, which you review and take with “Show AI proposals”.

Use with other commands, Let AI change values, Open a CSV or TSV as a ledger

Open read-only

With --readonly, editing, saving and creating notes are off and nothing is written. Notes that cannot be written safely are read-only even in normal use: their cells show a #, and selecting one tells you why.

When you cannot edit, Write-back safety

Come back after the terminal is restored

In a Herdr pane, mdgrid reopens the same table and view when the Herdr server restarts, and the sidebar shows the table and view as the pane title. Elsewhere, such as in tmux, mdgrid --continue goes back to the last table and view opened in that folder.

Come back to the same table when the terminal is restored

Save what you see as a session

Give a name to the filters, sort and columns you built, and mdgrid -s <name> opens the table just like that. Only the setup is saved; cell values are read from the notes each time. mdgrid --sessions lists the names you saved.

Save what you see as a session

Go back to a recent table

Go back to a table you never registered, in the view you were on. mdgrid remembers the last 20 tables you opened on the screen, newest first. Recent tables in the palette lists them with the view, when you last opened each and its folder. Plain mdgrid also shows the five newest under “Recent”. In the shell, mdgrid --recent prints one per line, ready for fzf.

Go back to a recent table

Switch between favorite workspaces

Put the workspaces you go back and forth between, say work and a hobby, in your favorites. From the table, the gantt, the kanban or any other screen, W opens the list and one digit takes you there, to the table and view you last had open in that workspace. If you started in a plain folder, Where you started at the top of the list takes you back. With the mouse, clicking the workspace name in the header breadcrumb opens the same list. The workspace you are in goes into your favorites from the last line of the list, or with a.

Switch between favorite workspaces, Key bindings

Use it in nine languages

The screen, --help, warnings and the --print-config descriptions come in English, Japanese, Chinese (Simplified and Traditional), Korean, Spanish, French, German and Brazilian Portuguese. The language follows LANG and similar variables, or the language setting. Note values, column names and file names are never translated.

The language setting

Choose a look

Color themes, the shape of chips and checkboxes, row numbers and column lines, the date format: all set in the config, and overridable per workspace, table or view. Compare them in the look catalog and paste the settings.

Make it look the way you like, Themes, Look catalog

Pick a theme on screen and choose your own colors

Press o, then 8, for the Look section: pick a theme from the list and Apply shows it at once. Keep it globally and every table uses it, even a ledger whose marker names another theme. Custom, at the end of the list, starts from the current theme and lets you change the accent, the selected row and the other colors one by one, from sample colors or as #rrggbb.

How to choose a theme, Choose your own colors

Keys and the palette

Vim keys and arrow keys both work. x lists what you can do on the cell, : finds a command by name, ? lists every key, with the ones you can press now first: select one and press Enter to run it without remembering the key. Every key can be rebound.

Key bindings

See the keys of a window

Open the window for tags or the filter window, and its bottom edge lists the keys that work there, like Enter Check / uncheck and Tab OK. Clicking one does the same thing. Press Enter on each tag you want; the window stays open, so you can check several in a row. When you are done, press Tab or pick [ OK ] at the bottom.

Key bindings

Edit with vim keys

Write vim = true under [keys] in the config, and every input box gets vim’s two modes. You start typing as usual; Esc switches to normal mode, where w and b jump by word and dw or cw fix a whole word. In the table, dd moves a note to the trash, p puts the value you copied with y, and . puts the last value into the next row too.

Edit with vim keys, Key bindings

Stack tables

Compare two tables, such as tasks and projects, on one screen without switching back and forth. Stack a table below in the palette lists the tables of the current workspace and puts the one you pick below the current table. Ctrl+w j and k move between them, and finding, filtering, views and edits act only on the table marked with ▶. Edits from every table pile up in one set of changes, and Ctrl+S shows one diff with a heading per table before it writes. Give an arrangement you like a name and it becomes a page you can open from the drawer or with mdgrid -w <workspace> --page <name>.

Stack tables, Key bindings

Getting started

日本語 · Contents

There are several ways to install; pick one. The rest of the page is one path: open the sample, edit a cell, save.

Install

mdgrid is a single executable written in Rust. Download an archive for your OS from the GitHub Releases page, or use the tool you already have:

cargo install mdgrid --locked       # Rust 1.90 or newer; builds from source in a few minutes
cargo binstall mdgrid               # cargo-binstall; fetches the prebuilt binary
nix profile install github:S6U5/mdgrid/v0.8.0   # Nix (to just try it: nix run github:S6U5/mdgrid/v0.8.0)

To build from a clone of the repository instead, run cargo build --release to get target/release/mdgrid. The examples below use target/release/mdgrid; with an installed mdgrid, just type mdgrid.

It can also print shell completions (bash, zsh, fish, elvish, powershell) and a man page:

mdgrid --completions zsh > ~/.zfunc/_mdgrid
mdgrid --man > ~/.local/share/man/man1/mdgrid.1

Open the sample root folder

The repository has a sample root folder, examples/studio: the tasks, projects, clients, people and meetings of Northwind Studio, a made-up web studio, in five folders that link to each other (about the samples). Saving rewrites files, so copy it to a temporary folder first:

cp -R examples/studio /tmp/mdgrid-sample
target/release/mdgrid /tmp/mdgrid-sample/Tasks

If the header says “Northwind Studio” and task rows fill the table, it worked. q quits.

The sample’s dates are in early October 2026; the screens in this manual are taken as if today were 2026-10-06 (MDGRID_TODAY=2026-10-06).

To just look without copying, add --readonly. Editing, saving and creating notes are then off, and nothing is written:

target/release/mdgrid examples/studio/Tasks --readonly

All the samples

Every sample at once, from a clone of the repository. demos/try.sh builds mdgrid, copies the sample to a temporary folder, opens it with its own config, and deletes the copy when you quit, so your notes and settings are never touched:

git clone https://github.com/S6U5/mdgrid && cd mdgrid
sh demos/try.sh studio      # the sample above: five tables linked by [[links]]; press R for the relation map
sh demos/try.sh workspace   # some of the same tables grouped into workspaces (-w Work)
sh demos/try.sh configs     # the studio with a config that turns most features on
sh demos/try.sh quirks      # awkward notes: empty and mismatched values, read-only notes
sh demos/try.sh ai-human    # a .base that splits tasks into human and AI work
sh demos/try.sh places      # registered tables

Anything after -- goes to mdgrid, for example sh demos/try.sh studio -- --readonly.

With no argument mdgrid opens the current folder. You can also pass several folders, or a .base file to open its views (Task guides).

Reading the screen

From the top:

AreaWhat it shows
Headera breadcrumb at the start (click the table name or press w for the drawer listing the tables; when a workspace is in use it reads <workspace> › <table> ▾, and clicking the workspace name or pressing W opens the list of workspaces to switch to; vault ▾ here) and the number of rows. At the right, the screen type menu (▦ Table ▾, which lists the relation map when there are linked tables) and ⚙ Settings for the view settings. + New, which creates a note, is at the right end of the view bar
View bara bar with one empty line above and below it (setting display.bar_padding): the view tabs at the left, then the search bar and the Filter, Sort, Group and Columns buttons, and + New at the right end
Tabsview names: Default table (every note of the folder), plus the views of a .base and views you saved
Search barpress \ to type; rows are filtered as you type
Tableone row per note. The first column is the note’s path; the others are frontmatter keys
Bottom barthe number of unsaved changes, the current mode, the selected row and column, and the keys you can press now
Message linethe result of the last action, or why something is read-only

Cell marks:

MarkMeaning
∅ (dim)the value is null (just key:)
""an empty string
blankthe note has no such key
leading !a value that does not fit the column’s type (someday in a date column); sorts last
*an unsaved change
#a read-only cell (a note that cannot be written safely, or a read-only value such as a nested one); select it to see why. Formula columns (headed ƒ) are read-only as a whole, so with colors on their cells are dim instead of marked #
! at the start of the rowa conflict file made by a sync tool, or a note that changed on disk while you had pending changes
~ at the start of the rowan edited row that would now sort or filter elsewhere, kept in place until you save or move

Column types come from .obsidian/types.json, or else from the first non-empty value. The type decides how you edit: pick from candidates for text, a calendar for dates, toggles for lists, cycling for checkboxes. With colors on, the type also shows: a mark in the column heading (# number, ◷ date, ☑ checkbox, ⋮ list, ◉ chips), checkboxes as ☑/☐, and lists and short repeated values as colored chips (Make it look the way you like).

The first keys

KeyDoes
↑ ↓ ← → (or k j h l)move the selected cell
Enteredit the cell
Ctrl+Sreview the diff and save
u / Ctrl+Rundo / redo
/search
\keep only rows containing a word
[ ]switch views
?show every key
: or Ctrl+Pfind a command by name
qquit (asks first if there are unsaved changes)

The mouse works too: click a row to select it, and click a cell of the selected row to edit it. Clicking the selected row’s file name is the same as e (open in the editor). Click a column heading to sort (the view remembers it), drag a column border to resize, and scroll with the wheel. A sideways trackpad swipe (the horizontal wheel) or shift+wheel moves between columns.

Help (?) lists the keys you can press now first. Select one with ↑↓ or a click and press Enter: the help closes and the action runs, so you can use it without remembering the key.

If you forget a key, type its name in the palette; each candidate shows its key.

Every key, and how to rebind them, is in Key bindings.

Configuration

mdgrid works without a config file. To change something, write out every item with its default and a description, and edit from there:

mdgrid --print-config > ~/.config/mdgrid/config.toml

The file is $XDG_CONFIG_HOME/mdgrid/config.toml (or ~/.config/mdgrid/config.toml), or the one given with --config <path>. The UI language is language (auto, en, ja); the default auto looks at the first non-empty one of LC_ALL, LC_MESSAGES and LANG, in that order, and picks Japanese when it starts with ja, English otherwise. Every item is in Configuration.

Next: How mdgrid sees your notes, then the Task guides.

Task guides

日本語 · Contents

mdgrid in the examples is the target/release/mdgrid you built, and /tmp/mdgrid-sample is the sample root folder copied in Getting started.

Edit values and save

  1. Select a cell and press Enter. The input depends on the column’s type:
    • Text: pick from the values other notes have in this column (when there are at most candidates distinct values, 20 by default; otherwise just type), or type a new one.
    • Date: a calendar opens. ← → move by day, ↑ ↓ by week, PageUp and PageDown by month. You can also type 2026-10-15, +3 for three days from today, or words such as next fri (Type dates in words). Ctrl+T is today.
    • Date and time: the same calendar, with a time field under it. Ctrl+O switches to the time field, where ↑ ↓ move 15 minutes and Shift+↑ Shift+↓ one hour; typing 1430 or 9:30 there sets that time, and with the mouse the [-] [+] beside the time move it 15 minutes. Changing only the day keeps each note’s time; you can also type 2026-10-15T09:30.
    • List (such as tags): toggle values from the list of values found in the current table. Enter (or Space) checks or unchecks the highlighted value and leaves the window open, so you can check several. When you are done, press Tab or pick [ OK ] at the bottom. These keys are also on the bottom edge of the window, and you can click them.
    • Checkbox: each Enter cycles empty → true → false → empty.
    • Number: only values that read as numbers are accepted. Type +10 to add 10 to the current value (to move on the pages you have read, say; with several rows selected, each row gets its own sum). -10 is a negative number.
  2. Press Enter to confirm, Esc to cancel, or Tab to confirm and move right.
  3. The edited cell is marked and Unsaved in the bottom bar goes up. Nothing is written yet. u undoes, Ctrl+R redoes.
  4. Ctrl+S (or :w) opens the save review: a before/after diff for each file.
  5. Enter writes everything. Esc goes back to the table without writing; the pending changes stay.

Date and time columns add a time field under the calendar (here on the meetings of the sample, examples/studio/Meetings). Ctrl+O switches to it; ↑ ↓ move 15 minutes and Shift+↑ Shift+↓ one hour. In the time field you can also type the time as digits (1430, 9:30), or click the [-] [+] beside it to move 15 minutes.

  • To empty a cell press Backspace or Delete. Saving writes key: and keeps the key.
  • q with unsaved changes asks: s save and quit, d discard and quit, Esc back.
  • K shows every property of one note (details), long values in full; Enter edits one.
  • Edit the body or values with line breaks in your editor with e; mdgrid re-reads the note when you return. If that note has unsaved changes, mdgrid saves just that note first, so the editor shows the same values as the table (changes to other notes stay pending). The editor is the editor setting, else $VISUAL, $EDITOR, then vi.

mdgrid writes only the values you changed. A missing key gets one added line, and a note without frontmatter gets frontmatter added at the top (the body is untouched). If a note changed on disk before you save, the review shows it and lets you choose to write over it (o). The details are in Write-back safety.

If your notes live in a git repository, mdgrid can go on to git after a save. Set it in the config file (config.toml); by default it does nothing.

[git]
auto = "commit"    # off, add, commit or push (how far to go)
when = "save"      # save (after every save) or quit (once at exit)
message = "auto"   # auto (an automatic message) or ask (a one-line field after each save)

Only the notes mdgrid wrote (or created from the screen) enter the commit; other changed files are left alone. If git fails, the save stays done and one line says why. The items are described under [git].

Find, filter and sort

ToKeys
highlight a word and move between matches/, type, Enter; then n, N
keep only rows containing a word\ and type (filters as you type and shows the count); Esc clears. It looks at the note name and at every value of the note, including hidden columns and columns the view doesn’t show
keep only rows with the selected cell’s value, (* only highlights them)
sort by this columns or click the heading (ascending → descending → off)
build a sort (several columns, directions, order)S or the Sort button at the right of the filter bar
go to a row number:, the number, Enter
hide a column / show it again- / +
move a column / change its widthH L / < >
freeze the columns on the left while scrollingF

Search ignores case when the word is all lowercase. Esc clears the selection first, then the filter, then the conditions turned on with digit keys or the notice band, then the search highlight.

A sort is kept for the current view, so the table opens in the same order next time (the .base file is not changed). In the sort window you can add a rule (Enter, then pick a column), flip its direction (Enter), remove it (d) and reorder (K, J); every change applies right away. The quick filter \ is temporary. To keep more, see Shape a view and save it.

The view’s sort, or the table’s default sort written in the workspace marker (configuration), is the default order. The sort window marks those rules “default · view” or “default · marker”, and d does not remove them: they always come last to order rows that are otherwise tied. Sorting from a heading or the window puts your rules first, and tied rows stay in the default order. Flipping a default rule with Enter or moving it with K and J turns the rules you see into your own. While you have changed the sort, the button shows in the active color, and Back to default at the end of the window returns to the default order.

Filter with named conditions

Write a condition you use often once, with a name, under [conditions] in the config. The configuration reference has every item.

[conditions.week]
expr = 'due <= today() + "7d" && status != "done"'
label = "Due this week"
key = 1
ToDo
keep only the matching rows, or all rows againpress the condition’s digit key (1 above); two digits keep the rows that match both
combine it with other expressionscall it by name in an expression, as in cond("week") && priority > 1
filter by an expression now:, pick “Filter by an expression”, type it and press Enter (an empty one clears it)
always apply it in a viewin the filter section of o, set the condition to “only these” or “hide these” and apply
hide the matching rows everywhereadd hide = true; the settings band shows how many are hidden, and the condition’s digit key shows them again
print how many rows matchmdgrid --count --filter 'cond("week")' (for a tmux status line or a shell prompt)

Digit keys and the expression filter stay on when you switch views, and clear when you go to another table or open mdgrid again. Removing the item from the settings band clears them too. When nothing is selected and the search box does not filter, Esc clears every condition turned on with a digit key or from the notice band at once (conditions with hide = true keep their rows hidden).

A condition only one ledger needs, such as “time to get in touch” in a people ledger, goes at the top of that ledger’s marker .mdgrid/workspace.toml, in the same shape. It works only in the tables of that ledger, and the digit keys start at 1 with the marker’s conditions. Task conditions in config.toml (due date, owner) get no digit and no help line in a people ledger that has no such columns, so no digit leads to an empty table. [[notices]] and [[notify]] can go in the marker too.

Notices above the table

Write [[notices]] in the config to get a notice box above the header. A count item counts the rows that match a named condition; a note item shows the first lines of a note’s body. The configuration reference has every item.

[[notices]]
cond = "overdue"
text = "{count} overdue"
scope = "workspace"

[[notices]]
note = "~/notes/inbox.md"
lines = 2
ToDo
move into the boxm (or click it); Left and Right pick an item, Esc goes back to the table
see the rowsEnter on a count item: it narrows this table to the condition, or lists the tables with matching rows when it counts other tables too
add to your noteEnter on a note item opens the note in your editor; the box is read again when you come back
print it elsewheremdgrid --notices (one item per line, for a tmux status line, a shell prompt or the Herdr sidebar)

The numbers are counted again when you open the table, after a save, when a note changes outside mdgrid and when the date changes. Items that count other tables show the table first and count in the background, with “…” until they are done.

Get notified when a row matches

Write [[notify]] in the config to get notified, one row at a time, when a row starts to match a named condition. Put the time you want to be reminded in a remind column, and an OS notification comes at that time. The configuration reference has every item.

[conditions.remind]
expr = 'remind <= now() && status != "done"'
label = "Remind"

[[notify]]
cond = "remind"
text = "{title} (due {due})"
to = ["desktop", "terminal"]
DestinationWhere it shows
"desktop" (the default)the OS notification; macOS, Windows and WSL use what the OS already has, Linux uses notify-send
"terminal"your terminal’s notification (iTerm2, kitty, Ghostty, WezTerm, foot, Windows Terminal); other terminals ring the bell. Inside tmux, turn on set -g allow-passthrough on
"command"your own command (command = ["program", "{title}", "{text}"]), for example a tool that sends it to your phone

A row is notified once, when it starts to match. It stays quiet while it keeps matching, and is notified again if it stops matching and later matches again. The rows that already match when you write the config are remembered without a notification. When four or more rows start to match at once, they arrive as one notification (“4 new”). While mdgrid is open, it checks when you open a table, after you save and every minute. If a notification can’t be delivered, the reason shows at the bottom of the screen.

On macOS the notifications come from Script Editor, on Windows and WSL from Windows PowerShell. If you don’t see them, allow that app in the OS notification settings.

Get notified while mdgrid is closed: mdgrid --notify checks once without the screen and sends the notifications. Register it with your OS scheduler, and notifications arrive while mdgrid is closed too. It shares its record with the open screen, so a row is never notified twice even when both check. If a notification can’t be delivered, it prints the reason to standard error and exits with code 1.

The examples below all run every 5 minutes. Replace home with the name of your workspace and /path/to/mdgrid with what command -v mdgrid (where mdgrid on Windows) prints. A scheduler doesn’t read your shell’s settings, so if your shell changes XDG_CONFIG_HOME or similar, pass the config file with --config as well.

Linux (a systemd user timer): put two files in place and turn the timer on.

# ~/.config/systemd/user/mdgrid-notify.service
[Unit]
Description=mdgrid notify

[Service]
Type=oneshot
ExecStart=/path/to/mdgrid -w home --notify
# ~/.config/systemd/user/mdgrid-notify.timer
[Unit]
Description=mdgrid notify every 5 minutes

[Timer]
OnCalendar=*:0/5
Persistent=true

[Install]
WantedBy=timers.target
systemctl --user daemon-reload
systemctl --user enable --now mdgrid-notify.timer

From cron, OS notifications may not arrive, because cron’s environment doesn’t know where the desktop’s notifications go (DBUS_SESSION_BUS_ADDRESS). If you use cron, pass it on the line (replace 1000 with what id -u prints).

*/5 * * * * DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus /path/to/mdgrid -w home --notify

macOS (launchd): put ~/Library/LaunchAgents/local.mdgrid.notify.plist in place and load it.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>local.mdgrid.notify</string>
  <key>ProgramArguments</key>
  <array>
    <string>/path/to/mdgrid</string>
    <string>-w</string>
    <string>home</string>
    <string>--notify</string>
  </array>
  <key>StartInterval</key>
  <integer>300</integer>
</dict>
</plist>
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/local.mdgrid.notify.plist

Windows (Task Scheduler): register it from the Command Prompt. A console window flashes each time it runs.

schtasks /Create /TN "mdgrid notify" /SC MINUTE /MO 5 /TR "C:\path\to\mdgrid.exe -w home --notify"

WSL (from the Windows Task Scheduler): cron inside WSL only runs while WSL is up, so call it from the Windows side. wslg.exe is the wsl.exe that opens no window, and comes with current WSL. Replace Ubuntu with the name wsl -l shows.

schtasks /Create /TN "mdgrid notify" /SC MINUTE /MO 5 /TR "wslg.exe -d Ubuntu --exec /path/to/mdgrid -w home --notify"

Create routine runs

Write each piece of recurring work (a weekly review, the invoices at the end of the month) as a routine note, and the note for each run (“Weekly review 2026-11-23”) appears in another folder. A run note is an ordinary note: it shows in the table, the kanban and the gantt as it is, and whether you finished it stays with that run.

In the ledger’s marker .mdgrid/workspace.toml, add runs to the [[table]] of the routine table. folder is where the run notes go, and rule is the column that holds the rule. The configuration reference has every item.

[[table]]
name = "Routines"
path = "Routines"
runs = { folder = "Runs", rule = "recurrence", set = { status = "todo" }, copy = ["actor"] }
---
recurrence: weekly mon
actor: both
---

Write one of these in the rule column. The English and the Japanese forms make the same runs.

RuleDate of the run
daily, 毎日every day
weekly mon thu, 毎週 月 木those weekdays (mon to sun, 月 to 日); list as many as you like
monthly 1 15, 毎月 1日 15日those days; a month without a 31st has no run on the 31st
monthly last, 毎月 末日the last day of the month
every 3d, 3日ごとevery 3 days from the date in the start column

A note with an empty rule column is a routine that makes no runs. A rule that can’t be read (weekly someday) gets a reason with the note’s name and the value, and the other routines still make their runs.

A run note is named like Runs/Weekly review 2026-11-23.md. Its frontmatter has the link routine: "[[Weekly review]]", the run’s date date, and the set and copy values, and its body starts with a heading of the run’s name. The name and body templates change the name and the body.

Only the latest run up to today is made, so after a while away you don’t come back to a pile of runs you can no longer do. Each run is made once, and a note that already has the same name is never overwritten. Delete a run note you don’t need, and that run counts as done: it isn’t made again.

While mdgrid is open, it checks when you open a table and when the date changes. When runs are due, the bottom band says “Routines: 2 runs are due” (with the name of the table that makes the runs, so a table named Payments says “Payments: 2 runs are due”). Click it, or pick Create the recurring runs (routine_runs) in the palette (:), and the names of the notes to create are listed. Type y and Enter to create them; any other answer or Esc leaves them, and the bottom band doesn’t mention those runs again that day. If you left them by pressing Enter alone, pick the command in the palette and they are listed again, so you can still create them that day. The list is counted when you pick it, from the routine table as it is on disk, so a routine you added after opening mdgrid is in it. Opened read-only (--readonly), mdgrid shows neither the count nor the command.

Create runs while mdgrid is closed: mdgrid <ledger> --runs (mdgrid -w <name> --runs for a workspace) creates every due run without the screen and without asking, and prints the path of each note it created, one per line. It shares its record with the open screen, so a run is never made twice even when both check. A run it can’t create gets its reason on standard error and exit code 1, and the next call tries again. Registering it with your OS scheduler counts as saying yes to those notes.

The examples below call --runs every 5 minutes and then --notify, so a new run note that matches a notification condition is notified in the same pass. If you already registered --notify, replace that registration with this one. Without --notify, drop that part; you can also make the interval longer, such as every hour. Replace /path/to/notes with the ledger’s folder and /path/to/mdgrid with what command -v mdgrid (where mdgrid on Windows) prints.

Linux (a systemd user timer): put two files in place and turn the timer on. The - in front of the --runs line lets --notify run even when a run couldn’t be created.

# ~/.config/systemd/user/mdgrid-routine.service
[Unit]
Description=mdgrid routine runs

[Service]
Type=oneshot
ExecStart=-/path/to/mdgrid /path/to/notes --runs
ExecStart=/path/to/mdgrid /path/to/notes --notify
# ~/.config/systemd/user/mdgrid-routine.timer
[Unit]
Description=mdgrid routine runs every 5 minutes

[Timer]
OnCalendar=*:0/5
Persistent=true

[Install]
WantedBy=timers.target
systemctl --user daemon-reload
systemctl --user enable --now mdgrid-routine.timer

From cron, pass the address of the desktop notifications, as for notifications (replace 1000 with what id -u prints).

*/5 * * * * /path/to/mdgrid /path/to/notes --runs; DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus /path/to/mdgrid /path/to/notes --notify

macOS (launchd): put ~/Library/LaunchAgents/local.mdgrid.routine.plist in place and load it. It hands both calls to /bin/sh, one after the other.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>local.mdgrid.routine</string>
  <key>ProgramArguments</key>
  <array>
    <string>/bin/sh</string>
    <string>-c</string>
    <string>/path/to/mdgrid /path/to/notes --runs; /path/to/mdgrid /path/to/notes --notify</string>
  </array>
  <key>StartInterval</key>
  <integer>300</integer>
</dict>
</plist>
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/local.mdgrid.routine.plist

Windows (Task Scheduler): register it from the Command Prompt. cmd /c runs the two calls one after the other. A console window flashes each time it runs.

schtasks /Create /TN "mdgrid routine" /SC MINUTE /MO 5 /TR "cmd /c C:\path\to\mdgrid.exe C:\path\to\notes --runs & C:\path\to\mdgrid.exe C:\path\to\notes --notify"

WSL (from the Windows Task Scheduler): from the Windows side, hand both calls to sh inside WSL. Replace Ubuntu with the name wsl -l shows.

schtasks /Create /TN "mdgrid routine" /SC MINUTE /MO 5 /TR "wslg.exe -d Ubuntu --exec sh -c \"/path/to/mdgrid /path/to/notes --runs; /path/to/mdgrid /path/to/notes --notify\""

Search across the workspace

When you can’t remember which table a row is in, search every table of the workspace at once. Without a workspace open, mdgrid searches your registered tables. Turn it on in the config first; without it the palette doesn’t show the command.

[search]
across = true
  1. Open the palette with : and pick “Search across the workspace” (across_search).
  2. Type a word and press Enter. Results show up as each table is read, with “read 3 / 5” until all are done.
  3. Pick a row with Up and Down and press Enter. Its table opens with the word in the search box and that row selected.

The results are grouped per table, and each row shows the note name and the column and value that matched. A row matches the same way as in the search box (\): without a capital letter in the word, case doesn’t matter. Esc stops at any point and leaves you in the table you were in. Tables that cannot be read are skipped and named at the end. If you have unsaved changes, mdgrid asks whether to save first, as when you switch tables from the drawer.

Edit many rows at once

To rename a note, use Rename the note in the action menu (x) or the palette (:). The links to it, in [[…]], a Markdown link or a path with folders, are rewritten to the new name as pending changes; review the diff with Ctrl+S and save. A link to a note with the same name in another folder is left alone. For a task whose name starts with a date (20261125_Send the quote), type over the name you see in the table, “Send the quote”, and the date stays. To change the date too, type the whole name, such as 20261201_Quote. To be asked each time, or to keep the links as they are, set edit.rename_links to "ask" or "never".

  1. Mark rows with Space (it marks and moves down). v marks a range, Ctrl+A all rows.
  2. On one of the marked rows, open the cell of the column to change with Enter and choose the value.
  3. Every marked row gets the same value. Rows that cannot take it (read-only notes, for example) are skipped, with the count and the reason.

In a list column, a value every row has shows as [x] and a value only some rows have as [-]. Each row keeps its other items.

Nothing is written until you save, so the Ctrl+S diff lets you check all of it at once.

Type dates in words

Date and datetime cells take date words as well as 2026-10-15 and +3. Type next fr and the field shows “not a date” next to it; add i and it changes to 2026-11-27 (Fri), with the calendar on that day. Enter makes it a pending change. If the words cannot be read, Enter keeps the field open and nothing is written to the note.

These are the words it reads, with the day each one gives when today is Saturday 2026-11-21. Japanese words work in any screen language.

TypeDay
today, tomorrow, yesterday, 今日, 明日, 明後日, 昨日11-21, 11-22, 11-20, 11-21, 11-22, 11-23, 11-20
in 3 days, 3d, +3d, 3日後three days later (11-24)
3 days ago, -2d, 2日前that many days before (-2d is 11-19)
in 2 weeks, +2w, 2週間後two weeks later (12-05)
in 1 month, +1m, 1か月後, +1y, 1年後the same day of the month (or the month’s last day)
fri, friday, 金曜, 金曜日the first Friday after today (11-27)
this fri, 今週の金曜Friday of this week (11-20)
next fri, 来週の金曜Friday of next week (11-27)
next week, 来週the first day of next week (11-22)
next month, 来月the first day of next month (12-01)
eom, end of month, 月末the last day of this month (11-30)
end of next month, 来月末the last day of next month (12-31)

Weeks follow the dates.week_start setting (Sunday by default). With week_start = "mon", this mon typed on Sunday 11-22 gives 11-16.

In a datetime column, words change only the day and keep the time: tomorrow in a 2026-11-21T15:00 cell gives 2026-11-22T15:00.

The same words work when you edit marked rows at once. In a filter value (due “< before” tomorrow, for example), the words become a date when you type them, using today’s date, and the condition keeps that date: opening it tomorrow still filters on the same day.

Edit with vim keys

If your fingers know vim, Esc closing the input and having no way to delete a word get in the way every time you fix a cell. Put this in your config file (~/.config/mdgrid/config.toml) and mdgrid’s input boxes get vim’s two modes:

[keys]
vim = true

Every one-line input box (a cell after Enter, the / find box, the \ search box, the : palette, the name of a new note) opens in insert mode, and you type as usual. Esc keeps the box open and switches to normal mode: the bottom band changes from -- INSERT -- to -- NORMAL -- and the cursor becomes a block.

In normal mode, h l 0 $ move by character and w b e by word. Words break where vim breaks them. x X D dd delete, cw C cc delete and let you type again, and i a I A go back to insert mode. u undoes your edits in the box one at a time. Esc again cancels the input, and Enter confirms in either mode.

The table gets three keys too.

  • dd moves the note of the selected row to the trash after confirming its name. If you marked rows with Space or selected a range with v, it moves all of them (with a range selected, d alone is enough). One u brings them all back.
  • p puts the value you last copied in mdgrid: a cell copied with y goes into the selected cell, a row copied with Y into the columns of the same name. file.name and computed columns stay as they are.
  • . puts the value you last set in a single cell into the same column of the selected row. Set status to done, then j . j . marks the next rows done as well.

Values put with p and . are pending changes, so you check them in the Ctrl+S diff before anything is written. Counts such as 5j are not used; digit keys are left for other features. The added keys are listed in Key bindings, and you can rebind or remove them under [keys.table] and [keys.input_normal] like any other key.

The palette’s q! throws the pending changes away and quits without asking. It works with or without vim mode.

Create a note

  1. Press a, or click + New at the right end of the view bar. A form opens with the name and a field for each column.
  2. Type a name. sub/name creates it in a subfolder (made if missing). Enter and Tab move to the next field, Shift+Tab back; what you entered in the field you leave is kept. With the mouse, click a field’s row (the place row too) to move to it; the keys on the bottom row of the window (Create, Cancel and so on) and the candidates can be clicked too. With name_head = "hide", the name prefix from [new_note] name (a date, for example) is not shown in the name field and is added when the note is made ("show", the default, puts it in the field).
  3. Fill each field the same way as when you edit a cell of that column. A field with candidates shows the list (for a link column, the names of the notes in the linked table), a date field shows the calendar, and a checkbox field offers true and false. A list field opens the check window: Enter checks or unchecks a value, and Tab or [ OK ] moves to the next field. Closing the candidates or the calendar with Esc keeps the form and what you typed; a second Esc cancels the form.
  4. Press Ctrl+S from any field (or Enter on the last one; Tab on a list field). The file is created at once and its row is selected. Ctrl+E creates it and opens it in your editor.

  • With two or more folders open, you choose the folder first.
  • In a view filtered to a single value, such as status == "doing", the new note gets that value and stays in the view.
  • mdgrid does not create notes outside the opened folders or over an existing name, and not at all with --readonly.
  • The fields, required fields, preset values (with variables such as {date+7} or {now}), hidden values such as a creation date, a body template, and whether to use the form or go straight to the editor (mode = "editor") are set in new_note.

You can also create a note from the command line, without the screen. Scripts and AI agents can add tasks this way.

mdgrid ~/notes/tasks --new-note "Buy milk" --set due=2026-11-20 --set priority=p1 --set tags=home,errand
  • It uses the same settings as the form (the folder, preset values and body template of new_note) and prints the path of the note it created. In a ledger whose marker lists several tables, name the table with --table (mdgrid ~/notes/research --table News --new-note Headline) to use that table’s settings from any folder. Passing the table’s folder (mdgrid ~/notes/research/News --new-note Headline) does the same.
  • --set column=value is the same as typing into a field of the form, and can be repeated. The value is read by the column type. Separate list items with commas; an empty value (--set status=) leaves the column out.
  • For an existing name, a name outside the folder, a value that does not fit the type, or an empty required column, it creates nothing, prints one line with the reason and exits with code 2.

Delete a note and bring it back

If you created a note by mistake, press u right after creating it. The file is not erased: it moves to .trash/ (the trash) inside the opened folder. If you want it after all, Ctrl+R puts it back where it was.

To clear away a note that was already there:

  1. On its row, choose “Delete the note” from the action menu (x) or the palette (:).
  2. Check the name, then type y and press Enter. The note moves to the trash and its row leaves the table. Any other answer, or Esc, does nothing.
  3. To undo, press u. The note returns to its place and its row is selected.

After you close mdgrid you can still get a note back with “Restore from the trash” in the palette. It lists the notes in the trash with their name, original place and the time they were deleted; pick one and press Enter.

  • If a note with the same name already exists at the original place, nothing is restored and mdgrid tells you. Neither note changes.
  • A note with pending changes cannot be deleted. Save them or undo them with u first.
  • If other notes link to the note, the confirmation shows how many. The links are not rewritten.
  • mdgrid never empties the trash. To clear it, delete .trash/mdgrid/ with your file manager.
  • Deleting and restoring are not available with --readonly or in CSV and TSV tables.

Open a .base file

mdgrid /tmp/mdgrid-sample/Tasks.base
mdgrid /tmp/mdgrid-sample/Tasks.base --view "This week"

The table views of the .base appear as tabs, and the first one (or the one named by --view) opens. Switch with [ and ]. mdgrid reads filters, order, sort, groupBy, limit, displayName and formulas; Enter on a group heading folds the group.

  • A formula mdgrid cannot evaluate shows a dim ? instead of a guess; select it to see which formula.
  • Views other than table (cards, for example) do not open; mdgrid says why.
  • mdgrid never rewrites a .base file.

What mdgrid reads — keys, operators, functions — is listed in Obsidian Bases support.

Open a CSV or TSV as a ledger

mdgrid /tmp/mdgrid-sample/equipment.csv

Pass one .csv or .tsv file and mdgrid opens it as a table: the first line names the columns, each following line is a row. Editing values, undo, the diff before saving, filters, sorting, grouping, saved views and --print work as they do for a folder of notes.

  • Saving rewrites only the characters of the values you changed. Other lines, the quoting, the line endings (LF or CRLF) and a leading BOM stay as they were. A value is quoted only when it contains ,, " or a line break.
  • It is one file, so however many rows you change, the save review shows one diff for the file and writes it once. If the file changed elsewhere after you opened it, mdgrid does not write.
  • a adds an empty row at the end of the file (written right away) and opens the input on its first column.
  • Only UTF-8 is read. A Shift_JIS file, for example, does not open and mdgrid says why (save it as UTF-8 to open it). A line whose number of values differs from the header is read-only; select it to see why.
  • Features that only make sense for notes (open in the editor, rename the note, rename or remove a key, add a column, links and the relation map, parent and child rows, export to .base) are not shown, and their keys only say why.
  • Line endings may be LF or CRLF. A file whose lines end with a lone CR does not open; mdgrid says why. A repeated column name becomes name#column number from the second one on, and an empty one becomes #column number.
  • With --print --with-path the path is the file and the row number, like ledger.csv#2, and --apply brings changes back to that row.
  • Links between a CSV and notes (relations) are not supported yet. You can register a CSV table in the list of tables or a workspace and open it from there, but it is left out of links and the relation map.

Shape a view and save it

o opens the view settings. The sections are listed on the left with numbers, and the right side shows the items of the one you picked. Press 3 to jump straight to Sort, or Tab to step through them in order. h moves into the list, where j and k pick a section and the right side follows along; l or Enter takes you back to the items. The side your keys work on has the > mark. The sections:

  • Columns: which columns to show, and their order
  • Filters: add conditions. Choosing a column lists its values with counts, and you tick the values to keep or hide
  • Sort and group
  • Tree (parent/child): when on, child notes with parent: "[[Parent]]" (the key can be changed) are indented under their parent (a child’s name starts two columns right of its parent’s name). A parent shows how many direct children it has after its name (▾ Design (2)), and Z or a click on ▾ / ▸ folds or unfolds it. Press c on a row (also in the row menu and the palette) to open the new-note form with that row as the parent. When another table points to this one (meetings whose attendees point to people, say), c can make a note there too: mdgrid moves to that table, opens the form with the attendees field set to the selected person, and comes back to the row after you create or cancel. Sorting works among siblings, and a child whose parent is not in the table stays at the top level. With grouping, a child that lands in a different group from its parent is indented under a faint copy of the parent (marked ^ at the left edge; not counted and not selectable) in its own group. In the same section, turn on WBS to number the rows (1.2.1) and build a table of values for the progress key (default status): type a percent and a label for each value (for example 100 Done; - removes it). Rows without children show the label, parents show the average percent of their descendants. The table is saved with the view settings
  • Display: row numbers, zebra stripes, column lines, tabs, the search bar, the settings band
  • Views: the tabs above the table. Space shows or hides a tab, K / J move it, Enter makes it the default, renames or deletes it, and the last row turns the “[ ] to switch” hint on or off. These changes are saved to views.toml right away, without Apply (the view you are on cannot be hidden, and .base views cannot be renamed or deleted)
  • Look: choose where to save (“Save to”: global, this workspace, this table or this view), then pick the theme, parts and round pill ends with Enter; the theme and parts show where their current value comes from, such as (this table). Apply shows them and keeps them in that place (ui.toml, workspaces.toml, views.toml or the view settings; config.toml and the workspace marker are never rewritten). “+ Save this look as a template” names the combination; pick a template to use it, d deletes it. “Remove the override of this place” goes back to the wider place

Apply applies it to the table; Save as keeps it as an mdgrid view. Make this the default view in the palette (:) or the action menu (x) makes the current view the one that opens next time (pick the first tab to go back to it). On the same screen, Overwrite, Rename and Delete manage saved views, and Reset returns the settings to the defaults. A saved view becomes a tab next to Default table (with [display] tabs = "auto" the tab row appears only from then on) and is written to views.toml in the config folder. The conditions in effect are shown in the settings band above the table; f moves into the band and Backspace removes one.

To go back and forth with Obsidian, use the palette (:):

  • export_base: write the current view to a new .base you name (an existing .base is never rewritten)
  • import_base: take a .base view in as an mdgrid view (the parts it cannot hold are listed as dropped)

With --readonly, view settings are not remembered.

Give a folder its own command

mdgrid remembers each folder (or .base) you open: the columns you show and their order and widths, the filters, sorting and grouping set with o, the folded groups, and the views you saved as tabs. The next time you open the same folder, all of it comes back. So a shell alias is enough to turn a folder into a command of your own.

Add one line per folder to ~/.zshrc or ~/.bashrc:

alias tasks='mdgrid ~/notes/Tasks'
alias books='mdgrid ~/notes/Books'
alias meetings='mdgrid ~/notes/Meetings --readonly'   # only for looking
alias standup='mdgrid ~/notes/Tasks.base --view "By owner"'   # a .base, opened on one view
  • Typing tasks opens the task table the way you left it.
  • What is not remembered: the quick filter \ and anything you change with --readonly (sorts from a heading or the sort window are remembered).
  • The column order and hidden columns are remembered only after you move a column with H/L or hide one with -. Just opening a view remembers nothing, so a column you later add to the order of the .base or the marker shows up where you put it. If you change the order after moving columns, new columns still go where the order puts them, and the columns you moved stay where you moved them.
  • In fish: alias --save tasks 'mdgrid ~/notes/Tasks'.

The output side works the same way with a shell function:

todo() { mdgrid ~/notes/Tasks --print --format md --filter 'status != "done"' --sort due; }
pick-task() { mdgrid ~/notes/Tasks --pick path; }

Register the tables you use and switch between them

You can register a table you open often (a folder or a .base) under a name and a group. On that table, choose register this table in the palette (:), then set the name (the current view or folder name is filled in) and the group (pick one you already have or type a new one). If the name is taken, mdgrid asks before replacing it.

Once something is registered, running mdgrid with no arguments shows the list, grouped, on top of the current folder’s table. Type part of a name, group or path to narrow it, and press Enter to open one (on its registered view).

The first row, “this folder”, or Esc keeps the current folder. While a table is open, open a registered table in the palette shows the same list. If you have unsaved changes, mdgrid asks whether to save or discard them before switching.

Registrations live in places.toml in the config folder (~/.config/mdgrid/places.toml). You can also write it by hand:

[[place]]
name = "Tasks"
group = "Work"
path = "~/notes/Tasks"

[[place]]
name = "Books"
group = "Personal"
path = "~/notes/Books.base"
view = "Reading"

A leading ~ in path means your home folder. Rows that cannot be read (no name or path, or a repeated name) are skipped with a warning. Notes are never written.

Save what you see as a session

Once a week you look at the tasks in progress that mention a meeting, sorted by due date. Building that again every time gets old. Give the filters, sort and columns a name as a session, and mdgrid -s standup opens the table just like that.

Narrow and sort the table and set the columns, then choose Save session in the palette (:) and type a name. If the name is taken, mdgrid asks before replacing it. Saving works on a table opened with --readonly too, since notes are never written.

A session holds the open table (a folder or a .base) and its view, the \ filter, same-value filters, the expression filter, the conditions turned on with number keys (and the hide conditions you turned off), the sort, the order of the visible columns, the hidden columns, and whether the table was opened read-only. Cell values are not in it. The notes are read each time you open it, so values changed after saving show up as they are now.

mdgrid -s standup     # open that session
mdgrid --sessions     # list the saved sessions, name and folder, one per line

Sessions live in sessions.toml in the config folder (~/.config/mdgrid/sessions.toml). You can write it by hand, or keep it in your dotfiles and take it to another machine:

[sessions.standup]
folders = ["~/notes/Tasks"]
columns = ["title", "status", "due"]
hidden = ["priority"]

[[sessions.standup.filters]]
kind = "value"      # a same-value filter; also text (\ words), expr, cond (number-key condition), show (hide condition turned off)
key = "status"
value = "doing"

[[sessions.standup.sort]]
key = "due"
dir = "asc"

A name with characters other than ASCII letters, numbers, - and _ goes in quotes, as in [sessions."進行中"] (a TOML rule). ~ is your home folder. Unknown items are skipped with a warning, and so are columns of the session that the table no longer has. An unknown name, a broken sessions.toml or a missing folder stops mdgrid with a one-line reason. -s cannot be combined with paths.

When you quit a table opened from a session, its columns and sort stay in the look mdgrid remembers for that folder, as with any change made on the screen. To change a session, save it again under the same name.

Come back to the same table when the terminal is restored

Some tools put your terminal panes back after a restart of the computer. When such a tool restores a pane, mdgrid can reopen the same table and view you had. Only the table and the view come back: the selected row, the scroll position and unsaved changes do not.

Inside a Herdr pane this works without any setup. mdgrid tells Herdr the command that reopens the current table and view, and tells it again whenever you move to another table or view. When the Herdr server stops and starts again, Herdr runs that command in the same pane. When you quit with q yourself, mdgrid hands the pane back, so nothing is reopened. Herdr lists it among its agents as mdgrid.

With several mdgrid panes open, the Herdr sidebar tells them apart. Each pane title shows the table and view, such as Tasks · In progress. It changes when you switch views and goes away when you quit with q. For a workspace table the title uses the name you gave it; otherwise it uses the .base file name or the folder name. A table with only one view shows just the table name.

To turn this off:

[terminal]
herdr = false

For tools that cannot take a command from mdgrid, such as tmux, use mdgrid --continue. mdgrid remembers the last table and view for each folder it was started in (in ~/.local/state/mdgrid/), and mdgrid --continue in that folder goes back there. If nothing is remembered, or the table is gone, it opens as plain mdgrid does. With the tmux plugin tmux-resurrect, put this in ~/.tmux.conf and restoring runs mdgrid --continue in the pane that had mdgrid:

set -g @resurrect-processes '"~mdgrid->mdgrid --continue"'

Add --readonly to --continue to open read-only. It cannot be combined with paths or --view.

Go back to a recent table

mdgrid remembers the tables (folders or .base files) you open on the screen, with the view you were on, newest first, up to 20. It is there so you can come back to a table you never registered or put in a workspace.

Recent tables in the palette (:) lists them. Each line has the table name and view, when you last opened it, and its folder. Type to narrow, and press Enter to open the table in the view you last had on it. The table you have open now is not listed. With unsaved changes, you are asked to save or discard first.

If you have registered tables, plain mdgrid with no arguments lists up to five recent tables too, under “Recent”, right after “this folder (stay here)”.

In the shell, mdgrid --recent prints them one per line, with the path, the view name and when you last opened it, separated by tabs:

$ mdgrid --recent
/home/u/notes/tasks.base	In progress	2026-11-21 09:30
/home/u/notes/projects		2026-11-20 18:02

To pick one with fzf and open it in that view:

line=$(mdgrid --recent | fzf) &&
  view=$(printf '%s\n' "$line" | cut -f2) &&
  mdgrid "$(printf '%s\n' "$line" | cut -f1)" ${view:+--view "$view"}

The list is kept with the screen state (~/.local/state/mdgrid/recent.toml); nothing is written to your note folders. Folders and .base files that are gone are dropped before the list or --recent shows them.

Switch between favorite workspaces

When you go back and forth between workspaces, say one for work and one for a hobby, put them in your favorites. Open the workspace you want and press W: the switch list ends with a line “+ Add Work to favorites”. Choose that line or press a, and it is added while the list stays open. Select a favorite you no longer need and press d to take it out. K and J move the selected one up or down, numbers included, so the place you use most can sit at 1. Add the current workspace to favorites in the palette works too (if it is already a favorite, this takes it out).

On any screen (table, relation map, tree, gantt, kanban or chart), W (or Switch workspace in the palette, the workspace name in the header breadcrumb, or, outside a workspace, the W ⇄ button at the right of the header) opens the list of your favorites, numbered in the order you added them. A digit goes to that one; ↑ ↓ and Enter go to the selected one. While the list is open, the bottom band mentions the digit keys too. Pressing the number of the place you are in closes the list and tells you that you are already in that workspace. Esc closes the list and leaves you where you were.

You land on the table and view you last had open in that workspace during this run. The first time, it opens the table named in the marker’s open, or the first table.

Once you have moved away from where you started (a plain folder, a .base, a detected root folder or a workspace), the list starts with Where you started, numbered 0. Pressing 0 or choosing it takes you back to the table you started with, in the view you last had on it. Wherever you go, unsaved changes are offered for saving or discarding first.

The table list drawer (w, or the table name in the breadcrumb) switches tables within the current workspace. It does not list other workspaces or favorites, so use this list to move between workspaces. Open a workspace in the palette lists the workspaces in workspaces.toml plus Where you started and your favorite marker workspaces.

Favorites are kept in order in favorites at the top of workspaces.toml: a workspace from workspaces.toml by its name, a marker workspace by the path of its root. You can write it by hand:

favorites = ["Work", "Hobby", "~/lab"]

Nothing is written to note folders or workspace markers. An entry whose workspace was removed, or whose marker root is gone, is left out of the list with a warning.

A note can point at another note with a link in its frontmatter, so folders of notes work like linked tables (tasks → projects → clients). The note’s file name is the key: there is no id column, and a list of links stands in for a many-to-many join table.

project: "[[Clinic Booking App]]"     # one project
owner: "[[Leo Park]]"
depends_on:                           # many
  - "[[Design the booking screens]]"
  - "[Build the appointment API](Build%20the%20appointment%20API.md)"   # a Markdown link works too, and so does a plain path
  • Link cells show the target note’s name. A [[…]] whose note does not exist is shown with ? in front.
  • In a column whose values are mostly links, Enter lists the notes in the target’s folder by name. The one you pick is written in the form the column already uses ([[name]] if none). In a list column you can tick several. To fix the form and the path for a ledger, set edit.link_format ("wiki" or "markdown") and edit.link_path ("shortest", "relative" or "absolute"). For a ledger you also read in another table tool, match that tool’s settings so the links added in either one look the same.
  • A column that points to a parent, like the parent of a task (the key of children in the marker), lists the notes of the same table even before any task has a parent. In a ledger you have just made, you can pick the very first parent from the list.
  • Value choices come from the notes of the current table, so tags from other tables under the same root do not show up. A column whose values differ on every row, like a URL or a memo, offers no choices.
  • The order and the narrowing of the choices can be set per column with [rules.<column>.candidates]. sort = "count" lists the parents with the most children first, "recent" the most recently changed first, and where = { status = ["todo", "doing"] } keeps finished tasks out of the parent choices. It works for a tag column too, putting the tags used most, or most recently, in that table first.
  • If you type a name instead of picking, and exactly one note has that name, the link to that note is written. For a task whose name starts with a date (20261126_Send the quote), the name the table shows, “Send the quote”, is enough. When notes made on different days share a name, the list shows them by file name, and typing the shared name asks you to choose one with ↑ ↓ instead of guessing.
  • :open_link (or Open the link target in the x menu) opens the target: in the same table it moves to the row; otherwise it opens the registered table that holds the note (or its folder) and selects the row. Unsaved changes are confirmed first.
  • :linked_rows lists the notes that link to the current one, with the table and column they link from. Pick one to open it.
  • Links work whether you open a folder or a .base, and may point outside the opened folder. Register the folders you link between (see above) so names resolve across them. A value counts as a plain-path link only if it contains / or ends in .md and the note exists, so ordinary words stay text.

The sample examples/studio links tasks, projects, clients, people and meetings this way: mdgrid examples/studio/Tasks.

The relation map. Press R (or pick Relation map in the screen type menu at the top right) to see the tables as boxes with their row counts and columns, and an arrow from each link column to the table it points at (N → 1, or N → N for a list of links). A column that points inside its own table, like a task’s parent, loops back to its own box. The columns in each box carry the same type marks as the headings, and link columns carry ↪. ↑ ↓ pick a table, ← → pick a link; the details and, on a tall terminal, the linked records follow the selection. The layout adapts to the terminal width. You can also click: a table selects it and a second click opens it, a line or an arrow selects that link, and a linked record opens its note. Press R again to go back to the table. The map covers the current workspace (see below), or the registered tables if there is none.

Group tables into workspaces

A workspace is a named set of tables (folders or .base files). When the table you open belongs to one, links, linked rows, the relation map and the screen type menu at the top right use only that workspace’s tables, so a root folder for work and one for hobbies do not mix. The breadcrumb in the header shows <workspace> › <table>. Click the workspace name for the list of workspaces to switch to (W), or the table name for the drawer with that workspace’s tables (w).

In the palette (:): create a workspace with this table, add this table to a workspace (pick one or type a new name), remove this table from a workspace, and open a workspace (pick it, then one of its tables). From the shell (with no path, --add-to and --remove-from use the current folder):

mdgrid ~/notes/tasks --add-to Work
mdgrid ~/notes/projects --add-to Work --as Projects
mdgrid --workspaces                          # list them
mdgrid -w Work                               # open the first table of Work
mdgrid -w Work ~/notes/tasks                 # open this table within Work
mdgrid ~/notes/tasks --remove-from Work
mdgrid --remove-workspace Work               # the notes are not touched

Workspaces live in workspaces.toml in the config folder, next to places.toml:

[[workspace]]
name = "Work"

[[workspace.table]]
name = "Tasks"
path = "~/notes/tasks"

[[workspace.table]]
name = "Projects"
path = "~/notes/projects"
view = "Open"

To keep the workspace with the notes instead (for example in a repository you share), run mdgrid --init-workspace in its root (or mdgrid <folder> --init-workspace). It writes .mdgrid/workspace.toml; with no [[table]] in it, every folder of notes directly under the root is a table (a .base is not added automatically, because it covers the whole root folder; list it with [[table]] to include it). A [[table]] with both name = "Plans" and path = "calendar" shows as “Plans” in the drawer, in the header breadcrumb and in the list of recent tables.

To open a chosen table whenever the root folder is opened, write open = "<table name>" at the top level of the marker (the name of a [[table]], or the folder name of an automatic table). For example, a ledger folder with a README or AGENTS.md next to its notes can open only its .base. Add --raw to see every note in the folder.

Which tables are in scope, first match wins: -w → the nearest .mdgrid/workspace.toml above the opened folder → the first workspace in workspaces.toml that holds the table → detection → the registered tables. Detection is set by [workspace] detect in the config (default [".obsidian"]; the old values "vault" and "git" are still read): the nearest root folder (a folder with .obsidian/), and with ".git" also the repository root, counts as an unnamed workspace of the folders right under it. detect = [] turns it off.

Stack tables

When you want to keep an eye on the projects while you work through the tasks, you can put the other table below the current one on the same screen instead of switching back and forth.

  1. In the table screen, choose Stack a table below in the palette (:) and pick a table of the current workspace. It is placed below the current table, and the screen is split top and bottom.
  2. Each table has a title line, “table · view · rows”, and the table your keys act on is marked with ▶. Ctrl+w j and k move to the table below and above. Clicking a row or a title moves there too.
  3. Finding with /, searching with \, filters, sorting, views with [ ], editing a cell and a new note with a all act only on the ▶ table.
  4. Ctrl+w + and - make the selected table a row taller or shorter, and Ctrl+w c (Close this table in the palette) takes it out.

Up to four tables can be stacked, and each needs its title and 3 rows. When the terminal gets too short, the tables other than the selected one fold to their title line, from the bottom up. Switching to the Gantt, kanban, chart or tree screen, and opening help or the palette, shows only the selected table on the whole screen; going back brings the stack back.

Edits pile up in one set of changes, whichever table you edit in. When two tables show the same note, a value you change in one shows as pending in the other, and Ctrl+S writes both edits at once. The save review lists the changes of every table with a heading per table and writes them all when you confirm. Closing a table that has pending changes asks whether to save or discard them.

Save an arrangement as a page

Give a pair you compare often a name with Save the arrangement as a page in the palette, and it becomes a page of the current workspace. A page remembers the tables, their views and the height ratios, and is listed above the tables in the table list drawer (w). Choosing it opens the tables stacked. While a page is open, the drawer puts its ● on the page name, and choosing a table in the drawer closes the page and opens that table on its own. From the shell:

mdgrid -w work --page morning            # a workspace in workspaces.toml
mdgrid ~/notes --page morning            # a workspace marker .mdgrid/workspace.toml

Pages live in the workspace in workspaces.toml or in the marker .mdgrid/workspace.toml, so you can write or edit them by hand. Saving from the screen only appends to the end of a marker, leaving every other line and comment as it was.

[[workspace.page]]       # [[page]] in a marker
name = "morning"
tables = [
  { table = "Tasks", view = "Today", height = 2 },
  { table = "Projects", view = "Active", height = 1 },
]

In a Herdr pane, the pane title is the page name while a page is open, and restoring the pane opens the same page again. mdgrid --continue does the same. An arrangement stacked on the spot has no name, so it comes back as the selected table and view.

Create a ledger from a starter

The common kinds of ledger (tasks, tasks shared with AI agents, bookmarks, a reading log, people and meetings) can start from a starter: a marker and note templates ready to use. mdgrid --starters lists them; mdgrid <folder> --init-workspace --starter <name> writes one (--with-samples adds a few sample notes). The folder is created if missing, and if any target file already exists nothing is written.

mdgrid --starters
mdgrid ~/notes/books --init-workspace --starter reading --with-samples
mdgrid ~/notes/books

In the screen, Create a ledger from a starter in the command palette (:) does the same: pick a starter, type the folder to create (relative to the open folder; the starter’s name by default), answer y/n for the samples, and the new ledger opens. Esc cancels at any step.

tasks-ai is a ledger for work shared between people and AI agents. A task’s actor (human, ai or both) splits it into the “People only” and “AI only” tabs, and the charts by status and by actor (P), the Gantt (C) and the Kanban (B) open as they are. A new task asks who does it, the start date, the due date, the priority, tags and a URL; setting its status to doing fills the start date with today when it is empty, and done fills the done date. A second table, “Routines”, holds repeating work; the task for one round links to it from its routine column (switch tables with w or the table name in the breadcrumb, and press R to see the links). mdgrid does not create the next round: a person or an agent adds it, for example with --new-note.

Instead of copying a whole starter, a ledger’s marker can just name the starter it is based on. What you write in the marker always wins, and the starter fills in the rest. When a newer mdgrid ships a newer starter, the new content takes effect without rewriting the marker.

# <ledger>/.mdgrid/workspace.toml
starter = "tasks"
options = ["ai"]          # parts of the starter: tasks has ai (split by who does it) and priority-words (high, medium, low)
starter_lang = "en"       # fix the language of the table and view names (default: the current language)

# Below are your own overrides; they win over the same items of the starter.
[rules.priority]
values = ["p1", "p2", "p3", "p4"]

Tables and views are matched by name: items you write in a view of the same name change only those items, and a view with a new name is added after the starter’s. If the starter or an option cannot be found, mdgrid prints one warning line and opens with what the marker itself says. For now you write this kind of marker by hand (--init-workspace --starter still copies everything).

Your own starters live in the config folder under starters/<name>/, in the same shape as the built-in ones (starter.toml, ledger/, samples/). The quickest way to make one is to copy the .mdgrid/ of a ledger you like into ledger/. Only the marker and the templates go in, never your notes, so a ledger you have shaped becomes the template for the next one. The list and the palette show your own starters first, marked (yours).

To keep a starter in your dotfiles and use it on every machine, link the starter’s whole folder. A link to the folder is read, but links to the files inside it are not followed.

Use with other commands

To save the table exactly as shown — with your filters, sorting and hidden columns — choose Export the table to a file in the command palette (:) and type a file name. The extension picks the format: .csv, .tsv, .json or .md. The first column is each note’s path, so a CSV or JSON can come back with --apply. Keep the last column, _rev: --apply uses it to check that nobody changed the notes after the export.

Print the table of a view to standard output without opening the screen (csv by default; notes are not written):

mdgrid /tmp/mdgrid-sample/Tasks.base --print
mdgrid /tmp/mdgrid-sample/Tasks.base --print --format json | jq .
mdgrid /tmp/mdgrid-sample/Tasks --print --format md > table.md
mdgrid /tmp/mdgrid-sample/Tasks --print --format tsv > table.tsv

When you --print a folder, there is no note-name column (the columns are the frontmatter keys only).

Pick rows on screen and print their paths or a column’s values. The screen is read-only; Enter prints the marked rows (or the selected row) one per line and exits. q cancels, prints nothing and exits with status 1.

mdgrid /tmp/mdgrid-sample/Tasks --pick path | xargs -o vi    # open the picked notes
mdgrid /tmp/mdgrid-sample/Tasks --pick status

y (or Ctrl+C) copies the value of the cell to the clipboard. With rows selected, it copies the current column’s values of those rows, one per line. Y copies the whole row as tab-separated text with a header.

To paste, select the cell to start from and use your terminal’s paste (Ctrl+V, Cmd+V or whatever your terminal uses). Values separated by line breaks go down the rows, and values separated by tabs go right across the columns, so a range copied from a spreadsheet pastes the same way. Pasted values are pending changes until you save, and one u undoes the paste.

Let AI change values

For AI agents that run in a terminal, the bundled skill teaches the mdgrid commands. The agent exports the table with --print --with-path, edits it, and brings it back with --apply <file> --propose <reason>.

mdgrid Tasks --apply edited.csv --propose "Review the overdue tasks"

--propose writes only the columns you let AI change in this ledger, and does not write the rest. The changes it did not write are left as a proposal, one file in .mdgrid/proposals/ at the ledger root. List the columns AI may change under [ai] in the marker or the config (by default, none):

[ai]
write = ["status", "progress"]

When you open the table in mdgrid and there are proposals for its rows, the bottom band says “AI proposals 1”. Click it, or choose Show AI proposals in the palette, pick a proposal and choose Take it: its values become pending changes, so you see the diff when you save, or undo them with u. Discard it only deletes the proposal file. Cells someone changed after the proposal was made are not taken, and mdgrid tells you how many.

Chat tools without a shell connect through MCP. Add mdgrid <ledger> --mcp to the tool’s MCP server settings:

{
  "mcpServers": {
    "mdgrid": { "command": "mdgrid", "args": ["--mcp", "/path/to/ledger/Tasks"] }
  }
}

It offers six tools: list the tables (tables), show a table’s settings (describe), read rows (query), count (count), check (check) and change values (update). update works like --propose: it writes only the columns you let AI change and leaves the rest as a proposal. The server runs on your machine only, never goes online, and never reads or writes outside the ledger you gave it.

Start it with no path, mdgrid --mcp, and it connects to the tables you registered (Register the tables you use and switch between them) instead of one ledger. tables lists the registered names and groups, and the other tools take a registered name (“Tasks”, “Reading”) as table and read or change that table. When two groups hold the same name, pick one with “group/name”. Only the columns each ledger lets AI change are written. With nothing registered, it opens the current folder.

Two ways connect it without writing settings by hand. Both affect only the people who install them; mdgrid itself stays as it is.

  • Claude Code: the bundled plugin (add this repository as a marketplace and install mdgrid) carries a setting that starts mdgrid --mcp, so the connection comes with the skills. mdgrid has to be on your PATH.
  • Claude desktop app: the manifest of an extension (MCP Bundle) lives in packaging/mcpb/. The packed .mcpb is not attached to releases yet.

You can also ask an AI from mdgrid itself. Put the command to send requests to in the config (config.toml):

[ask]
command = ["claude", "-p", "--tools", ""]

Select rows, choose Ask AI in the palette and type something like “fill in the empty categories”. The values of the selected rows (or the rows of the current view) and the column types go to that command, and you can keep working while it answers. The changes in the reply become an AI proposal and the list of proposals opens, so you review the diff and take or discard it. mdgrid holds no API keys and never goes online, and it sends only front matter values, never note bodies. Keep the command unable to use tools such as reading or writing files or running commands (--tools "" above), so instructions someone slipped into a row value cannot make it act.

Each proposal is its own file, so several people sharing a ledger through a cloud folder or git do not collide. If someone changed a note after the export, both --apply and --propose stop without writing, and the agent exports again and redoes the edit (the last column, _rev, tells them apart).

Choose a theme

Add a line such as theme = "nord" to the config to change the screen colors. All seven themes and how to choose them are on the Themes page.

When you cannot edit

What you seeWhyWhat to do
a row of # cellsthe note’s frontmatter cannot be written safely (a duplicate key, a BOM, mixed line endings, …)select it to see the reason; fix it in your editor (e). All reasons: Read-only notes
Enter says read-onlya nested value, a block scalar, a file.* or formula.* columnRead-only values
a value with line breaks cannot be editedthe one-line input cannot hold itopen the note with e
a date or number is refusedthe date does not exist, or the value is not a numberthe input stays open; type it again
! at the start of a rowa conflict file made by a sync tool, or a note that changed on disk while you had pending changesclean up conflict files by hand; for a changed note, write over it (o) or drop your changes (d) in the save review
nothing can be writtenopened with --readonlyopen again without it

If a note changes on disk while mdgrid is open, mdgrid re-reads it automatically (not while you are editing a cell). If it changed before you save, the save review shows it.

How mdgrid sees your notes

日本語 · Contents

This page explains the few ideas the rest of the manual builds on: tables, views, registered tables, links, workspaces and the relation map. Once they click, every screen of mdgrid is one of these seen from a different side.

Notes become a table

Open a folder and every Markdown note in it (and in its subfolders) becomes a row. Every frontmatter key that any of the notes uses becomes a column. The note’s file name is shown on the left; it is the row’s key, so there is no id column to maintain.

Tasks/                          Note            status   due         tags
├── Fix login.md      ──►       Fix login       doing    2026-10-05  [bug, web]
├── Ship v0.2.md                Ship v0.2       todo     2026-10-10  [release]
└── Write docs.md               Write docs      done     2026-10-01  [docs]

mdgrid looks at the values of a column and decides what kind it is: text, number, date, checkbox or list. The kind decides how a cell is edited (a calendar for dates, a list of choices for text that repeats, checkboxes for lists) and how it is shown. A value that does not fit the column’s kind is shown as it is with a ! in front, never changed.

A key that a note does not have shows as an empty cell; an empty string shows as "" and a null as ∅, so you can always tell the three apart.

Views: different ways to look at the same notes

A view is a way of looking at the table: which columns, in which order, which rows (filters), how they are sorted and grouped. The tabs under the header are the views of the table you opened.

  • Default table is always there when you open a folder: every note, every key.
  • .base views: when you open an Obsidian Bases .base file, its table views become the tabs. mdgrid reads them but never changes the .base file.
  • mdgrid views: in View settings (o) choose columns, filters, sorting, grouping and display options, then Save as a name. The view becomes a new tab. Saved views live in views.toml in the config folder, never next to your notes.

Besides saved views, mdgrid quietly remembers how you left each table — column widths, hidden columns, the selected view — and puts it back the next time you open the same folder or .base.

Nothing is written until you save

Every edit is pending at first: the cell gets a * and the bottom band counts the unsaved changes. Ctrl+S shows a diff of each file before anything is written, and Enter writes them. Only the value you changed is rewritten (or one line is added for a new key); the rest of the file — other keys, their order, comments, line endings, the body — stays byte for byte the same. See Write-back safety for the exact rules.

Registered tables: bookmarks you switch between

Register a table you use often under a name and a group (register this table in the palette :). Plain mdgrid with no arguments then lists them, and open a registered table switches between them. Registrations are bookmarks in places.toml; they do not change the notes.

A shell alias is the other way to reach a table quickly: alias tasks='mdgrid ~/notes/Tasks' makes tasks a command of its own.

A frontmatter value can point at another note:

project: "[[mdgrid]]"                 # wiki link: the note named mdgrid
assignee: "[Alice](../members/Alice.md)"   # Markdown link
related: [../projects/Website]       # a plain path also works

mdgrid shows a link by the target’s name, lets you pick a target by name when you edit the cell, opens the target (:open_link, or x on the cell), and lists the notes that link to the current one (:linked_rows). A link whose note does not exist is shown with a ? in front.

Because the file name is the key, a folder of notes works like a table and links work like foreign keys. A list of links stands in for a many-to-many join table.

 tasks ──project──► projects ──lead──► members
   └──────assignee──────────────────────┘

Workspaces: which tables belong together

To resolve a link by name, mdgrid has to know which tables to look in. A workspace answers that: a named set of tables that belong together, such as the tasks, projects and members of one project. Links, linked rows, the relation map and the screen type menu at the top right use only the tables of the current workspace, so the root folder for your work and your reading notes do not mix.

mdgrid decides the workspace of the table you open in this order:

  1. -w <name> on the command line.
  2. A marker file .mdgrid/workspace.toml in the folder or above it. This is useful in a repository you share: the workspace travels with the notes.
  3. A workspace in workspaces.toml (in the config folder) that contains the table. Manage these from the palette or with --add-to, --remove-from and --workspaces.
  4. Detection: the nearest root folder (a folder with .obsidian/), or a git repository if you turn that on with [workspace] detect. Its folders of notes become the tables.
  5. Otherwise, the registered tables.

When one is in use, the breadcrumb in the header shows <workspace> › <table>. The workspace name switches between workspaces; the table name switches tables within the workspace. See Group tables into workspaces.

The relation map

Press R (or pick Relation map in the screen type menu at the top right) to see the workspace as a diagram: one box per table with its row count and columns, and an arrow from each link column to the table it points at, marked N:1 (one link) or N:N (a list of links). A column that points at notes of its own table, such as a task’s parent, gets an arrow that leaves the box on the right and comes back into it. In each box the column names carry the same type marks as the table headings (# number, ◷ date and date-time, ⋮ list, ◉ chip column and so on), and link columns carry ↪. The marks are characters, so the columns stay apart without color too. Column names in the boxes and the details are the same as the table headings (the displayName in the .base). Under Reverse, the details list the columns of the target table that point back at these notes, such as the attendees of a meeting and the meetings of a person. Select a table or a link with the arrow keys or the mouse; the details and the linked records follow the selection. Enter (or a second click) opens the table. Press R again to go back.

Where mdgrid keeps things

WhatWhere
Your notesUnchanged, except the values you save
Settings~/.config/mdgrid/config.toml (--print-config prints every item with its default)
Saved mdgrid views~/.config/mdgrid/views.toml
Registered tables~/.config/mdgrid/places.toml
Workspaces~/.config/mdgrid/workspaces.toml, or .mdgrid/workspace.toml in a folder
Your starters (ledgers to create from)~/.config/mdgrid/starters/<name>/
How you left each table (widths, hidden columns, view)~/.local/state/mdgrid/

XDG_CONFIG_HOME and XDG_STATE_HOME move the two folders. On Windows they default to %APPDATA%\mdgrid\ and %LOCALAPPDATA%\mdgrid\. The files are plain TOML you can edit by hand; mdgrid keeps your comments when it updates places.toml and workspaces.toml.

Make it look the way you like

日本語 · Contents

The look of mdgrid is set by the [look] and [display] sections of the config file (~/.config/mdgrid/config.toml). This page shows what each item changes, how they combine, and how to give one workspace or one table its own look. Every item is described exactly in Configuration.

The default look

With colors on, mdgrid starts in the quiet “sumi” set ([look] preset = "sumi"): rounded window frames, the selection as a tinted background instead of reverse video, headings in an accent color with a line under them, and cells shown as parts — a colored dot before values like status (● doing), lists separated by · (ui · web), and ✓ for booleans. Only the dot is colored; the value text stays in the plain, readable color.

Without colors (--no-color, NO_COLOR set, TERM=dumb, or [terminal] color = false), the screen is plain text with reverse video for the selection; nothing on screen depends on color alone.

Colors: themes

[look] theme picks a color set: "default" keeps your terminal’s colors; "nord", "solarized-light", "dracula", "gruvbox", "pink-monster", "dozy-pink" and the quieter "sumi", "slate", "saas", "saas-dark" and "paper" paint the whole screen. Only colors change. See Themes for screenshots.

[look]
theme = "nord"

A pair { light = ..., dark = ... } picks by the terminal’s background; "auto" is { light = "saas", dark = "sumi" }. mdgrid reads the background from COLORFGBG or asks the terminal; when it cannot tell, it assumes dark.

[look]
theme = { light = "paper", dark = "saas-dark" }

[look.colors] overrides single colors of the theme (accent, selection, …) and [look.colors.values] gives a value its own color (done = "green"). The color goes on the value’s chip in the cells, on the value in group headings and on kanban lane titles alike, so work = "blue" turns the heading of the work group blue too.

Themes and role colors can also be picked on screen: in the “Look” section of the view settings (o), choose a theme from the list, or pick Custom at the end of the list to change the current theme’s colors role by role. See Themes.

Shapes of parts: style

[look] preset picks a whole set of part shapes, and [look.style] overrides one part each.

PresetFeel
sumi (default)Dot and text, tags separated by ·, ✓, a line under headings, underlined tabs
slateShapes (○ ◐ ● ⊘), #tags, ☑, filled tabs, heading marks
saasSoft tinted pills, segmented tabs
paperColored text only, [x], column lines, square frames
gridPlain text, column and heading lines, keys on a tint
classicThe 0.2.0 look (square chips, filled selection)
dozy-pinkSoft round pills (pair it with the dozy-pink theme)
[look]
preset = "saas"

[look.style]
select = "cross"      # tint the selected row and column as a crosshair

The parts are status, tags, check, select, rules, tabs, frames, band, links and icons (all values in Configuration). Round pills ("pill") are drawn with Nerd Font glyphs. With the default [terminal] nerd_font = "auto" they are round on terminals that draw the rounded ends themselves (Ghostty, WezTerm) and clipped elsewhere; true always draws them round, false always clipped.

Catalog: open docs/catalog/index.html in a browser to compare themes and part shapes on a live sample. Select cells, pick values, search, filter, open details, the relation map and help — with clicks and keys. It also writes the settings to paste into config.toml.

Cells as parts or as text

[look] cells decides how values look in the table when colors are on:

Valuecells = "rich" (default)cells = "plain"
done: true☑true
tags: [ui, web]chips ui web, each in its own color[ui, web]
status: doing (a column of short values that repeat)a chip doingdoing
project: "[[mdgrid]]"mdgrid in the accent colormdgrid
column headings◉ status, ◷ due, # priority, ☑ done, ⋮ tagsstatus, due, …

The same value always gets the same chip color, in the table, in the value counts (%) and in the list of choices. The text of a value is always shown; color never stands in for it. Values written to notes, edited, searched and printed (--print) are the plain values.

Keep single parts as text with their plain shape, and choose column by column:

[look.style]
check = "text"        # keep true / false as text
links = "plain"       # links without the accent color

[look.columns]
memo = "plain"        # this column as text
owner = "chip"        # chips even if not detected (the setting for a column wins)

When a column is too narrow for all its chips, the chips that fit are shown whole and the rest are counted as +N.

Frames and selection

  • [look] mode = "classic" brings back the earlier look: reverse video for the selection, no accent colors. The text on screen is the same in both modes.
  • [look.style] frames picks window frames: "rounded", "square", "heavy", "ascii" or "none" (always ASCII with [terminal] ambiguous_wide = true, so columns stay aligned).

What is shown around the table

ItemWhat it changes
[display] tabs = "auto"Hide the row of view tabs while there is only one view (a folder with no saved views). The row comes back when you save a view.
[display] tabs = "never"Hide the view tabs always; [ and ] still switch views.
[display] search_bar = falseHide the search bar above the table; \ still filters, typing on the bottom line.
[display] chips = falseHide the band of active view settings.
[display] row_numbers = trueNumber the rows 1, 2, 3… in the order shown.
[display] zebra = trueShade every other row (only with colors).
[display] column_lines = trueDraw │ between columns.
[display] group_gap = trueLeave an empty line above every group heading but the first.
[display] row_extra_lines = 2Wrap long values and values with line breaks at the column width, growing a row up to 3 lines (only as tall as needed; what does not fit ends with …). 0 keeps one line.

Each view can override the [display] items in its view settings (o, the “Display” section), and a saved mdgrid view keeps them.

A look per workspace, table or view

Everything on this page ([look], [display], and also [dates], [edit] and [new_note]) can be written per workspace, per table and per view, and the narrowest place wins. Write it by hand in the workspace marker .mdgrid/workspace.toml (shared with the notes, for example in git), or pick it on the screen:

# notes/.mdgrid/workspace.toml
name = "notes"

[look]
theme = "nord"            # every table of this workspace

[[table]]
path = "tasks"

[table.look]
theme = "dracula"         # only the tasks table

On the screen, open the view settings (o) and go to the “Look” section. “Save to” chooses where the theme and parts are kept: global (ui.toml), this workspace (workspaces.toml), this table (views.toml) or this view. Next to the theme and parts, (this table) and the like show where the current value comes from; a value from the marker shows (marker). “Remove the override of this place” goes back to the wider place. mdgrid never writes config.toml or the workspace marker; for a marker workspace, write the look into the marker by hand.

The [look] in a marker is the look the ledger’s author suggests. If a ledger you share says dozy-pink, the theme, parts and colors the people who open it chose in their own config.toml or on screen still win, whatever place they saved them to. When places are layered, a marker’s [look] counts as wider than global (just above the defaults). The other sections of a marker, such as [display], stay at the workspace level as before.

A preset in a narrower place drops the part shapes of wider places, and a theme drops their role colors, so a table that picks its own set gets that whole set. mdgrid <table> --print-config --resolved shows what applies to a table and where each value comes from.

Templates ([templates.<name>]) keep a look under a name; use = "<name>" in any place starts from it. The “Look” section can save the current theme and parts as a template.

Terminals and fonts

  • If characters such as ○, ※ or the box lines look twice as wide as they should and columns drift, set [terminal] ambiguous_wide = true. The frames then use ASCII so that everything lines up.
  • Without true color (COLORTERM is not truecolor or 24bit), mdgrid uses the nearest of the 256 colors.
  • The checkbox and type marks (☑ ☐ ◉ ◷ ⋮) are ordinary text characters; if your font draws them badly, use [look.style] check = "text" and icons = false.

Recipes

Quiet and minimal:

[look]
cells = "plain"

[display]
tabs = "auto"
search_bar = false
chips = false

A dense table with guides:

[display]
row_numbers = true
zebra = true
column_lines = true

The earlier look:

[look]
mode = "classic"
cells = "plain"

[look.style]
frames = "ascii"

Themes

日本語 · Contents

You can pick one of twelve color themes for the screen (or auto, which follows the terminal background). Starting from a theme, you can also choose the accent and other colors yourself (Custom). Only the colors change; text and marks (* for a pending change, > for the selected row, and so on) stay the same.

How to choose

The quickest way is on screen. Press o to open the view settings, 8 to go to the Look section, and Enter on the Theme row to get the list. Pick one and press Apply: the screen changes right away.

“Save to” at the top of the section decides where the choice is kept. With the default, global, every table opens in that theme (it goes to ui.toml). Choose this workspace, this table or this view to change only that place. The note next to the theme, such as “(global)” or “(marker)”, tells where the current colors come from.

A theme written in a ledger’s marker (.mdgrid/workspace.toml) does not override yours. The marker’s theme is what the ledger’s author suggests, and you get it only until you pick something yourself.

Writing it in the config file (~/.config/mdgrid/config.toml) works the same way:

[look]
theme = "nord"

The rules for each place are in A look per workspace, table or view.

To try one before changing your config, pass a sample config with --config (from the repository root):

mdgrid --config examples/themes/nord.toml /tmp/mdgrid-sample/Tasks.base
NameLook
default (default)The current look: terminal colors, reverse video for the selection and bands
nordCalm blues
solarized-lightA light background
draculaPurple and pink accents
gruvboxWarm browns and orange
pink-monsterNeon pink and lime on dark magenta
dozy-pinkSoft pink and cream
sumiDark ink, soft grays and a teal accent
slateSlate with a violet accent
saasLight gray with an indigo accent
saas-darkThe dark version of saas
paperA light background with a blue accent
autosaas on a light terminal background, sumi on a dark one. Pick your own pair with theme = { light = "paper", dark = "saas-dark" }

Choose your own colors (Custom)

The last entry in the theme list, Custom, keeps the current theme as a base and lets you change its sixteen role colors one by one: background, text, accent, selected row and so on. Use it to keep a theme you like and give it your own accent.

Press Enter on a role row to see sample colors (fourteen, such as orange and teal). For any other color, pick “#rrggbb (type a color)” at the end of the list and type something like #e0a458. “Theme’s color” puts the role back to the base theme’s color.

Apply keeps the base theme and only the colors you changed. Saved globally, ui.toml looks like this:

[look]
theme = "sumi"

[look.colors]
accent = "#ea8c34"

A look with changed colors shows as “Custom (from sumi)” in the Theme row. Picking a named theme again drops the changed colors. Save as a template to keep the colors too.

default — The default look

The current look: terminal colors, reverse video for the selection and bands. This is also what you get with no setting.

nord — Nord

Calm blues. Config: theme = "nord".

solarized-light — Solarized Light

A light background. Config: theme = "solarized-light".

dracula — Dracula

Purple and pink accents. Config: theme = "dracula".

gruvbox — Gruvbox

Warm browns and orange. Config: theme = "gruvbox".

pink-monster — Pink Monster

Neon pink and lime on dark magenta. Config: theme = "pink-monster".

dozy-pink — Dozy Pink

Soft pink and cream. Config: theme = "dozy-pink".

sumi — Sumi

Dark ink, soft grays and a teal accent. Setting: theme = "sumi".

slate — Slate

Slate with a violet accent. Setting: theme = "slate".

saas — SaaS

Light gray with an indigo accent. Setting: theme = "saas".

saas-dark — SaaS Dark

The dark version of saas. Setting: theme = "saas-dark".

paper — Paper

A light background with a blue accent. Setting: theme = "paper".

Notes

  • With NO_COLOR, --no-color, color = false or TERM=dumb, no colors are used even if a theme is set.
  • On terminals without true color (COLORTERM is not truecolor), the nearest 256 colors are used.
  • An unknown name gives a warning at startup and opens with default.
  • The bottom-right cell is never painted, to avoid the terminal’s automatic wrap. On light themes the terminal’s own background shows there.
  • Zebra stripes ([display] zebra = true) use the theme’s colors too; the samples other than default are taken with them on.
  • Every setting is listed in Configuration.

When something looks wrong

日本語 · Contents

Answers to the questions people run into most. Press ? in mdgrid for every key and the meaning of every mark.

What do the marks in cells mean?

MarkMeaning
(blank)The note has no such key
""An empty string
∅null: the key is there, with no value
! before a valueThe value does not fit the column’s type (shown as it is, never changed)
* before a valueChanged, not saved yet
# before a valueRead-only; select the cell to see why
? (dim)A .base formula mdgrid cannot evaluate
…⏎The value has line breaks; only the first line is shown (with [display] row_extra_lines, rows grow and show the lines)

On the left of a row: > is the row you are on, + a marked row (Space, v), ! a note changed outside mdgrid (or a sync conflict file), and ~ a row you edited that stays in place until you save or move.

I cannot edit a cell or a row

Select the cell: the reason appears on the bottom line. The usual ones:

  • The whole row is read-only: the note has no frontmatter (or an empty one, unless [edit] add_frontmatter is on), a byte order mark, mixed line endings, invalid YAML, a key written twice, and so on. mdgrid refuses rather than guessing. The full list with examples is in Write-back safety.
  • One cell is read-only: nested maps, block scalars (|, >), anchors and tags, file.* and formula.* columns, and lists mdgrid cannot rewrite without changing their layout. See Read-only values.
  • Everything is read-only: mdgrid was started with --readonly or --pick.

e opens the note in your editor (editor in the config, else $VISUAL, $EDITOR, vi); mdgrid reads it again when the editor exits.

My change did not reach the file

Edits stay pending (marked *) until you save. Press Ctrl+S, check the diff, and press Enter. If you quit with pending changes, mdgrid asks whether to save or discard them. If the note changed outside mdgrid in the meantime, the save review says so for that file and does not overwrite it unless you choose to (o).

The note it points at was not found. mdgrid looks for the target by name in the tables of the current workspace (or the registered tables, when there is no workspace), and by path for Markdown links and plain paths. Check the spelling, or add the target’s folder to the workspace: open it and choose add this table to a workspace in the palette (:), or run mdgrid <folder> --add-to <workspace>.

The relation map shows the wrong tables, or none

The map shows the tables of the current workspace; when one is in use, the breadcrumb in the header shows <workspace> › <table>. mdgrid picks it in this order: -w <name>, a .mdgrid/workspace.toml marker in the folder or above it, workspaces.toml, the detected root folder (a folder with .obsidian/, or a git repository with [workspace] detect = [".obsidian", ".git"]), and finally the registered tables. If the map is empty, register the tables or put them in a workspace. See Workspaces.

Automatic tables (from a marker without [[table]], or from detection) are the folders of notes right under the root; .base files are not added automatically, and folders such as node_modules and target are skipped. List a .base explicitly with [[table]] to include it.

A .base column shows ?

The column is a formula, filter or summary that mdgrid cannot evaluate yet. Select the cell to see which part; Obsidian Bases support lists what mdgrid reads. The rest of the view still works.

Columns do not line up, or characters look too wide

Some characters (○, ※, box-drawing lines) are “ambiguous width”: some terminals draw them one column wide, others two. If yours draws them wide, set [terminal] ambiguous_wide = true; the frames switch to ASCII so that everything lines up. If the checkbox or type marks (☑ ◷ ◉ ⋮) look odd in your font, set [look.style] check = "text" and icons = false.

The colors are wrong, or there are none

  • No colors at all: NO_COLOR is set, TERM=dumb, --no-color was given, or color = false is in the config.
  • Colors look off: your terminal may not support true color; mdgrid then uses the nearest of the 256 colors. Set COLORTERM=truecolor if your terminal does support it.
  • You prefer the earlier look: look = "classic" (and cells = "plain"). See Make it look the way you like.

Clicking a long URL opens only part of it

Click the URL cell to select it, then click it again, or press O. mdgrid hands the whole URL to your browser and shows it in the message line at the bottom first. The rows on the right of the tree screen (key o) and the detail view (K) work the same way.

The table cuts a long URL to the column width with … and marks the cut text with the whole URL as its target (an OSC 8 hyperlink). Most terminals open that target when you click with Cmd or Ctrl held down. Inside a tool that bundles terminals (Herdr, for example), the target may not reach the outer terminal; that terminal then picks the URL from the visible text alone and opens the cut-off part. A Cmd-click goes to the outer terminal, so mdgrid never sees it.

A URL that points to an executable file, or that contains characters which change the text direction, is never opened, whichever way you try; mdgrid shows the reason instead.

A folder opens slowly

The first screen appears at once, and the rest loads in the background with progress in the header; Ctrl+G stops loading and keeps what was read. Tens of thousands of notes take a couple of seconds. Opening the relation map reads every note of every table in the workspace, which takes about a second for twenty thousand notes.

mdgrid workspace opens a folder named “workspace”

That is intended: workspace operations are options (--workspaces, --add-to, --remove-from, --remove-workspace, --init-workspace, -w), so a folder named workspace opens like any other folder.

Opening notes inside a container

Run mdgrid inside the container. The Linux archives named -musl on the Releases page are static binaries, so one file is enough even in a small container such as Alpine.

docker cp mdgrid <container>:/usr/local/bin/mdgrid
docker exec -it <container> mdgrid /notes

With -it the table shows in your own terminal. If the notes folder is mounted from your machine, open it with mdgrid on your machine as usual.

How do I start over?

  • One table’s look (widths, hidden columns, view): in View settings (o) choose Reset, or delete the table’s state in ~/.local/state/mdgrid/.
  • Settings: move ~/.config/mdgrid/config.toml away; mdgrid --print-config prints a fresh one with every default.
  • Registered tables and workspaces: edit or delete places.toml and workspaces.toml in ~/.config/mdgrid/.

Your notes are never touched by any of these.

Key bindings

日本語

This page lists mdgrid’s default key bindings for each mode, along with the action names you use to rebind keys in the config file. Inside mdgrid, ? shows the same list as a help screen, with the keys you can press right now at the top.

Rebinding keys

To rebind keys, add a [keys.<mode>] table to the config file and write "key" = "action name" under it (see keys in the config reference). The mode is one of the section headings below, such as table or edit. The action name comes from the Action column, or from the list at the end of this page.

[keys.table]
"ctrl+f" = "search"   # Ctrl+F also starts a search
"a" = "none"          # "none" removes a key
"ctrl+n" = "new_note" # so "new note" moves from a to Ctrl+N
  • Keys look like "j", "G", "ctrl+s", "shift+tab", "pagedown". Modifier and key names are case-insensitive. To bind a shifted letter, write the capital letter ("G"). A space separates a key sequence, such as "g g". The key names in the tables below also work as written. For the \ key, write "\\" in a TOML basic string, or '\' as a literal string.
  • Binding a key that already has an action replaces that action. The action name "none" removes a key, so you can free a key and then reuse it for something else.
  • You can bind an action only in a mode where it has a default key. One key can’t do two things in the same mode, and a single key can’t also be the first key of a sequence (g alongside g g). Remove the conflicting key with "none" first.
  • Each mode always keeps a way out (for example, quit or palette in table, cancel in edit). If your config would remove every key for it, mdgrid keeps the default keys and shows a warning.
  • Unknown modes, keys, and actions are skipped with a warning.
  • Modes where you type text (edit, palette, search, filter, settings_input, list_select, filter_input) don’t bind single letters by default and don’t accept key sequences.
  • vim mode (vim = true under [keys], see keys.vim) adds the keys in the “vim mode” part of table and the input_normal mode. You rebind or remove them like any other key; without vim mode they are not there.

In the table mode, full-width letters and symbols typed while a Japanese input method is on act like their half-width keys, and 、 and ・ act like , and /.

table

The main grid of notes.

When you start mdgrid with --pick, Enter on a note row prints the marked rows (or the selected row) and quits, q cancels, and Esc clears the selection, filters, the conditions turned on with digit keys or the notice band, and search as usual, cancelling only when there is nothing left to clear. Enter on a group heading row still expands or collapses it, and e does not open the editor.

KeyActionDescription
kupMove up one row
UpupMove up one row
jdownMove down one row
DowndownMove down one row
hleftMove to the column on the left
LeftleftMove to the column on the left
lrightMove to the column on the right
RightrightMove to the column on the right
Homefirst_columnMove to the first column
0first_columnMove to the first column
Endlast_columnMove to the last column
$last_columnMove to the last column
PageUppage_upScroll up one screen
PageDownpage_downScroll down one screen
Ctrl+uhalf_page_upScroll up half a screen
Ctrl+dhalf_page_downScroll down half a screen
g gtopGo to the first row
GbottomGo to the last row
Tabnext_cellMove to the next cell on the right
Shift+Tabprev_cellMove to the previous cell on the left
EntereditEdit the selected cell. On a group heading row, expand or collapse the group; on a checkbox cell, toggle it
BackspaceclearEmpty the selected cell (a pending change, saved with Ctrl+S)
DeleteclearEmpty the selected cell (a pending change, saved with Ctrl+S)
uundoUndo the last change
Ctrl+zundoUndo the last change
Ctrl+rredoRedo the change you undid
UredoRedo the change you undid
Ctrl+Shift+zredoRedo the change you undid
anew_noteCreate a new note (same as + New at the right end of the view bar)
cnew_child_noteCreate a new note linked to the selected row: a child in a table shown as a tree (the parent field is filled in), or a note in another table of the workspace whose column points to this table (mdgrid moves to that table, fills the column with the selected row, and comes back after you create or cancel). Asks which when there are two or more
Ctrl+ssaveReview the pending changes as a diff, then save them
qquitQuit (asks first if there are unsaved changes)
Ctrl+gcancel_loadStop loading notes
?helpShow the help with every key
:paletteOpen the command palette (also takes a row number like :120, w to save, q to quit, wq or x to save and quit)
Ctrl+ppaletteOpen the command palette
xaction_menuOpen the menu of actions you can use on the selected cell, each with its current key (right-clicking a cell also opens it)
eopen_editorOpen the selected note in your editor, and reload it when you return
ycopyCopy the value of the selected cell (with rows selected: the current column’s values of those rows, one per line) to the clipboard
Ctrl+ccopyCopy the value of the selected cell (with rows selected: the current column’s values of those rows, one per line) to the clipboard
Ycopy_rowCopy the whole row (or the selected rows) to the clipboard as tab-separated text with a header
Oopen_urlOpen the http:// or https:// URL of the selected row in the default browser (the same as o in the tree; the URL is shown in the message line first; when the selected cell is a URL, that URL; clicking the selected URL cell again also opens it)
[prev_viewSwitch to the previous view
]next_viewSwitch to the next view
<narrow_columnMake the column narrower
>widen_columnMake the column wider
ssort_columnSort by this column: ascending, descending, then off. The sort is kept for the view (the .base file is not changed)
Ssort_menuOpen the sort window (same as the Sort button in the view bar)
|filter_menuOpen the filter window (same as the Filter button in the view bar)
wworkspace_drawerOpen the table list (same as clicking the table name in the header breadcrumb)
Wworkspace_switchOpen the list of favorite workspaces to switch to (same as clicking the scope name in the header breadcrumb; see switch)
-hide_columnHide the column
+show_columnBring back the last hidden column
Rrelation_mapOpen the relation map of the registered tables
Ttree_viewOpen the tree view (when the table has a tree setting in the workspace marker)
Cgantt_viewOpen the gantt screen (when the workspace marker has a gantt setting, or the date columns can be inferred)
Bkanban_viewOpen the kanban screen (when the workspace marker has a kanban setting, or a status column can be inferred)
Pchart_viewOpen the chart screen (on a table with columns)
Ztoggle_treeFold or unfold the child rows (when the view arranges rows by parent)
Aadd_columnAdd a column for a key no note has yet (type its name); saving writes the key only to the notes you fill in
Hmove_column_leftMove the column to the left
Lmove_column_rightMove the column to the right
Ffreeze_columnsFreeze the columns up to this one so they stay visible when scrolling (press again to unfreeze)
/searchFind text (highlights the matches; the rows stay)
nsearch_nextGo to the next match
Nsearch_prevGo to the previous match
\quick_filterSearch: show only the rows containing some text (the search bar above the table)
*highlight_sameHighlight the rows with the same value as the selected cell
,filter_sameShow only the rows with the same value as the selected cell
!next_problemJump to the next problem: a value that does not fit the column type or a rule ([rules]); the reason shows below
@prev_problemJump to the previous problem
%frequencyShow how many rows have each value of the selected column, and pick one to show only those rows
1condition_1Show only the rows that match the named condition given digit 1 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
2condition_2Show only the rows that match the named condition given digit 2 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
3condition_3Show only the rows that match the named condition given digit 3 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
4condition_4Show only the rows that match the named condition given digit 4 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
5condition_5Show only the rows that match the named condition given digit 5 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
6condition_6Show only the rows that match the named condition given digit 6 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
7condition_7Show only the rows that match the named condition given digit 7 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
8condition_8Show only the rows that match the named condition given digit 8 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
mnoticeGo to the notice box above the header ([[notices]]); does nothing when there is no box
9condition_9Show only the rows that match the named condition given digit 9 ([conditions]; digits go to the conditions with a key, the ledger marker's first, and only to those the current table can use), or undo it; for a condition with hide = true, show or hide again the rows it hides. Does nothing if no condition has this digit
Spacemark_rowMark or unmark the row, then move down
vselect_rangeStart selecting a range of rows; press again to mark the range
Shift+Upextend_upExtend the selection up
Shift+Downextend_downExtend the selection down
Ctrl+aselect_allSelect all rows
Escclear_selectionClear the selection; if nothing is selected, clear the filter, then every condition turned on with a digit key or from the notice band (conditions with hide stay), then the search highlight
KdetailShow every property of the selected note, and the first lines of its body
oview_settingsOpen the view settings (filters, sort, grouping, columns)
ffocus_chipsMove to the settings bar above the table
Ctrl+w jstack_downWith stacked tables, move to the table below (nothing happens at the bottom)
Ctrl+w kstack_upWith stacked tables, move to the table above (nothing happens at the top)
Ctrl+w cstack_closeTake the selected table out of the stack. If it alone has pending changes, ask whether to save or discard them
Ctrl+w +stack_growWith stacked tables, make the selected table one row taller (the others keep their title and 3 rows)
Ctrl+w -stack_shrinkWith stacked tables, make the selected table one row shorter

vim mode

With vim = true under [keys], the table also has these keys. Digits are never counts: 5j moves one row down.

KeyActionDescription
d ddelete_noteMove the notes of the marked rows (or the selected row) to the trash after confirming their names; while you select a range with v, d alone does it. u brings them back
ppastePut the value you last copied in mdgrid as a pending change: a cell copied with y goes into the selected cell, a row copied with Y into the columns of the same name in the marked rows (or the selected row)
.repeatPut the value you last set in a single cell into the same column of the selected row

edit

Editing a cell in the input box. Letter keys type text, so they have no actions.

KeyActionDescription
EntercommitConfirm the value
EsccancelCancel the edit
Tabcommit_nextConfirm and move to the cell on the right
Shift+Tabcommit_prevConfirm and move to the cell on the left
Ctrl+rrevertPut back the value from before the edit
Ctrl+uclear_inputClear the whole input
Uplist_upPrevious candidate; in the date calendar, previous week
Downlist_downNext candidate; in the date calendar, next week
Ctrl+plist_upPrevious candidate; in the date calendar, previous week
Ctrl+nlist_downNext candidate; in the date calendar, next week
Leftcursor_leftMove the cursor left; in the date calendar, previous day
Rightcursor_rightMove the cursor right; in the date calendar, next day
PageUppage_upIn the date calendar, previous month
PageDownpage_downIn the date calendar, next month
Shift+Leftprev_monthIn the date calendar, previous month; otherwise the same as Left
Shift+Rightnext_monthIn the date calendar, next month; otherwise the same as Right
Shift+Upprev_yearIn the date calendar, previous year; otherwise the same as Up
Shift+Downnext_yearIn the date calendar, next year; otherwise the same as Down
Ctrl+ttodayIn a date cell, set today’s date
Ctrl+screate_noteIn the new note form, create the note now from any field
Ctrl+ecreate_note_editIn the new note form, create the note and open it in the editor
Ctrl+otime_focusIn a datetime calendar, switch between the day and the time field (on the time field, Up/Down move 15 minutes and Shift+Up/Down one hour)
Ctrl+dclearIn a date cell, empty the value and confirm
Homecursor_homeMove the cursor to the start
Endcursor_endMove the cursor to the end
Backspacedelete_backDelete the character before the cursor
Deletedelete_forwardDelete the character after the cursor

palette

The command palette (: or Ctrl+P). Type to search commands by name.

KeyActionDescription
EnterrunRun the selected command
EsccloseClose the palette
DowndownNext candidate
Ctrl+ndownNext candidate
UpupPrevious candidate
Ctrl+pupPrevious candidate
Backspacedelete_backDelete the character before the cursor

review

The save review, which shows the pending changes as a diff before writing.

KeyActionDescription
Entersave_allSave all the changes
EscbackGo back to the table without saving
qbackGo back to the table without saving
jnext_fileNext file
Downnext_fileNext file
kprev_filePrevious file
Upprev_filePrevious file
ooverwriteWrite this file even though it was changed outside mdgrid
ddiscard_rowDiscard the pending changes to this file
?helpShow the help

detail

The detail view, which lists every property of one note and, under a Body heading, the first 20 lines of its body (read-only; no heading when the note has no body). Clicking a property’s line selects that property.

KeyActionDescription
EntereditEdit the selected property
EsccloseClose the detail view
KcloseClose the detail view
Oopen_urlOpen the http:// or https:// URL of the selected property, or else the URL of the row, in the default browser (the same safeguards as O in the table; clicking the selected URL value again also opens it)
jdownMove down
DowndownMove down
kupMove up
UpupMove up
PageDownpage_downScroll down one screen
PageUppage_upScroll up one screen
g gtopGo to the top
GbottomGo to the bottom
?helpShow the help

quit

The prompt shown when you quit with unsaved changes.

KeyActionDescription
squit_saveReview and save the changes, then quit
dquit_discardDiscard the changes and quit
EscbackGo back to the table
?helpShow the help

help

The help screen (?). Select a line of the first section, the keys you can press now, with ↑↓ or a click and press Enter: the help closes and that action runs, the same as pressing its key on the screen you came from. Clicking the selected line again does the same. A line that groups digit keys (1-9) runs the first key (1). Lines further down (every key, the meaning of the marks) can be selected, but Enter does nothing there. The mouse wheel scrolls the help without moving the selection.

KeyActionDescription
EnterrunRun the selected key you can press now and close the help
EsccloseClose the help without doing anything
qcloseClose the help without doing anything
?closeClose the help without doing anything
jdownNext item
DowndownNext item
kupPrevious item
UpupPrevious item
PageDownpage_downDown one screen
PageUppage_upUp one screen
g gtopFirst item
GbottomLast item

Typing a term to find (/). The rows stay; matches are highlighted and n and N move between them.

KeyActionDescription
EntercommitFind the term
EsccancelCancel finding
Backspacedelete_backDelete the character before the cursor

filter

Typing a search term (\, the search bar above the table). Every keystroke shows only the rows containing the term.

KeyActionDescription
EntercommitLeave the bar, keeping the search
EsccancelClear the search
Backspacedelete_backDelete the character before the cursor

settings

The view settings screen (o, or the ⚙ Settings button at the top right), where you change filters, sorting, grouping, and columns. The sections are listed on the left with numbers, and the selected section’s items are on the right. Keys work on one side at a time, the one with the > mark: h moves to the list on the left, l or Enter back to the items.

KeyActionDescription
EnterrunChoose the selected item (in the list on the left: go to the section’s items)
SpacetoggleTurn the selected item on or off
EsccancelGo back, or cancel
Tabnext_sectionMove to the next section
Shift+Tabprev_sectionMove to the previous section
1go_to_section_1Go to section 1 of the list on the left
2go_to_section_2Go to section 2 of the list on the left
3go_to_section_3Go to section 3 of the list on the left
4go_to_section_4Go to section 4 of the list on the left
5go_to_section_5Go to section 5 of the list on the left
6go_to_section_6Go to section 6 of the list on the left
7go_to_section_7Go to section 7 of the list on the left
8go_to_section_8Go to section 8 of the list on the left
9go_to_section_9Go to section 9 of the list on the left
jdownMove down (in the list on the left: the next section)
DowndownMove down (in the list on the left: the next section)
kupMove up (in the list on the left: the previous section)
UpupMove up (in the list on the left: the previous section)
hleftMove to the list of sections on the left (between buttons: move left)
LeftleftMove to the list of sections on the left (between buttons: move left)
lrightFrom the list on the left, go to the section’s items (between buttons: move right)
RightrightFrom the list on the left, go to the section’s items (between buttons: move right)
Kmove_item_upMove the item up
Shift+Upmove_item_upMove the item up
Jmove_item_downMove the item down
Shift+Downmove_item_downMove the item down
dremove_itemRemove the item
Deleteremove_itemRemove the item
Backspaceremove_itemRemove the item
?helpShow the help

settings_input

Typing a value in the view settings (such as the text for “contains” or a value to compare with).

KeyActionDescription
EntercommitConfirm the value
EsccancelGo back
Backspacedelete_backDelete the character before the cursor

chips

The settings bar above the table (f), which shows the view’s filters and sorting as items.

KeyActionDescription
Backspaceremove_itemRemove the selected item from the view
Deleteremove_itemRemove the selected item from the view
hleftSelect the item on the left
LeftleftSelect the item on the left
lrightSelect the item on the right
RightrightSelect the item on the right
Enterview_settingsOpen the view settings
EsccloseGo back to the table
fcloseGo back to the table
?helpShow the help

notice

The notice box above the header (m, or a click on it), with the items written in [[notices]].

KeyActionDescription
hleftSelect the item on the left
LeftleftSelect the item on the left
lrightSelect the item on the right
RightrightSelect the item on the right
kupSelect the item on the left
UpupSelect the item on the left
jdownSelect the item on the right
DowndownSelect the item on the right
EnterrunGo to the item: narrow the table by the condition, list the tables with matching rows, or open the note in the editor
EsccloseGo back to the table
mcloseGo back to the table
?helpShow the help

list_select

Picking values for a list property. Enter checks or unchecks the highlighted value and leaves the window open, so you can check several in a row. When you are done, press Tab, or Enter on the [ OK ] line at the bottom. Letter keys type into the search box. The window’s main keys are also shown on its bottom edge, and you can click them.

KeyActionDescription
TabcommitConfirm the checks and close, from any line
EnterrunCheck or uncheck the highlighted value (the window stays open); on [ OK ], confirm. While searching, add the highlighted candidate and clear the search
SpacetoggleCheck or uncheck the highlighted value; while searching, type a space
EsccancelClose without changing anything
Ctrl+rrevertPut back the selection from when the list was opened
Ctrl+screate_noteIn the new note form, create the note now from any field
Ctrl+ecreate_note_editIn the new note form, create the note and open it in the editor
Shift+Tabcommit_prevIn the new note form, go back to the previous field
Uplist_upPrevious candidate
Downlist_downNext candidate
Ctrl+plist_upPrevious candidate
Ctrl+nlist_downNext candidate
PageUppage_upScroll up one screen
PageDownpage_downScroll down one screen
Backspacedelete_backDelete the character before the cursor

Clicking a value checks or unchecks it, and clicking [ OK ] confirms. A list field in the new note form uses the same keys: Enter checks a value, and Tab or [ OK ] confirms the field and moves on (on the last field, it creates the note). There, Esc closes only this window and keeps the form. After that, Enter opens it again, Tab moves to the next field, and a second Esc closes the form.

The menu of actions for the selected cell (x or a right-click on a cell). It groups the actions into Cell, Column, Row, and View and file, and shows each action’s current key. Actions you can’t use there (such as editing a read-only cell) are left out. Pressing a key shown next to an item runs that action, just like pressing it in the table mode.

KeyActionDescription
EnterrunRun the selected action and close the menu
EsccloseClose the menu without doing anything
jdownNext item
DowndownNext item
kupPrevious item
UpupPrevious item
g gtopGo to the first item
GbottomGo to the last item

Clicking an item runs it; clicking outside the menu just closes it. If the terminal is too small to show the menu, it doesn’t open and a message explains why. After a key-sequence prefix such as g, Esc only cancels the prefix.

freq

The value counts of the selected column (%). Each value is listed with its number of rows and its share of all the rows shown now, most common first (values with the same count in value order). A list property is counted per item, so the shares can add up to more than 100%, and rows without a value are counted as (empty). Only the rows left after the current filters are counted, including a same-value filter from , or from an earlier value count: Enter adds to that filter instead of replacing it, so the count next to a value is exactly the number of rows you get. It doesn’t open while notes are still loading, and it closes if the table is rebuilt (for example, when a note changes outside mdgrid).

KeyActionDescription
EnterrunShow only the rows with the selected value (like ,) and close
EsccloseClose without doing anything
jdownNext value
DowndownNext value
kupPrevious value
UpupPrevious value
g gtopGo to the first value
GbottomGo to the last value

Clicking a value shows only its rows; clicking outside just closes the window. If the terminal is too small to show it, it doesn’t open and a message explains why. Esc in the table mode clears the filter again.

sorts

The sort window (S, or the Sort button in the view bar; it opens right below the button). It lists the sort rules of the current view (column and direction) and a last line to add one. Every change applies to the table right away and is kept for the view, like a sort from a column heading.

KeyActionDescription
EnterrunFlip the direction of the selected rule, or add a rule (then pick a column)
EsccloseClose the window (while picking a column, go back to the rules)
qcloseClose the window
jdownNext line
DowndownNext line
kupPrevious line
UpupPrevious line
dremove_itemRemove the selected rule
Deleteremove_itemRemove the selected rule
Backspaceremove_itemRemove the selected rule
Kmove_item_upMove the rule up (it sorts first)
Shift+Upmove_item_upMove the rule up
Jmove_item_downMove the rule down
Shift+Downmove_item_downMove the rule down

Clicking a line does what Enter does, and clicking the × at the right end of a rule removes it; clicking outside closes the window.

drawer

The table list (w, :workspace_drawer, or the table name in the header breadcrumb). It switches within the workspace: it slides over the table from the left and lists only the pages and tables of the current scope (the workspace, or the registered tables when there is none), marking the current table with ●. Other workspaces, Where you started and favorites are not listed here; use the switch list (switch) for them. Selecting a table switches to it (with unsaved changes, you are asked to save or discard first). While a page is open, only the page name has the ●, and selecting a table closes the page and opens that table on its own. It is hidden until opened.

KeyActionDescription
EnterrunSwitch to the selected table or page
EsccloseClose the list
qcloseClose the list
wcloseClose the list
jdownNext line
DowndownNext line
kupPrevious line
UpupPrevious line
g gtopFirst line
GbottomLast line

Clicking a line does what Enter does; clicking outside the list (including the table name in the header breadcrumb) closes it. Clicking the scope name in the header breadcrumb closes it and opens the switch list.

filter_window

The filter window (|, or the Filter button in the view bar; it opens right below the button). It lists the filter conditions of the current view as a table, one condition per line (column, comparison, value, ×), and a last line to add one. On a condition line, ←→ picks a field and Enter edits that field in place. To add, pick a column, then a kind (pick from the values, contains, does not contain, compare, is empty, is not empty), then the value. Every change applies to the table right away and is kept for the view (the same filters as in the view settings).

KeyActionDescription
EnterrunEdit the condition, or add one (pick a column, then a kind); inside a step, go on with the selected item. In the value list, check or uncheck the value (on [ OK ] at the bottom, confirm)
EsccloseClose the window (while adding, go back to the conditions)
qcloseClose the window
jdownNext line
DowndownNext line
kupPrevious line
UpupPrevious line
SpacetoggleCheck or uncheck a value in the value list (on the first line, switch keep / hide)
TabcommitIn the value list, confirm the checks, from any line
dremove_itemRemove the selected condition
Deleteremove_itemRemove the selected condition
Backspaceremove_itemRemove the selected condition
hleftPrevious field of the condition (column / comparison / value)
LeftleftPrevious field of the condition
lrightNext field of the condition
RightrightNext field of the condition

Clicking a line does what Enter does (in the value list, it checks the value, and [ OK ] confirms); clicking the × at the right of a condition removes it. The keys of the current step are on the bottom edge of the window and can be clicked. Clicking outside closes the window.

filter_input

Typing the value for contains, does not contain, or compare in the filter window.

KeyActionDescription
EntercommitAdd the condition with this value (if the value doesn’t fit the column type, say why)
EsccancelGo back to the conditions without adding
Backspacedelete_backDelete the character before the cursor

relations

The relation map (R, :relation_map, or Relation map in the screen type menu at the top right, which lists it once you have registered tables). It shows the registered tables (and the current one) as boxes with their row counts and columns, and draws an arrow from each column that links to another table: N on the linking side, 1 (many-to-one) or N (many-to-many, a list of links) on the target side. The panes follow the terminal size: 120 columns or more show the tables, the map and the details side by side; 80 or more show the map and the details; narrower terminals show the tables and links as a list. With 30 rows or more, the linked records of the selected link appear below.

The mouse works too: click a table (in the list or its box on the map) to select it, and click the selected table again to open it. Click a line, an arrow or a label (or a link in the narrow list) to select that link. Click a linked record to open its note. The wheel moves between tables.

KeyActionDescription
EnterrunOpen the selected table
EsccloseBack to the table
Rrelation_mapBack to the table
qcloseBack to the table
jdownNext table
DowndownNext table
kupPrevious table
UpupPrevious table
lrightNext link of the selected table
RightrightNext link of the selected table
hleftPrevious link of the selected table
LeftleftPrevious link of the selected table
anew_noteOpen the selected table and start a new note (same as + New at the right end of the second line)
Wworkspace_switchOpen the list of favorite workspaces to switch to (see switch)
:paletteThe command palette (closing it returns to the relation map)
?helpShow help

Choosing Table in the screen type menu at the top right (◇ Relation map ▾) goes back to the table. The ⚙ Settings button at the top right goes back to the table and opens the view settings.

screen_menu

The screen type menu (the ▦ Table ▾ button at the top right; on the relation map it reads ◇ Relation map ▾). It opens right below the button and lists the screen types: Table, Relation map when there are linked tables, Tree when the workspace marker gives the table a tree setting, Gantt and Kanban when their columns are set in the marker or can be inferred, and Chart when the table has columns. The current type is marked with ●, and a type that has a key shows it at the right (R for the relation map, T for the tree, C for the gantt, B for the kanban, P for the chart). Selecting a type switches to it. R, T, C, B and P switch without opening the menu.

KeyActionDescription
EnterrunSwitch to the selected screen
EsccloseClose the menu
qcloseClose the menu
jdownNext line
DowndownNext line
kupPrevious line
UpupPrevious line

Clicking a line does what Enter does; clicking outside the menu (including the button) closes it.

column_type

The column type menu (CE-35): click the type mark of a column heading, or run column_type from the palette or the action menu. It opens right below the column heading and lists Auto (with the type guessed from the values) and the types Text, Number, Checkbox, Date, Date and time and List; the current one is marked with ●. The chosen type is written to the table in views.toml ([types]) and applies at once; notes are not changed. Not for file.* and formula.* columns.

KeyActionDescription
EnterrunUse the selected type
EsccloseClose the menu
qcloseClose the menu
jdownNext line
DowndownNext line
kupPrevious line
UpupPrevious line

Clicking a line does what Enter does; clicking outside the menu closes it.

tree

The tree view (T, :tree_view, or Tree in the screen type menu at the top right). It is offered only for a table whose [[table]] in the workspace marker has tree = { path = "<column>" } (see Configuration). The value of that column (such as bar > dev > Web) is split at the separator; the folders are on the left and the rows directly in the selected folder on the right. Each folder shows how many rows are under it (including its subfolders). Rows with an empty value go to (none). The rows on the right are sorted by the order column (smallest first; values that are not numbers and empty values last; equal values by note name) and show the columns of the current view. The tree is built from the rows that pass the current view. The panes follow the terminal width: side by side when wide, one at a time when narrow (switch with the tabs on top or Tab).

The mouse works too: click a folder to select it, click its ▾ or ▸ mark to close or open it, click a row on the right to select it, and click the selected row again to go to that row in the table. The wheel moves the selection up and down.

KeyActionDescription
EnterrunOpen or close the folder / show the row in the table
EsccloseBack to the table
Ttree_viewBack to the table
qcloseBack to the table
jdownNext folder or row
DowndownNext folder or row
kupPrevious folder or row
UpupPrevious folder or row
lrightOpen the folder / to the rows
RightrightOpen the folder / to the rows
hleftClose the folder / to the folders
LeftleftClose the folder / to the folders
SpacetoggleOpen or close the folder
Tabnext_sectionSwitch between the folders and the rows
Shift+Tabprev_sectionSwitch between the folders and the rows
oopen_urlOpen the http:// or https:// URL of the selected row in the default browser (the URL is shown in the message line first; other values, URLs that point to an executable file and URLs with characters that change the text direction are never opened, with the reason shown; clicking the URL value of the selected row again also opens it)
xaction_menuActions on the selected row (open the URL, show the row in the table)
Wworkspace_switchOpen the list of favorite workspaces to switch to (see switch)
:paletteCommand palette (closing it returns to the tree)
?helpShow the help

gantt

The gantt screen (C, :gantt_view, or Gantt in the screen type menu at the top right). It is offered on a table whose [[table]] in the workspace marker has gantt = { start = "<column>", end = "<column>" } (days = "<column>" instead of end also works), or, without a setting, on a table whose date columns can be inferred by name (start: start, begin, from, 開始; end: end, due, finish, until, to, 期限, 終了). See Configuration. The rows of the current view are listed with their names on the left and a time axis with bars on the right. The unit is a day, a week or a month; on opening, the finest unit that fits the range of the rows in the width. Today’s column is marked (┊ in the rows, and ▾ in the header, or the header digit shown reversed when today falls on it). In the month unit a month takes three characters, one for each third of the month. With a color theme (not default), the background of the time axis alternates by month (by year in the month unit), and weekends get a slightly stronger tint in the day unit. A row with only one of the two dates shows ◆; a row with neither shows no bar. With parent/child rows in the view settings, the order, indent and folding are the same as in the table, and so are the WBS numbers and progress (█ and ░ in the bar); a parent without dates gets the span of its descendants. The control bar on the bottom edge of the window (◀ ▶, the units, Today, Week, Month, Quarter, All) can be clicked too. H and L move the selected row’s bar by one unit, and < and > shorten or extend its end (the dates are written as pending changes; u undoes, Ctrl+S goes to the save confirmation). To type a date, edit it in the table.

The mouse works too: click a row to select it, click the selected row again to move to that row in the table. The wheel selects up and down; the horizontal wheel or shift+wheel moves the time axis.

KeyActionDescription
EnterrunShow the row in the table
EsccloseBack to the table
Cgantt_viewBack to the table
qcloseBack to the table
jdownNext row
DowndownNext row
kupPrevious row
UpupPrevious row
lrightScroll the time axis later
RightrightScroll the time axis later
hleftScroll the time axis earlier
LeftleftScroll the time axis earlier
+zoom_inFiner unit (month → week → day)
-zoom_outCoarser unit (day → week → month)
ttodayGo to today
Ztoggle_treeFold or unfold the child rows of the selected row
Spacetoggle_treeFold or unfold the child rows of the selected row
Wworkspace_switchOpen the list of favorite workspaces to switch to (see switch)
:paletteThe command palette (closing it returns to the gantt)
?helpShow the help
rgantt_rangeSwitch the period (this week → this month → quarter → all)
Lbar_laterMove the bar one unit later (rewrites the dates)
Hbar_earlierMove the bar one unit earlier (rewrites the dates)
>bar_longerExtend the end of the bar by one unit
<bar_shorterShorten the end of the bar by one unit
uundoUndo
Ctrl+zundoUndo
UredoRedo
Ctrl+rredoRedo
Ctrl+ssaveSave

kanban

The kanban screen (B, :kanban_view, or Kanban in the screen type menu at the top right). It is offered on a table whose [[table]] in the workspace marker has kanban = { column = "<column>" }, or, without a setting, on a table with a column named status, state, stage, 状態, ステータス or 段階 (any case; a list column is never picked). See Configuration. The rows of the current view become cards in lanes, one lane per value of the column. The lanes follow the allowed values of the column ([rules.<column>] values), then any other value in the order the rows show it, and last (none) for rows without a value; a value with no rows still gets an empty lane. Each lane header shows the value and the number of cards, and each card shows the row’s name. When the lanes don’t fit the width, the screen slides to keep the selected lane visible and marks the hidden side with ‹ or ›. The selected card has >, and a card with pending changes has *.

H and L move the selected card to the lane on the left or right: the row’s value in the column becomes that lane’s value, as a pending change like an edit in the table (*, and the unsaved count goes up). Nothing is written until you save; Ctrl+s goes back to the table and opens the review of the pending changes. u undoes a move. Cards are not moved into (none) (clear the value in the table), and nothing moves when mdgrid was opened with --readonly or the cell is read-only; the message line says why.

The mouse works too: click a card to select it, click the selected card again to move to that row in the table, and click a lane header to select the lane. The wheel selects cards up and down; the horizontal wheel or shift+wheel moves between lanes.

KeyActionDescription
EnterrunShow the card’s row in the table
EsccloseBack to the table
Bkanban_viewBack to the table
qcloseBack to the table
jdownNext card
DowndownNext card
kupPrevious card
UpupPrevious card
lrightLane to the right
RightrightLane to the right
hleftLane to the left
LeftleftLane to the left
Lmove_card_rightMove the card to the lane on the right (rewrites the status)
Hmove_card_leftMove the card to the lane on the left (rewrites the status)
uundoUndo the last change
Ctrl+zundoUndo the last change
UredoRedo the change you undid
Ctrl+rredoRedo the change you undid
Ctrl+ssaveBack to the table and review the pending changes before saving
Wworkspace_switchOpen the list of favorite workspaces to switch to (see switch)
:paletteThe command palette (closing it returns to the kanban)
?helpShow the help

chart

The chart screen (P, :chart_view, or Chart in the screen type menu at the top right). It is offered on any table with columns. It counts the rows of the current view by the values of a column, or totals a number column, and shows them as a bar, stacked bar, line, scatter or heatmap chart. With chart = { kind = "bar", x = "status" } (an array for several charts) in the table’s [[table]] of the workspace marker, the chart opens that way (see Configuration). Without a setting it opens as bars, splitting by the first of: a status column (status, state and so on), a column with allowed values ([rules.<column>] values), a checkbox column, a list column, a date column, the first column; the value is the count. (inferred) at the end of the title marks a guessed column.

How rows split depends on the column type. Text and checkbox columns split by value, list columns by element (a row can count in several items), and rows without a value go to (none). Date columns split into days, weeks or months, with empty ranges shown as 0. Number columns split into equal ranges (up to 10), which makes a histogram. Rows whose date or number cannot be read, and rows whose summed value is not a number, are left out, and the line under the title says N left out.

  • Bar: one horizontal bar per item; the largest value fills the bar.
  • Stacked bar: bars split by the values of a breakdown column (the top five and other). % turns each bar into percentages. Fill characters (█ ▓ ▒ ░ ▞) tell the parts apart without color.
  • Line: joins the value of each date or number range. c makes it cumulative. With a breakdown column there is one line per value (up to five), told apart by point characters (* + o x #).
  • Scatter: one point per row, with a number or date column across and another one up. j and k pick a point; Enter goes to its row in the table.
  • Heatmap: the value for each pair of the split column (down) and the breakdown column (across), as a number and a shade ( ░ ▒ ▓ █).

On the screen, Tab changes the kind, x the column to split by, y the value (count or the sum of a number column), a the aggregate, b the breakdown column, and + - the date unit. These changes stay on the screen; the marker is not rewritten. When a kind has no fitting column, it is skipped with a reason on the message line. With several charts in the marker, [ and ] move between them. Enter on a bar, stacked bar or heatmap cell narrows the table to the rows with that value and goes back to it (the same filter as Enter in the % frequency table; date and number ranges do not narrow). Values are not edited here.

The mouse works too: click an item to select it, and click the selected item again for the same as Enter. The wheel moves the selection.

KeyActionDescription
EnterrunNarrow the table to this value (a scatter goes to the point’s row in the table)
EsccloseBack to the table
Pchart_viewBack to the table
qcloseBack to the table
jdownNext item
DowndownNext item
kupPrevious item
UpupPrevious item
lrightItem to the right (a line’s range, a heatmap column)
RightrightItem to the right
hleftItem to the left
LeftleftItem to the left
Tabchart_kind_nextNext kind (bar → stacked → line → scatter → heatmap)
Shift+Tabchart_kind_prevPrevious kind
xchart_xNext column to split by
ychart_yNext value (count → number columns)
achart_aggNext aggregate (sum → average → min → max)
bchart_byNext breakdown column
+chart_finerFiner date unit (month → week → day)
-chart_coarserCoarser date unit (day → week → month)
[chart_prev_savedPrevious chart in the marker
]chart_next_savedNext chart in the marker
cchart_cumulativeToggle cumulative (line)
%chart_percentToggle percentages (stacked bar)
Wworkspace_switchOpen the list of favorite workspaces to switch to (see switch)
:paletteThe command palette (closing it returns to the chart)
?helpShow help

switch

The list for switching workspaces (W on the table, relation map, tree, gantt, kanban and chart screens, or :workspace_switch). It opens over the current screen at the left, below the header, and lists your favorite workspaces with numbers in the order you added them (favorites are kept in favorites at the top of workspaces.toml; see below for adding them). The workspace you are in is marked with ●. When the workspace you are in is not a favorite, the list ends with + Add to favorites; that line or a adds it and keeps the list open. d removes the selected favorite, and K and J move it up or down (its number moves with it). :workspace_favorite in the palette also adds or removes the current workspace. When you have moved away from where you started (a plain folder, a .base, a detected root folder, or a workspace), the list starts with Where you started, numbered 0. Choosing a workspace opens the table and view you last looked at there in this run, or, the first time, the table named in the marker’s open or the first table. Where you started opens the table you started with, in the view you last looked at there. With unsaved changes, you are asked to save or discard first.

KeyActionDescription
EnterrunGo to the selected workspace or to where you started
EsccloseClose the list and stay where you are
qcloseClose the list and stay where you are
jdownNext line
DowndownNext line
kupPrevious line
UpupPrevious line
aworkspace_favoriteAdd the workspace you are in to favorites (if it already is one, only says so)
dremove_itemRemove the selected favorite
Deleteremove_itemRemove the selected favorite
Backspaceremove_itemRemove the selected favorite
Kmove_item_upMove the selected favorite up one place
Shift+Upmove_item_upMove the selected favorite up one place
Jmove_item_downMove the selected favorite down one place
Shift+Downmove_item_downMove the selected favorite down one place
0choose_0Go back to where you started
1choose_1Go to favorite 1
2choose_2Go to favorite 2
3choose_3Go to favorite 3
4choose_4Go to favorite 4
5choose_5Go to favorite 5
6choose_6Go to favorite 6
7choose_7Go to favorite 7
8choose_8Go to favorite 8
9choose_9Go to favorite 9

While the list is open, the bottom band says that the digit keys (0-9) go to the numbered place, and shows a and d (the a and d on the bottom edge of the list can be clicked too). Pressing the number of the place you are in closes the list and tells you that you are already in that workspace. The key that opened the list (W) also closes it. Clicking a line does what Enter does; clicking outside the list closes it (clicking the table name in the header breadcrumb closes it and opens the drawer). Clicking the scope name in the header breadcrumb, or the W ⇄ button at the right of the header (shown when you have favorites or have moved away from where you started; on a narrow terminal it is dropped before the settings button) opens it too.

input_normal

Normal mode of an input box in vim mode (vim = true under [keys]). Every input box (cell, search, palette, settings value, new note name) starts in insert mode, where you type as usual; Esc switches to normal mode, and Esc again cancels. Enter confirms in both modes. The bottom band shows -- INSERT -- or -- NORMAL --, and the cursor turns into a bar or a block. Words break where vim breaks them, also between kanji, hiragana and katakana. Keys not in this table (Enter, Esc, arrows, Ctrl keys) work as in the input box’s own mode; other letters do nothing.

KeyActionDescription
hcursor_leftMove left
lcursor_rightMove right
0cursor_homeMove to the start
$cursor_endMove to the last character
wword_nextMove to the start of the next word
bword_prevMove to the start of the word, or of the previous word
eword_endMove to the end of the word
iinsertInsert before the cursor
aappendInsert after the cursor
Iinsert_startInsert at the start
Aappend_endInsert at the end
xdelete_forwardDelete the character under the cursor
Xdelete_backDelete the character before the cursor
d wdelete_wordDelete to the start of the next word
d bdelete_word_backDelete back to the start of the word
d $delete_to_endDelete to the end
Ddelete_to_endDelete to the end
d dclear_inputDelete the whole text
c wchange_wordDelete to the end of the word and insert
c $change_to_endDelete to the end and insert
Cchange_to_endDelete to the end and insert
c cchange_lineDelete the whole text and insert
uundoUndo the last change in the input box

Actions

Every action name you can write in the keys section of the config file. Each one works only in the modes where it appears in the tables above.

  • up — move up (previous candidate in the palette)
  • down — move down (next candidate in the palette)
  • left — move left
  • right — move right
  • first_column — move to the first column
  • last_column — move to the last column
  • page_up — scroll up one screen (previous month in the date calendar)
  • page_down — scroll down one screen (next month in the date calendar)
  • half_page_up — scroll up half a screen
  • half_page_down — scroll down half a screen
  • top — go to the first row or the top
  • bottom — go to the last row or the bottom
  • next_cell — move to the next cell on the right
  • prev_cell — move to the previous cell on the left
  • edit — edit the selected cell or property
  • clear — empty the selected cell
  • undo — undo the last change
  • redo — redo the change you undid
  • new_note — create a new note
  • new_child_note — create a note linked to the selected row (a child, or a note in another table that points to it)
  • save — review and save the pending changes
  • quit — quit mdgrid
  • cancel_load — stop loading notes
  • help — show the help
  • palette — open the command palette
  • action_menu — open the menu of actions for the selected cell
  • open_editor — open the note in your editor
  • copy — copy the cell’s value (with rows selected, the current column’s values)
  • copy_row — copy the row or the selected rows
  • prev_view — switch to the previous view
  • next_view — switch to the next view
  • narrow_column — make the column narrower
  • widen_column — make the column wider
  • sort_column — sort by the column (kept for the view)
  • hide_column — hide the column
  • show_column — bring back the last hidden column
  • relation_map — switch between the table and the relation map
  • toggle_tree — fold or unfold the child rows of the selected row
  • tree_view — switch between the table and the tree view
  • gantt_view — switch between the table and the gantt screen
  • zoom_in — finer unit of the gantt time axis (month → week → day)
  • zoom_out — coarser unit of the gantt time axis (day → week → month)
  • gantt_range — switch the gantt period (this week → this month → quarter → all)
  • bar_earlier — move the selected gantt bar one unit earlier (rewrites the dates)
  • bar_later — move the selected gantt bar one unit later (rewrites the dates)
  • bar_longer — extend the end of the selected gantt bar by one unit
  • bar_shorter — shorten the end of the selected gantt bar by one unit
  • kanban_view — switch between the table and the kanban screen
  • move_card_left — move the kanban card to the lane on the left (rewrites the status)
  • move_card_right — move the kanban card to the lane on the right (rewrites the status)
  • chart_view — switch between the table and the chart screen
  • chart_kind_next — next chart kind (bar → stacked → line → scatter → heatmap)
  • chart_kind_prev — previous chart kind
  • chart_x — next column to split the chart by
  • chart_y — next chart value (count → number columns)
  • chart_agg — next chart aggregate (sum → average → min → max)
  • chart_by — next breakdown column of the chart
  • chart_finer — finer date unit of the chart (month → week → day)
  • chart_coarser — coarser date unit of the chart (day → week → month)
  • chart_prev_saved — previous chart in the marker
  • chart_next_saved — next chart in the marker
  • chart_cumulative — toggle a cumulative line
  • chart_percent — toggle percentages of a stacked bar
  • open_url — open the http or https URL of the selected row in the browser (O in the table, o in the tree; also from the palette and the action menu)
  • add_column — add a column for a new key
  • move_column_left — move the column to the left
  • move_column_right — move the column to the right
  • freeze_columns — freeze the columns up to this one
  • search — find text
  • search_next — go to the next match
  • search_prev — go to the previous match
  • quick_filter — search: show only the rows containing some text
  • highlight_same — highlight the rows with the same value
  • filter_same — show only the rows with the same value
  • next_problem — jump to the next problem
  • prev_problem — jump to the previous problem
  • frequency — show the value counts of the column
  • condition_1 — toggle the named condition with key 1
  • condition_2 — toggle the named condition with key 2
  • condition_3 — toggle the named condition with key 3
  • condition_4 — toggle the named condition with key 4
  • condition_5 — toggle the named condition with key 5
  • condition_6 — toggle the named condition with key 6
  • condition_7 — toggle the named condition with key 7
  • condition_8 — toggle the named condition with key 8
  • condition_9 — toggle the named condition with key 9
  • notice — go to the notice box
  • sort_menu — open the sort window
  • filter_menu — open the filter window
  • workspace_drawer — open or close the table list
  • workspace_switch — open or close the list of favorite workspaces to switch to
  • workspace_favorite — add the current workspace to favorites or remove it (in the switch list it only adds)
  • choose_0 — in the switch list, go back to where you started
  • choose_1 — in the switch list, go to favorite 1
  • choose_2 — in the switch list, go to favorite 2
  • choose_3 — in the switch list, go to favorite 3
  • choose_4 — in the switch list, go to favorite 4
  • choose_5 — in the switch list, go to favorite 5
  • choose_6 — in the switch list, go to favorite 6
  • choose_7 — in the switch list, go to favorite 7
  • choose_8 — in the switch list, go to favorite 8
  • choose_9 — in the switch list, go to favorite 9
  • mark_row — mark or unmark the row
  • select_range — select a range of rows
  • extend_up — extend the selection up
  • extend_down — extend the selection down
  • select_all — select all rows
  • clear_selection — clear the selection, the filter, the conditions, then the search highlight, one at a time
  • detail — show every property of the note
  • view_settings — open the view settings
  • focus_chips — move to the settings bar
  • stack_down — with stacked tables, move to the table below
  • stack_up — with stacked tables, move to the table above
  • stack_close — take the selected table out of the stack (also “Close this table” in the palette)
  • stack_grow — with stacked tables, make the selected table one row taller
  • stack_shrink — with stacked tables, make the selected table one row shorter
  • commit — confirm the input
  • cancel — cancel the input, or go back
  • commit_next — confirm and move to the cell on the right
  • commit_prev — confirm and move to the cell on the left
  • revert — put back the value from before the edit
  • clear_input — clear the whole input
  • list_up — previous candidate
  • list_down — next candidate
  • cursor_left — move the cursor left
  • cursor_right — move the cursor right
  • prev_month — previous month in the date calendar
  • next_month — next month in the date calendar
  • prev_year — previous year in the date calendar
  • next_year — next year in the date calendar
  • today — set today’s date (in the Gantt view, scroll the time axis to today)
  • create_note_edit — create the note from the new note form and open it in the editor
  • create_note — create the note now from any field of the new note form
  • time_focus — switch between the day and the time field of the datetime calendar
  • cursor_home — move the cursor to the start
  • cursor_end — move the cursor to the end
  • delete_back — delete the character before the cursor
  • delete_forward — delete the character after the cursor
  • close — close the help, palette, detail view, or settings bar
  • run — run or choose the selected item
  • toggle — turn the selected item on or off
  • next_section — move to the next section
  • prev_section — move to the previous section
  • go_to_section_1 — go to section 1 of the list on the left in the view settings
  • go_to_section_2 — go to section 2 of the list on the left in the view settings
  • go_to_section_3 — go to section 3 of the list on the left in the view settings
  • go_to_section_4 — go to section 4 of the list on the left in the view settings
  • go_to_section_5 — go to section 5 of the list on the left in the view settings
  • go_to_section_6 — go to section 6 of the list on the left in the view settings
  • go_to_section_7 — go to section 7 of the list on the left in the view settings
  • go_to_section_8 — go to section 8 of the list on the left in the view settings
  • go_to_section_9 — go to section 9 of the list on the left in the view settings
  • move_item_up — move the item up
  • move_item_down — move the item down
  • remove_item — remove the item
  • save_all — save all the changes
  • back — go back without doing anything
  • next_file — next file in the save review
  • prev_file — previous file in the save review
  • overwrite — write the file over changes made outside mdgrid
  • discard_row — discard the pending changes to the file
  • quit_save — save the changes, then quit
  • quit_discard — discard the changes and quit
  • delete_note — move the note of the selected row to the trash after confirming its name (also from the palette and the action menu x); in vim mode, dd and the palette move the notes of all marked rows; u brings them back
  • paste — put the value copied with y or Y (vim mode)
  • repeat — put the last value set in a single cell into the selected row (vim mode)
  • word_next — move to the start of the next word (vim mode)
  • word_prev — move to the start of the word or of the previous word (vim mode)
  • word_end — move to the end of the word (vim mode)
  • insert — insert before the cursor (vim mode)
  • append — insert after the cursor (vim mode)
  • insert_start — insert at the start (vim mode)
  • append_end — insert at the end (vim mode)
  • delete_word — delete to the start of the next word (vim mode)
  • delete_word_back — delete back to the start of the word (vim mode)
  • delete_to_end — delete to the end (vim mode)
  • change_word — change to the end of the word (vim mode)
  • change_to_end — change to the end (vim mode)
  • change_line — change the whole text (vim mode)

Palette-only commands

These commands have no key and can’t be bound in the config file. Run them from the command palette.

  • export_base — write mdgrid’s views to a new .base file under a name you choose (existing .base files are never overwritten)
  • import_base — pick a .base file and import one of its views as an mdgrid view
  • problems_only — show only the rows with problems, or all rows again (also by clicking the problem count in the bottom band)
  • open_place — list the registered tables (places.toml) and open the one you pick
  • register_place — register the current table under a name and a group
  • save_session — save what you see now (table, view, filters, sort, columns) as a named session in sessions.toml; open it later with mdgrid -s <name>. If the name exists, it asks before replacing
  • open_link — open the note a link cell points to (its table, with its row selected)
  • linked_rows — list the notes that link to the current note, with the table and column they link from
  • workspace_new — create a workspace (workspaces.toml) with the current table
  • workspace_add — add the current table to a workspace (pick one or type a new name)
  • workspace_remove — remove the current table from a workspace
  • workspace_open — pick a workspace, then one of its tables, and open it within that workspace
  • starter_new — pick a starter (a built-in one or starters/<name> in the config folder), type the folder to create and whether to add the sample notes, and open the new ledger
  • rename_note — rename the note of the selected row (also in the action menu x); links to the old name are rewritten as pending changes
  • restore_note — pick a note in the trash and put it back where it was
  • across_search — search every table in the workspace for a word and open the table of the row you pick (only with across = true under [search]; see config.md)
  • stack_add — pick a table of the current scope and stack it below the current table (up to 4)
  • page_save — name the stacked arrangement (tables, views, height ratios) and save it as a page of the current workspace
  • ai_proposals — list the AI proposals for rows of this table (left in the ledger’s .mdgrid/proposals/ by --apply … --propose) and take one (as pending changes) or discard it (delete the proposal file). Shown only when there are proposals and mdgrid is not read-only; clicking the count in the bottom band does the same
  • ai_ask — send the selected rows (or the rows of the current view) and the request you type to the command in ask.command, and turn the changes in its reply into an AI proposal (shown only when ask.command is set and mdgrid is not read-only; config.md)
  • routine_runs — read the routine table again, list the routine runs that are due (including ones you left earlier that day) and create their notes after you confirm (only when a table of the scope has runs in its marker, and not when read-only; also by clicking the count in the bottom band; see config.md)

Configuration

日本語

mdgrid reads one TOML file:

  • $XDG_CONFIG_HOME/mdgrid/config.toml, or ~/.config/mdgrid/config.toml when XDG_CONFIG_HOME is unset (also on macOS). On Windows, when XDG_CONFIG_HOME is unset: %APPDATA%\mdgrid\config.toml.
  • mdgrid --config <path> reads that file instead.

The same folder also holds files that mdgrid writes itself: ui.toml (what you pick on the screen, such as the theme in the “Look” section of the view settings), views.toml (mdgrid views and per-table settings), workspaces.toml (workspaces and favorites; see Switch between favorite workspaces), places.toml (registered tables; see Register the tables you use) and sessions.toml (named sessions; see Save what you see as a session). mdgrid never rewrites config.toml.

Every item is optional. Without a file mdgrid runs with the defaults. Unknown items, values of the wrong type and items written in a place that cannot hold them produce a warning on the message line and are ignored; mdgrid still starts. Every warning has the form file: item path: reason. A broken TOML file stops mdgrid with a one-line reason.

To start from the defaults, write them out with comments:

mdgrid --print-config > ~/.config/mdgrid/config.toml

The output reads back without warnings and behaves exactly like having no file. Items without a default appear as commented examples.

Two kinds of items

  • Whole-app items (scope “global only”): the top-level language, editor and poll_ms, and the sections [terminal], [workspace], [git], [keys], [search] and [templates]. They are written only in config.toml (ui.toml may hold [terminal] nerd_font).
  • The table profile (scope “global, workspace, table, view”): use, [look], [display], [dates], [edit] and [new_note]. The same shape can be written in every place below, and narrower places override wider ones.
  • Conditions and notifications per ledger (scope “global, workspace marker”): [conditions], [[notices]] and [[notify]]. Write them in config.toml and at the top of the marker .mdgrid/workspace.toml. What a marker holds works only in the tables of that ledger, next to the global ones (named conditions).

Overrides per workspace, table and view

PlaceWritten by handWritten by mdgrid
Globalconfig.tomlui.toml
Workspacethe marker .mdgrid/workspace.toml (top level), or [[workspace]] in workspaces.toml ([workspace.look] …)workspaces.toml (never the marker)
Tablethe table entry of the workspace ([[table]] + [table.look] in the marker, [[workspace.table]] + [workspace.table.look])[[table]] in views.toml
View—the view settings (with a mdgrid view, saved in its definition too)

The value of each item is taken from the narrowest place that writes it (view → table → workspace → global → default). In the same place, what mdgrid wrote wins over what you wrote by hand (ui.toml over config.toml, views.toml over the workspace’s table entry). The one exception is the [look] written in a workspace marker (top level and [table.look]): it is what the ledger’s author suggests, so it sits in a place wider than global (just above the defaults). A theme, parts or colors you chose yourself, in config.toml or on screen, win over the marker whatever place they are in (the marker’s other sections stay at the workspace level). Two exceptions keep looks whole: a preset drops the part shapes ([look.style]) written in wider places, and a theme drops the role colors ([look.colors], not the value colors) written in wider places. use = "<template>" lays the template under the values of that place.

mdgrid [<table>] --print-config --resolved prints what applies to that table, with a comment above every item naming where the value came from.

# notes/.mdgrid/workspace.toml — every table of the notes workspace is nord, tasks is dracula
name = "notes"

[look]
theme = "nord"

[[table]]
path = "tasks"

[table.look]
theme = "dracula"

The marker can also name the table to open for its root folder: open = "<table name>" at the top level (the name of a [[table]], or the folder name of an automatic table). Opening the root folder (mdgrid there, mdgrid ., or its path from elsewhere) then opens that table (in its view, unless --view is given) instead of every note in the folder; --print, --check and --print-config --resolved use it too. --raw opens the folder itself. A subfolder, two or more folders, or a .md file do not use it. An open that names no table is a warning, and the folder opens as it is.

Open any other table by its name with --table <table name> (mdgrid ~/notes/research --table News). The marker is looked up from the opened folder (or the current folder) upwards, so the same name works from any folder inside the ledger. The screen, --print, --count, --check, --new-note, --pick, --apply, --notices, --notify, --runs, --print-config --resolved and --page all treat that table as the opened table, and --view looks among its views (without --view, its view, else its first view). --new-note creates the note with that table’s [new_note] (folder, name head, preset values, body template, required columns). An unknown name, or no marker, stops with one line that lists the marker’s table names. With -w <workspace>, the name is looked up among that workspace’s tables in workspaces.toml. It cannot be combined with --raw, -s or --continue.

Opening the folder that holds a table’s notes directly (the table’s [new_note] folder, or the folder of the file.inFolder filter of its .base; mdgrid ~/notes/research/News) also opens that table instead of the bare folder, with its new-note rules, views and value lists. Add --raw to see the bare folder.

# tasks/.mdgrid/workspace.toml — `mdgrid` in tasks/ opens tasks.base, not README.md or AGENTS.md
open = "tasks"

[[table]]
name = "tasks"
path = "tasks.base"

A [[table]] in the marker can also set up the gantt screen (C; gantt in Keys): gantt = { start = "<column>", end = "<column>" }, or days = "<column>" (the length in days) instead of end. Without the setting, mdgrid infers the columns from the names of the date columns (start: start, begin, from, 開始; end: end, due, finish, until, to, 期限, 終了) and the screen title says so. A gantt that is not a table, has no start, or has neither end nor days is a warning and the setting is dropped; a column the table does not have is reported once the notes are read. The screen types all take the same shape (<type> = { <column names> }), and the screen type menu lists only the types that have a setting or an inference.

A [[table]] in the marker can also set up the kanban screen (B; kanban in Keys): kanban = { column = "<column>" }. The rows become cards in lanes, one lane per value of that column, in the order of the column’s allowed values ([rules.<column>] values), then any other value as the rows show it, and last (none) for rows without a value. Without the setting, mdgrid infers the column from its name (status, state, stage, 状態, ステータス, 段階; any case) and the screen title says so. A list column is never inferred, and naming one in the setting is a warning, because a row would sit in several lanes. A kanban that is not a table or has no column is a warning and the setting is dropped; a column the table does not have is reported once the notes are read.

Under each card’s name, card = ["<column>", …] shows the values of those columns, one line each, in the order you write them. The values look as they do in the table cells (glyphs and names from the rules, your date format, the names of linked notes, computed columns), and a column does not have to be in the view. A column with no value on that row gets no line. With card, the cards are spaced one line apart, and the rest of the name and the value lines sit two characters in from the name. A name too long for its lane wraps onto a second line and is cut with … after that (with or without card). A card that is not a list of column names is a warning and is dropped (the board still opens, with names only); a column the table does not have is reported once the notes are read.

[[table]]
name = "Reading"
kanban = { column = "status", card = ["author", "formula.progress", "formula.stars"] }

A [[table]] in the marker can also set up parents and children: children = { key = "<column>" }. Every view of that table then lists each row under the note its key column links to (the first link of a list), indented, the same way as turning on the “Tree” section of the view settings. A view where you turn it off in the view settings stays off when you open it again. Besides key, every item is optional:

  • status: the status column. Without it, the column of the marker’s kanban, or else status.
  • done: the done value. "done" when left out.
  • closed: the values that count as finished. ["done"] when left out; the done value always counts as finished.
  • on_done: what happens to unfinished descendants when you set a parent’s status to the done value. "complete" (the default) sets them to the done value too, with the column’s then values, in the same step as the parent, so one undo takes it all back. "refuse" leaves the parent as it is while descendants are unfinished and says how many. "keep" sets only the parent and shows how many are left on the bottom line.
  • closed_by: the column where descendants finished together with their parent get a link to that parent ([[Design]]), in the same step as the parent, so one undo takes it back. Children that were already finished get nothing. Left out, nothing is written (there is no default column name, so no column appears in your notes unasked).
  • on_reopen: what happens to the descendants whose closed_by points to a finished parent when you set that parent back to an unfinished value. "keep" (the default) leaves them as they are. "reopen" sets them to the parent’s new value and empties closed_by, in the same step as the parent. "ask" opens a small window to choose “Bring the children back too” or “Only the parent” (Esc changes nothing). "reopen" or "ask" without closed_by is a warning and works as "keep", since the children to bring back are unknown.
  • gantt: what the gantt screen does when a descendant’s bar runs outside the dates of a parent that has its own dates. "mark" (the default) puts a ! at the right end of the name of the child’s and the parent’s rows, and the bottom line of a selected row says by how many days. "extend" moves the parent’s start or end to cover the child when you move or stretch the child’s bar, in the same step (moving a parent does not move its children). "none" does nothing.

Descendants are followed through the links of every row of the table, whatever the view filters or groups. When you edit a cell of the key column, or that field in the new-note window, the notes of the same table are offered as parents even before any note has one. The row itself and its descendants are not offered (choosing one would make a loop). Finishing a parent only touches its descendants when you edit on the screen (a cell, a bulk edit, a kanban card, . in vim mode), not with --apply, and not in a table where only the view settings turned parent/child on. A key column the table does not have (no note has a value in it, the .base properties give it no name, and no view lists it in order) is reported once the notes are read (in the form .mdgrid/workspace.toml: table[1].children.key: …), and the rows are not arranged as parents and children. A children that is not a table or has no key is a warning and the setting is dropped; another item with a wrong value is a warning and that item keeps its default.

# tasks/.mdgrid/workspace.toml — keep a parent open while children are left, and stretch it with its children
[[table]]
name = "tasks"
path = "tasks"
children = { key = "parent", on_done = "refuse", gantt = "extend" }

When a table has an order it should always open in, such as news newest first or expenses by date, write a default sort in the marker’s [[table]]: sort = [{ property = "<column>", direction = "DESC" }, …]. It has the same shape as the sort of a .base view; direction is ASC or DESC (any case; ascending when left out). The rules apply in the order written, and each later rule orders the rows the earlier ones leave tied.

It applies to the views of that table that have no sort of their own (views in a .base file, [[table.base.views]] in the marker, mdgrid views without a sort) and to a table without views. The --print output, the cards inside a kanban lane and the gantt rows follow the same order. A view with its own sort keeps it. When you sort with s on a heading or in the sort window (S), your rules come first and rows they leave tied stay in the view’s sort order (or the table default): in a table that defaults to due dates, sorting by status keeps each status group in due-date order. The sort window and the sort section of the view settings label rules that come from a default “default · marker” (the table default) or “default · view” (the view’s sort), and once you change the sort on the screen, “Back to default” in the window undoes it.

Only the marker’s [[table]] takes it (like the screen settings); workspaces.toml and views.toml do not, and the global config has no such setting because every table has different columns. A sort that is not an array is a warning and is not used; a rule without property, or with a direction other than ASC or DESC, is a warning and only that rule is dropped. A column the table does not have is reported once the notes are read (in the form .mdgrid/workspace.toml: table[1].sort[1].property: …).

# research/.mdgrid/workspace.toml — news newest first, same day by file name
[[table]]
name = "News"
sort = [{ property = "date", direction = "DESC" }, { property = "file.name", direction = "ASC" }]

A [[table]] in the marker can also set up the chart screen (P; chart in Keys): chart = { kind = "bar", x = "status" }. Every key is optional. kind is the kind (bar, stacked, line, scatter, heatmap; bar when left out), x the column to split by, y a number column for the value (a count when left out; for a scatter, the vertical column, a number or a date), agg the aggregate (count, sum, avg, min, max; sum when y is given), by the breakdown column (needed by stacked bars and heatmaps and guessed when left out; optional for lines and scatters), unit the date range (day, week, month; the finest that fits when left out), cumulative = true a cumulative line, and name a name for the title. For several charts, write an array (chart = [ { … }, { … } ]) and move between them with [ and ] on the screen:

[[table]]
name = "tasks"
path = "tasks"
chart = [
  { name = "By status", x = "status" },
  { name = "Due by month", kind = "line", x = "due", unit = "month" },
  { name = "Owner and status", kind = "heatmap", x = "assignee", by = "status" },
]

Left-out columns are guessed (the split column is the first of: a status column, a column with allowed values, a checkbox, a list, a date, the first column). A chart with an unknown key or value, or a column name that is not a string, is a warning and is left out; a chart naming a column the table does not have is reported and left out once the notes are read. Kinds and columns changed on the screen are not written back to the marker.

A [[table]] in the marker can also set up the tree view (T; tree in Keys): tree = { path = "<column>", separator = "<separator>", order = "<column>" }. The value of the path column, split at separator (default >), is where the row sits in the tree, and the order column (optional) sorts the rows in a folder. When the column holds a list, its first item is used. A path column the table does not have, an empty separator, or a tree that is not a table is a warning (in the form .mdgrid/workspace.toml: table[1].tree.separator: …), and the tree is not offered.

# bookmarks/.mdgrid/workspace.toml — see notes whose folder is like "bar > dev > Web" as a folder tree
[[table]]
name = "Bookmarks"
path = "Bookmarks"
tree = { path = "folder", order = "order" }

A [[table]] in the marker with runs becomes a routine table: a table of recurring work (a weekly review, a monthly invoice), where each row’s rule makes one note per run in another folder. runs = { folder = "<folder>", rule = "<column>", name = "<name template>", set = { <column> = <value> }, copy = ["<column>"], body = "<template file>", where = { <column> = ["<value>"] } }. Only folder (where the run notes go, relative to the marker’s root) and rule (the column with the rule) are needed. name is the name template of a run note (default {routine} {date:YYYY-MM-DD}; {routine} is the routine note’s name, {date} the date of the run, and the other variables are those of new_note), set the values to put in it, copy the columns whose routine values it copies, body the body template (relative to the marker’s root; default one heading with the run’s name), and where the routines that get runs (the same form as a view’s where; with where = { status = ["active"] } a paused routine keeps its rule and gets no runs). The frontmatter of a run note is the link routine ("[[name]]"), the run’s date date, then set and copy. A rule is written daily, weekly mon thu, monthly 1 15, monthly last or every 3d (counted from the date in the start column), or the Japanese forms 毎日, 毎週 月 木, 毎月 1日 15日, 毎月 末日 and 3日ごと. Only the latest run up to today is made, the runs made are remembered in routine.json in the state folder, and a note with the same name is never overwritten. The open screen shows the names and asks before it creates them; mdgrid <ledger> --runs creates them without asking (guide). A runs that is not a table, or has no folder or rule, is a warning (in the form .mdgrid/workspace.toml: table[1].runs.folder: …), and that table makes no runs.

# notes/.mdgrid/workspace.toml — make run notes in Runs/ from the rules written in the routine table
[[table]]
name = "Routines"
path = "Routines"
runs = { folder = "Runs", rule = "recurrence", set = { status = "todo" }, copy = ["actor"] }

A workspace can also hold pages: named arrangements of tables stacked top to bottom ([[page]] in a marker, [[workspace.page]] under the workspace in workspaces.toml). Write name and the list tables, top first; each entry names a table of the scope in table, the view to open in view (default: the table’s usual view) and a height ratio in height (an integer of 1 or more; default 1). Save the arrangement as a page in the command palette writes the same shape (replacing a page of the same name); in a marker it only appends at the end of the file and leaves every other line and comment as it was. Pages are listed above the tables in the table list drawer, and mdgrid -w <workspace> --page <name> (for a marker workspace, mdgrid <folder> --page <name>) opens one. A row that cannot be read (a page with no name, a table that is not in the scope, …) is a warning in the form .mdgrid/workspace.toml: page[1].tables[2].table: … and is skipped.

# notes/.mdgrid/workspace.toml — in the morning, compare today's tasks with the active projects
[[page]]
name = "morning"
tables = [
  { table = "tasks", view = "Today", height = 2 },
  { table = "projects", view = "Active", height = 1 },
]

The top of a marker can also hold named conditions, notice items and notifications ([conditions.<name>], [[notices]] and [[notify]], in the same shape as in config.toml). They work only while a table of that ledger is open, next to the global ones. A notice note in a marker must be a file inside the ledger (~, absolute paths and .. that leave it are warned about and ignored).

# people/.mdgrid/workspace.toml — a condition only for the people ledger; here 1 is "time to get in touch"
name = "People"

[conditions.contact]
label = "Time to get in touch"
expr = 'formula.contact <= today()'
key = 1

A marker does not have to be written by hand. A starter is a marker plus the note templates (and a few sample notes) for a common kind of ledger, and mdgrid <folder> --init-workspace --starter <name> writes it into a new folder: the folder is created if missing, --with-samples adds the sample notes, and nothing is ever overwritten (if one target file exists, nothing is written). mdgrid --starters lists them, one per line: the built-in tasks, tasks-ai, bookmarks, reading and people, and your own. The command palette has the same as Create a ledger from a starter (pick one, type the folder, answer whether to add the samples). Your own starters live in the config folder under starters/<name>/, in the same shape as the built-in ones:

starters/kanban/
  starter.toml                  # [name] and [description], one key per language code (en, ja)
  ledger/                       # copied as is, relative to the ledger's root
    .mdgrid/workspace.toml
    .mdgrid/templates/card.md   # the body template named by [new_note] (its {date} is filled when a note is made)
  samples/                      # copied only with --with-samples; {date}, {date+N}, {now} … are filled when copied
    Board/First card.md
  ledger.ja/  samples.ja/       # optional: used instead of ledger/ and samples/ when the language is ja

A starter with the same name as a built-in one replaces it. The quickest way to make one is to copy the .mdgrid/ of a ledger you like into starters/<name>/ledger/; examples/places/mdgrid/starters/journal is one. The starter’s folder itself may be a symbolic link (as dotfiles tools make it), but links inside it are not followed, so link the whole folder rather than each file.

Old names (0.3.0)

Configurations written for 0.3.0 still work: each old name is read as its new path with a warning. mdgrid --migrate-config prints your configuration in the current layout (comments are not carried over). The old look.toml is read when there is no ui.toml, and is moved to ui.toml the next time mdgrid writes it; [[target]] in views.toml becomes [[table]] the same way.

Old nameNew path
colorterminal.color
ambiguous_wideterminal.ambiguous_wide
nerd_fontterminal.nerd_font
workspace_detectworkspace.detect
themelook.theme
theme_lightlook.theme
theme_darklook.theme
looklook.mode
borderslook.style.frames
stylelook.style
style.presetlook.preset
cellslook.cells
cells.stylelook.cells
cells.checkboxlook.style.check
cells.chipslook.style.tags
cells.selectlook.style.status
cells.linkslook.style.links
cells.iconslook.style.icons
cells.columnslook.columns
colorslook.colors
view_tabsdisplay.tabs
search_bardisplay.search_bar
date_formatdates.format
week_startdates.week_start
candidatesedit.candidates
add_frontmatteredit.add_frontmatter

Items

The items below are the full list. Tests check that this list (paths, the Type, Default and Scope lines, and the examples), the items mdgrid reads, and the --print-config output agree.

Top level (the whole app)

language

  • Type: string ("auto" or a language code such as "en" or "ja")
  • Default: "auto"
  • Scope: global only

Language of the screen and the startup messages (--help, reasons for not starting, warnings). The languages are English (en), Japanese (ja), German (de), Spanish (es), French (fr), Korean (ko), Brazilian Portuguese (pt-BR), Simplified Chinese (zh-CN) and Traditional Chinese (zh-TW). "auto" looks at LC_ALL, LC_MESSAGES and LANG in this order and uses the first one that is not empty: the language whose language and region match (zh_TW.UTF-8 gives zh-TW), else the one whose language matches (de_AT.UTF-8 gives de; Chinese without Taiwan, Hong Kong or Macau gives zh-CN, and any Portuguese gives pt-BR), otherwise English (also when none is set). A language code chooses that language regardless of the environment; an unknown code is warned about and read as "auto". Note values, column names, the contents of .base files and file names are never translated. Errors in the command line arguments are reported before the configuration is read, so they follow the environment.

language = "en"

editor

  • Type: string
  • Default: none
  • Scope: global only

Editor that opens the selected note (e, or a click on the selected row’s file name). Arguments are allowed, such as "code -w"; the value is split into words without a shell (quotes and backslashes work as in POSIX), and the note path is added as one argument. When this is unset, empty, or only spaces, mdgrid uses $VISUAL, then $EDITOR, then vi (notepad on Windows) — the first one that is not empty. After the editor exits, mdgrid re-reads the note, so the editor must stay open until you close the note: an editor that returns at once (such as Windows Notepad with tabs, when it is already open) needs a waiting form in editor, for example "code -w". On Windows, write a path with forward slashes (editor = "C:/tools/nvim.exe") or inside quotes: a backslash outside quotes escapes the next character, so C:\tools\nvim.exe would not start.

editor = "nvim"

poll_ms

  • Type: integer (1 or more)
  • Default: 1000
  • Scope: global only

Interval in milliseconds for re-reading notes that changed outside mdgrid.

poll_ms = 2000

use

  • Type: string (a template name)
  • Default: none
  • Scope: global, workspace, table, view

Lay the template [templates.<name>] under the values written in the same place. In config.toml it is the base of the whole app; in a workspace, a table or a view it is the base of that place. A name that no template has gives a warning and is ignored.

use = "night"

[terminal] — the terminal

terminal.color

  • Type: boolean
  • Default: true
  • Scope: global only

Use colors. false draws without colors, the same as the NO_COLOR environment variable or --no-color.

[terminal]
color = false

terminal.ambiguous_wide

  • Type: boolean
  • Default: false
  • Scope: global only

Treat East Asian Ambiguous characters (such as ○ and ※) as two columns wide. Set true if your terminal draws them wide, so that the columns line up. Window frames are then always ASCII.

[terminal]
ambiguous_wide = true

terminal.nerd_font

  • Type: boolean or "auto"
  • Default: "auto"
  • Scope: global only

Whether round pill ends (Nerd Font glyphs U+E0B6 and U+E0B4) can be drawn. true: your terminal font is a Nerd Font (any Nerd Font works). "auto": only in terminals that draw these glyphs themselves without a font, Ghostty and WezTerm (by TERM_PROGRAM), so nothing breaks in other terminals. Without round ends, "pill" is drawn as "soft", and soft and solid pills keep square ends. A terminal cannot tell programs which font it uses, so for other terminals with a Nerd Font, write true. The “Look” section of the view settings writes this item to ui.toml.

[terminal]
nerd_font = true

terminal.nerd_icons

  • Type: boolean
  • Default: false
  • Scope: global only

Use icon glyphs from a Nerd Font for the settings button (gear), the screen type button and menu (table, relation map), the type marks of column headings and relation map boxes (number, date, date and time, checkbox, list, chip columns, and link columns in the boxes) and the calendar title. Set true only if your terminal font is a Nerd Font: other fonts show empty boxes for these glyphs. By default plain characters are used (⚙, ▦, ◇, #, ◷, ⋮, ◉, ↪, and the check mark of the part shape, ✓ by default). Emoji are never used. The glyphs are counted with the same character widths as the rest of the screen.

[terminal]
nerd_icons = true

terminal.herdr

  • Type: boolean
  • Default: true
  • Scope: global only

Inside a Herdr pane, tell Herdr the command that reopens the table and view you are looking at, and tell it again whenever you move to another table or view. When the Herdr server stops and starts again (after a restart of the computer, for example), Herdr runs that command in the same pane, so mdgrid comes back on the same table and view. When you quit mdgrid yourself, the pane is handed back and nothing is reopened. The Herdr sidebar shows the table and view as the pane title (such as Tasks · In progress, using the name you gave a workspace table), and the title goes away when you quit. false never calls Herdr, so no title either. Outside Herdr this item does nothing. See also mdgrid --continue in the manual.

[terminal]
herdr = false

[workspace] — workspaces

workspace.detect

  • Type: array of strings
  • Default: [".obsidian"]
  • Scope: global only

When the table you open is in no written workspace (-w, a .mdgrid/workspace.toml marker, or workspaces.toml), treat the nearest folder above it that has one of these marker folders as a workspace (the root folder): ".obsidian" (a folder with .obsidian/) or ".git" (a git repository). Its folders with notes become the tables of the relation map. [] turns detection off. The old values "vault" and "git" are read the same way, with a warning that they moved. A detected workspace has no workspace place for overrides.

[workspace]
detect = [".obsidian", ".git"]

[git] — git after a save

When your notes live in a git repository, mdgrid can hand the notes it wrote to git after a save. By default it does nothing. Only the notes mdgrid wrote (or created) are handed over; other changed or staged files never enter the commit. This section goes in config.toml only (not in a ledger’s marker, so that a copied ledger cannot make mdgrid push).

git.auto

  • Type: "off", "add", "commit" or "push"
  • Default: "off"
  • Scope: global only

How far to go. "off" does nothing. "add" stages the notes it wrote. "commit" also commits them (only those notes). "push" also pushes. Folders that are not git repositories are left alone. If git fails (no push target, for example), mdgrid says so in one line and the save itself stays done.

[git]
auto = "commit"

git.when

  • Type: "save" or "quit"
  • Default: "save"
  • Scope: global only

When it runs. "save" runs after every save (one commit per save). "quit" runs once when mdgrid exits (one commit for the session). Notes created from the screen count too, and notes still waiting at exit are handled then with either setting.

[git]
when = "quit"

git.message

  • Type: "auto" or "ask"
  • Default: "auto"
  • Scope: global only

The commit message. "auto" writes “mdgrid: update N notes” on the first line, then a blank line and the paths from the repository root, one per line. "ask" opens a one-line field after each save and uses what you type as the first line (Enter on an empty field uses the automatic message; Esc skips the commit and leaves the notes for the commit at exit).

[git]
message = "ask"

[look] — theme, parts and colors

look.theme

  • Type: string ("auto", "default", "nord", "solarized-light", "dracula", "gruvbox", "pink-monster", "dozy-pink", "sumi", "slate", "saas", "saas-dark" or "paper") or table ({ light, dark })
  • Default: "default"
  • Scope: global, workspace, table, view

Color theme of the screen: "default", "nord", "solarized-light", "dracula", "gruvbox", "pink-monster", "dozy-pink", or one of the quieter sets "sumi", "slate", "saas", "saas-dark" and "paper". A table { light = "...", dark = "..." } picks by the terminal’s background (read from COLORFGBG or by asking the terminal; when it cannot tell, the dark one); a side you leave out uses its default. "auto" is { light = "saas", dark = "sumi" }. "default" keeps the terminal’s own foreground and background. The other themes paint the background, the text, the header line, the column headings, the selected cell, the bottom band, the shaded rows and the > marks with their own colors; colors that carry meaning (pending values, search matches, added and removed lines) also get readable theme colors. Without colors (--no-color, NO_COLOR, TERM=dumb, terminal.color = false) the theme is ignored. On terminals without true color the nearest of the 256 colors is used. An unknown name gives a warning and the default look. A theme written in a narrower place drops the role colors ([look.colors]) written in wider places.

[look]
theme = { light = "paper", dark = "sumi" }

look.preset

  • Type: string ("sumi", "slate", "saas", "paper", "grid", "classic" or "dozy-pink")
  • Default: "sumi"
  • Scope: global, workspace, table, view

A whole set of part shapes: "sumi" (the default: a colored dot before a status, tags separated by ·, ✓, the selected row’s > mark in the accent color, a line under the headings), "slate", "saas", "paper", "grid", "classic" (the look of version 0.2.0) or "dozy-pink" (soft round pills to go with the dozy-pink theme). [look.style] overrides single parts. A preset written in a narrower place drops the part shapes written in wider places.

[look]
preset = "saas"

look.mode

  • Type: string ("modern" or "classic")
  • Default: "modern"
  • Scope: global, workspace, table, view

The look when colors are on: "modern" (lazygit-like: the selection is tinted instead of inverted, window borders and keys use an accent color, and descriptions are dimmed) or "classic" (inverse video, as before). The text on screen is the same either way, and without colors both look like classic.

[look]
mode = "classic"

look.cells

  • Type: string ("rich" or "plain")
  • Default: "rich"
  • Scope: global, workspace, table, view

How table cells look when colors are on. "rich" shows them as parts in the shapes of [look.style]: booleans (check), each list item (tags), the values of short text columns that repeat a few values such as status (status), links in the accent color (links), and a type mark in each column heading (icons). A value always keeps the same color, and its text is always shown. "plain" shows the text as it is. Without colors cells are always plain. The values written to notes, edited, searched and printed (--print) do not change.

[look]
cells = "plain"

look.style

  • Type: table (status, tags, check, select, rules, tabs, frames, band, links and icons)
  • Default: none
  • Scope: global, workspace, table, view

Override single part shapes of the preset:

  • status (short repeated values such as status or owner): "dot", "shape" (○ ◐ ●), "text", "pill", "tint", "solid" (the value color as a solid fill), "soft", "chip", "plain"
  • tags (lists): "dots", "hash", "brackets", "pill", "tint", "solid", "soft", "chip", "plain"
  • check (booleans): "box", "tick", "bracket", "text"
  • select (the selected row and cell): "bar", "cross", "tint", "outline", "fill", "reverse"
  • rules (lines in the table): "none", "header", "columns", "grid"
  • tabs: "underline", "pill", "segment", "brackets", "dim"
  • frames (windows): "rounded", "square", "heavy", "ascii", "none"
  • band (the keys at the bottom): "keys", "boxed", "quiet"
  • links: "accent" or "plain"
  • icons: true or false (type marks in the column headings)

"plain" ("text" for check, false for icons) keeps that part as text. "pill" draws round ends with Nerd Font glyphs, so it needs round ends (terminal.nerd_font); otherwise it is drawn as "soft". The catalog at docs/catalog/index.html shows every choice side by side and writes this table for you.

[look.style]
status = "chip"
select = "cross"

look.columns

  • Type: table (column = "rich", "plain" or "chip")
  • Default: none
  • Scope: global, workspace, table, view

How single columns look: "rich" (parts even when the part shape is plain), "plain" (text) or "chip" (chips even if the column is not detected as one). A column setting wins over the part shapes.

[look.columns]
status = "plain"
owner = "chip"

look.colors

  • Type: table (color roles, and [look.colors.values] for value colors)
  • Default: none
  • Scope: global, workspace, table, view

Override the theme’s colors by role. Roles: background, text, header (first line), selection (selected row), selection_text, band (key band), band_text, accent (headings, keys, frames), strong, zebra, zebra_text, mark, added, removed, pending (unsaved changes) and highlight (search matches). Roles you leave out keep the theme’s color. [look.colors.values] sets a color per value (matched ignoring case and surrounding spaces); it is used by every part shape, in the value list and for the value in group headings and kanban lane titles (drawn as the same chip as in the cells), and works for values in any language. Colors are "#rrggbb", "#rgb" or a name: black, white, gray, red, orange, yellow, green, teal, cyan, blue, purple, magenta, pink, brown. With theme = "default", the terminal’s own background and text stay, and only accent, selection and value colors are used. Unknown roles and unreadable colors give a warning and are skipped; so does a value written twice. A theme written in a narrower place drops the role colors of wider places (value colors stay).

[look.colors]
accent = "#e0a458"

[look.colors.values]
done = "green"

[display] — how the table is shown

display.row_numbers

  • Type: boolean
  • Default: false
  • Scope: global, workspace, table, view

Numbers 1, 2, 3… on the left of each row, in the order shown (after filters and sorting). Group heading rows get no number; numbering continues across groups. Each view can override this in its view settings (o, the “Display” section).

[display]
row_numbers = true

display.zebra

  • Type: boolean
  • Default: false
  • Scope: global, workspace, table, view

Every other row gets a shaded background. Not drawn without colors. Each view can override this in its view settings (o, the “Display” section).

[display]
zebra = true

display.column_lines

  • Type: boolean
  • Default: false
  • Scope: global, workspace, table, view

Draw │ between columns. Each view can override this in its view settings (o, the “Display” section).

[display]
column_lines = true

display.group_gap

  • Type: boolean
  • Default: false
  • Scope: global, workspace, table, view

In a grouped view, leave an empty line above every group heading but the first. The empty line is not a row: it is not counted or numbered, the cursor skips it, and clicking it does nothing. Each view can override this in its view settings (o, the “Display” section).

[display]
group_gap = true

display.tabs

  • Type: string ("always", "auto" or "never")
  • Default: "always"
  • Scope: global, workspace, table, view

The row of view tabs below the header: "always", "auto" (only with two or more views; a folder opened without a .base has one view, Default table, so its tab row is left out and the table uses that row until you save a view of your own) or "never". [ and ] switch views either way. In the “Display” section of the view settings this item cycles through the three values. Each view can override this in its view settings (o, the “Display” section).

[display]
tabs = "auto"

display.search_bar

  • Type: boolean
  • Default: true
  • Scope: global, workspace, table, view

Show a search bar above the table (\ moves into it). false hides the bar; the search term is then typed on the bottom line. Each view can override this in its view settings (o, the “Display” section).

[display]
search_bar = false

display.chips

  • Type: boolean
  • Default: true
  • Scope: global, workspace, table, view

Show the band of active view settings. When hidden, f still selects its items. Each view can override this in its view settings (o, the “Display” section).

[display]
chips = false

display.buttons

  • Type: string ("plain" or "box")
  • Default: "plain"
  • Scope: global, workspace, table, view

How the search bar and the Filter and Sort buttons in the view bar are drawn. "plain" shows them by their background. "box" draws each of them in its own box of lines, without filling it; the lines go on the padding lines next to the middle line of the view bar (see display.bar_padding), and clicking anywhere in a box works. With no padding, no lines are drawn. In the “Display” section of the view settings this item switches between the two values, and each view can override it there (o).

[display]
buttons = "box"

display.bar_padding

  • Type: number (0 to 2 in steps of 0.5)
  • Default: 1
  • Scope: global, workspace, table, view

Padding above and below the view bar (the view tabs, the search bar and the buttons sit on its middle line), in lines: 0, 0.5, 1, 1.5 or 2. Both 1 and 1.0 work. The default is 1: a half line looks different depending on the terminal and the theme (see below), so it is never the default. 0 draws the view bar on one line. Terminals can only leave whole lines, so a half line is drawn as a line next to the view bar whose cells get the view bar’s background color, with its outer half covered by half blocks in the screen’s background color (▀ above, ▄ below); the view bar line itself gets the same background. The screen’s background color is the theme’s when the theme paints the screen; otherwise mdgrid asks the terminal for its background color once at startup. When that color is unknown, without colors, and with terminal.ambiguous_wide = true (half blocks may take two columns there), the half line is rounded up to an empty line. Other values produce a warning and the default is used. Terminals shorter than 16 lines, and a hidden search bar, always use 0. In the “Display” section of the view settings this item cycles through 0, 0.5, 1, 1.5 and 2, and each view can override it there (o).

[display]
bar_padding = 0.5

display.top_padding

  • Type: number (0 to 2 in steps of 0.5)
  • Default: 1
  • Scope: global, workspace, table, view

Padding above the header, in lines, with the same values as display.bar_padding. A half line is drawn the same way: a line right above the header in the view bar’s background color, with its upper half covered by ▀ in the screen’s background color; the header then gets the view bar’s background color. Terminals shorter than 16 lines always use 0. In the “Display” section of the view settings this item cycles through the values, and each view can override it there (o).

[display]
top_padding = 0

display.row_extra_lines

  • Type: integer (0 to 9)
  • Default: 0
  • Scope: global, workspace, table, view

How many extra lines a table row may grow by. A row holding a long value, or a value with line breaks, wraps it at the column width (by character, counting widths like the rest of the table) and grows up to 1 + this many lines. Each row is only as tall as its tallest cell needs, so rows with short values stay on one line. A line break starts a new line; what does not fit ends with … on the last line. List values drawn as chips, group headings and the gaps between groups stay on one line. Lines below the first carry no row marker (>) and no row number; column lines and row colors cover the whole row. Scrolling, paging and mouse clicks count the grown lines, and the selected row scrolls into view with all its lines. The edit box and its pop-ups open on the row’s first line. 0 keeps every row on one line, with line breaks shown as …⏎. Other values produce a warning and the default is used. In the “Display” section of the view settings this item cycles through 0, 1, 2 and 3, and each view can override it there (o).

[display]
row_extra_lines = 2

display.tab_wrap

  • Type: boolean
  • Default: false
  • Scope: global, workspace, table, view

When the view tabs do not fit on the row of the view bar (with the search box and the buttons), move them all off that row onto the rows right below it, filled from the left and as many rows as they need, so every tab stays visible and can be clicked; the bar’s row keeps only the search box and the buttons, and the table moves down by the extra rows. When the tabs fit, nothing changes. false keeps one row: on a narrow screen the tabs other than the current one are left out (the [ ] keys still switch). When a view has tab_break, the tabs go on rows below whatever this setting says (see tab_break in Obsidian Bases support).

[display]
tab_wrap = true

display.tab_wrap_gap

  • Type: boolean
  • Default: false
  • Scope: global, workspace, table, view

With tab_wrap, put one empty row between the bar’s row (the search box and the buttons) and the rows of tabs below it. Nothing changes when the tabs fit. When a view’s tab_break puts the tabs below, the same one empty row goes in.

[display]
tab_wrap = true
tab_wrap_gap = true

display.note_name

  • Type: string (a regular expression)
  • Default: ""
  • Scope: global, workspace, table, view

A regular expression applied to the name in the note column, after note_path (with folders, to the last part of the path only). When it matches, the column shows the group named name, or else the first group, or else the name with the matched part removed. A name that does not match, or that would become empty, is shown as it is. "" sets nothing. Every other place that shows a note name uses it too: the target name in link cells (the alias text of [[…|alias]] is shown as written), the choices when you edit a link column, the linked rows and the “most linked” rows of the relation map, the right pane of the tree screen (which also follows note_path, like the note column) and the names in cross-workspace search results. What search matches (a hidden prefix still matches), the note names in messages and the detail view, the values written to notes (links keep the full name) and the --print values are not changed. An expression that cannot be read produces a warning and is not used. It is not switched in the “Display” section of the view settings (it is free text); a view can still override it in the view’s display in views.toml.

[display]
note_name = '^\d{8}_'

With note_path = "name", this shows 20261015_report.md as report; note_name = '^(?P<name>.+)_v\d+$' shows plan_v3.md as plan.

display.note_path

  • Type: string ("common", "name", "full" or "off")
  • Default: "common"
  • Scope: global, workspace, table, view

How the note column on the left shows each note (without .md). "common" drops the folder shared by every row, "name" shows only the name, "full" shows the path from the root, and "off" shows no name and no heading, only the row marks (!, ~) and the tree indent and ▾/▸, as when the table has a file.name column. Search and the note names in messages and the detail view keep the path from the root. Other values produce a warning and the default is used. In the “Display” section of the view settings this item cycles through common, name, full and off, and each view can override it there (o).

[display]
note_path = "name"

[dates] — dates

dates.format

  • Type: string
  • Default: "YYYY-MM-DD"
  • Scope: global, workspace, table, view

How dates are shown and typed in the table. A date-time column shows the date in this format and the time after a space (2026-11-25 16:00; the note keeps 2026-11-25T16:00). Parts: YYYY, YY, MM, M, DD, D, ddd (weekday), and separators that are not letters or digits (-, /, ., space, 年, …). Month and day are required once each; year and weekday at most once. M and D (not zero-padded) cannot touch another number part without a separator. Notes are always written as YYYY-MM-DD. An unreadable format falls back to the default with a warning.

[dates]
format = "YYYY/MM/DD (ddd)"

dates.week_start

  • Type: string ("sun" or "mon")
  • Default: "sun"
  • Scope: global, workspace, table, view

First day of the week, used by the date calendar, the date words for this week and next week, the weekly buckets of charts, and the weeks and “this week” of the Gantt chart.

[dates]
week_start = "mon"

[edit] — editing

edit.candidates

  • Type: integer (0 or more)
  • Default: 20
  • Scope: global, workspace, table, view

Maximum number of value candidates offered when editing a text cell. Candidates come from the notes of the current table (not from other tables under the same root). A column with more distinct values than this offers none, and so does a column where five or more rows each have a value of their own (like a URL or a memo).

[edit]
candidates = 30

edit.add_frontmatter

  • Type: boolean
  • Default: true
  • Scope: global, workspace, table, view

Allow writing to notes that have no front matter or an empty one (only the two --- lines). mdgrid adds the front matter or the key line. false makes these two kinds of notes read-only and shows the reason. A front matter with blank or comment lines between the delimiters is not empty and is always writable.

[edit]
add_frontmatter = false
  • Type: string ("auto", "wiki" or "markdown")
  • Default: "auto"
  • Scope: global, workspace, table, view

The form of the links mdgrid writes in a link column: when you pick a candidate, when a name you type matches a note, and in the link fields of the new note form. "wiki" writes [[name]] and "markdown" writes [name](https://github.com/S6U5/mdgrid/blob/main/docs/path.md), whatever form the column already holds. "auto" follows the form the column already uses, and writes [[name]] while it has no values. Set it in a ledger you want to keep in the same form as your other table tools. The routine column of routine run notes stays [[name]] whatever this says. Other values give a warning and mean "auto".

[edit]
link_format = "markdown"
  • Type: string ("shortest", "relative" or "absolute")
  • Default: "shortest"
  • Scope: global, workspace, table, view

The path in the links mdgrid writes in a link column. "shortest" writes only the name in [[…]] unless another note has the same name (then the path from the note’s folder), and the path from the note’s folder in […](https://github.com/S6U5/mdgrid/blob/main/docs/…) and plain paths. "relative" writes the path from the note’s folder in every form ([[../Tasks/Send the quote]] from Projects/Tidy the house.md), and "absolute" the path from the opened root ([[Tasks/Send the quote]]). [[…]] never gets .md. Other values give a warning and mean "shortest".

[edit]
link_path = "absolute"
  • Type: string ("always", "ask" or "never")
  • Default: "always"
  • Scope: global, workspace, table, view

Whether renaming a note with “Rename the note” also rewrites the links to it. Only links that resolve, from the note holding them, to the renamed note are rewritten, in any form ([[…]], […](https://github.com/S6U5/mdgrid/blob/main/docs/…), plain paths): the folder part, the heading and the shown text stay, and only the name changes. A link to a note with the same name in another folder is left alone. The rewrites are pending changes, so you can review them in the diff before saving and undo them. "always" always stages them, "ask" shows how many links would change and stages them only when you answer y, and "never" does not. The file is renamed in every case. Other values give a warning and mean "always".

[edit]
rename_links = "ask"

[ai] — AI writes

ai.write

  • Type: list of strings (column names)
  • Default: []
  • Scope: global, workspace, table, view

Columns that AI writes (--apply <file> --propose <reason> and update in the MCP server, --mcp) may change directly. Changes to columns not listed here are not written: they are left as proposals in .mdgrid/proposals/ at the ledger root, and a person reviews the diff and takes them with “Show AI proposals” on screen. Empty by default, so no column is written directly. List only the columns you are happy to let AI change, such as a status or a progress column.

[ai]
write = ["status", "tags"]

[new_note] — new notes

new_note

  • Type: table (mode, folder, name, name_head, ask, required, hidden, body and [new_note.set])
  • Default: none
  • Scope: global, workspace, table, view

How a new note is made from the table (“+ New” at the right end of the view bar, or a). Every part is optional.

  • folder: default folder for new notes, relative to the opened folder (empty: the opened folder). Values that leave the opened folder (.. or an absolute path) are refused. In a .base view whose filters include file.inFolder("X"), the note is made in that folder (X from the root folder) so the new row stays in the view; folder is used only when it is inside that folder (such as X/inbox).
  • name: template put into the name field. {date} is today’s date (YYYY-MM-DD); {date:YYYYMMDD}_ starts the name with 20261118_.
  • name_head: how the filled name template is shown. "show" (default) puts it in the name field. "hide" keeps it out of the field (also after you leave the field) and adds it before the name you type (with sub/name it goes on the last part; a name that already starts with a prefix matched by display.note_name is left as typed). mdgrid --new-note <name> adds it to the given name the same way. Together with a display.note_name that hides the prefix in the table, you type only the title and never see the date. With "hide", the variable {name} is the name you typed, without the prefix (a body template # {name} becomes # Shopping).
  • ask: the columns shown as fields in the new note form, in order. Without ask, the form shows the columns visible in the table. Each field is edited with the input for its type; a field left empty is not written. Ctrl+S creates the note from any field.
  • required: columns that must be filled; the note is not created while one is empty, and the field shows why.
  • hidden: columns written into every new note without a field in the form (with [new_note.set], for values such as the creation date).
  • mode: "form" (default: the form with every field) or "editor" (ask only the name, create the note with the preset values and the body template, then open it in the editor right away). From the form, Ctrl+E also creates the note and opens it in the editor.
  • body: a template file (relative to the opened folder) whose contents become the body of the new note. If it names a folder, the form gets a “template” field after the name, and you pick one of the folder’s .md files (the first by name if you do not pick; “(empty)” for no body). --new-note takes the first one, as when you do not pick; a folder with no .md file gives no body.
  • [new_note.set]: values written into every new note (column = value): a string, number, boolean, date, or an array of them (written as a vertical list).

Templates (name, the text values of [new_note.set], and the body file) may use these variables; unknown ones are left as they are:

VariableValue
{date}today (YYYY-MM-DD)
{date+7} · {date-1}days from today
{date:YYYY/MM/DD}today in a date format (same tokens as dates.format)
{time}the current time (HH:MM)
{now}the current date and time (YYYY-MM-DDTHH:MM)
{weekday}the day of the week
{name}the note’s name (with name_head = "hide", the name you typed, without the hidden prefix)
{folder}the folder the note is made in
{uuid}a new UUID for this note (version 4, like 3f2b8c1e-9a4d-4e7b-8c21-5d6f7a8b9c0d)
{uid}a new short id for this note (8 characters: a lowercase letter, then digits and lowercase letters, like k3f9x2ab)

{uuid} and {uid} keep one value within a note, so name = "{uid}_" together with id = "{uid}" in [new_note.set] gives the file name and the frontmatter the same id. Add the column to hidden to fill it without showing a field.

In name, only the date variables ({date}, {date:…}, {date+N}, {date-N}, {weekday}) and the id variables ({uuid}, {uid}) are filled; the others stay as written, because the name is not decided yet and a time has a : that a file name cannot hold.

Filter conditions of the view that fix a single value (such as status == "todo" or a tag) are written first and win over [new_note.set]. [new_note] is one item: a narrower place that writes it (a workspace, a table, or a mdgrid view under [table.view.new_note] in views.toml) replaces it whole.

[new_note]
folder = "inbox"
name = "{date} "
ask = ["priority", "due"]
required = ["due"]
hidden = ["created"]
body = "templates/note.md"

[new_note.set]
tags = ["inbox"]
due = "{date+7}"
created = "{now}"

[types] — column types

types

  • Type: table (column = "text", "number", "checkbox", "date", "datetime", "list" or "auto")
  • Default: {}
  • Scope: global, workspace, table, view

The type of single columns. A type written here wins over the root folder’s type settings (.obsidian/types.json, which mdgrid only reads) and over guessing from the values. "auto" goes back to guessing, so a narrower scope can undo a type set in a wider one. The type decides the cell input, the ! mark on values that do not fit, sorting, and the type mark in the column heading. Notes are never changed. Click the type mark of a column heading, or run column_type from the palette or the action menu, to pick a type (or “Auto”) for the selected column; the choice is written to the table in views.toml. Columns of file.* and formula.* keep their own types. An unknown type name produces a warning and the column is guessed.

[types]
due = "date"
estimate = "number"

[rules] — column rules

rules

  • Type: table of tables (column = { required = boolean, values = [string, …], then = { value = { column = string or { value = string, if_empty = boolean } } }, icons = { value = string }, labels = { value = string }, candidates = { sort = "name" | "count" | "recent", where = { column = [value, …] } } })
  • Default: {}
  • Scope: global, workspace, table, view

Rules for single columns, checked together with the column type. required = true makes a missing key, null, an empty string or an empty list a problem. values lists the allowed values: the value (each item, for a list) must be one of them, case-sensitive. A narrower scope wins item by item (a table can narrow values while keeping required from the global config). Values that break a rule or do not fit the column type are called problems: they get the ! mark, the bottom band shows how many there are, ! and @ jump to the next and previous one, problems_only shows only the rows with problems, and mdgrid --check lists them for CI. Checking a rule never changes a note and never stops you writing a value. A column with values offers them in the cell input. Grouping by a column with values puts the groups in that order (reversed when descending), then any other value in text order, and the group without a value last: the same order as the kanban lanes. --print writes the rows in that order too. Computed columns (file.*, formula.*) cannot have rules; unknown items and values of the wrong type produce a warning and are ignored.

then fills other columns of the same row when you set the column to a value. Under [rules.<column>.then], write value = { column = "text" }. The text may use the template variables ({date}, {now}, {uuid} …), is read in the type of the column it goes to, and an empty text clears that column. The extra value is staged together with your edit: it shows in the diff before saving, one undo takes both back, and changing the cell to another value drops it again. It works for cell edits, bulk edits, checkboxes and moving a card on the kanban screen. To fill a column only while it is empty, write a table instead of the text: { value = "{date}", if_empty = true }. The column is then filled only when it has no key, null, an empty string or an empty list (a value staged before counts), so a start date set the first time stays when the status goes back and forth. Changing the cell to another value drops the filled value only while it is still the one then put there, so a date you typed yourself stays. A table without value, with an if_empty that is not true or false, or with an unknown item is a warning, and that column is not filled. A narrower scope that writes then replaces it whole. In the example below, setting status to done fills done_at with today, and setting it to doing fills started with today only while started is empty.

icons and labels decide how the values read on screen. With icons = { todo = "○" } and labels = { todo = "To do" }, todo reads ○ To do in group headings, kanban lane titles, table cells (chips or text), the detail view and the right pane of the tree; a value with only a glyph reads ○ todo, and a value with neither stays as it is. Chip colors follow the value, so naming a value does not change its color. Any glyph works, Nerd Font ones too, and mdgrid prints it as you wrote it. Its width is counted like the rest of the screen, so if your font draws a glyph such as ○ two cells wide and it runs into the next letter, turn on terminal.ambiguous_wide. Windows where you pick a value (the choices when you edit a cell or fill in the new note window, the list toggle window, the value lists of the filter window and view settings, and the frequency window) show a named value as its name followed by the value (To do todo), so you can tell which value you pick. The \ quick filter and / search match the value or the name. The notes and --print, --count and CSV output keep the plain value. An entry for a value missing from values in the same table produces a warning naming it (rules.status.icons.blocked) and is ignored; when values comes from a wider scope, entries for values outside it are simply not shown. A narrower scope that writes icons or labels replaces it whole.

candidates decides the choices offered when you edit the column (cell edits, bulk edits and the new note window). sort picks the order: "name" by name, "count" most used first, "recent" most recently changed first. For a link column, "count" is the number of notes in the current table that point to the note, so a column pointing to the parent lists the parents with the most children first; for a value column it is the number of notes with that value. "recent" uses the newest change time of the target note for a link column, or of the notes with that value for a value column. Ties go by name. where has the same shape as a view’s where and narrows the notes taken as choices: the target notes for a link column, the notes holding the value for a value column. That keeps finished tasks out of the parent choices, or tags only found on finished notes out of the tag choices. The current value stays among the choices even when it does not match. The choices of a column with candidates come from the notes of the current table, not from other tables under the same root. Without sort, a link column goes by name and a value column by count; a column without candidates works as before. A sort that is none of the three, a where that is not a table, or a where value that is not an array produces a warning and that item is ignored. A column with values keeps the order of the rule. A narrower scope that writes candidates replaces it whole. The last part of the example below, [rules.parent.candidates], lists the unfinished parents with the most children first.

[rules.status]
required = true
values = ["todo", "doing", "done"]
icons = { todo = "○", doing = "◐", done = "●" }
labels = { todo = "To do", doing = "In progress" }

[rules.status.then]
done = { done_at = "{date}" }
doing = { started = { value = "{date}", if_empty = true } }

[rules.parent.candidates]
where = { status = ["todo", "doing", "waiting"] }
sort = "count"

[format] — number formats

format

  • Type: table of tables (column = { thousands = boolean, decimals = integer from 0 to 10, prefix = string, suffix = string })
  • Default: {}
  • Scope: global, workspace, table, view

How the numbers of single columns read on screen. thousands = true groups the whole part by three digits. decimals sets the number of decimal places: missing places are filled with 0, extra ones are rounded half away from zero (1234.56 with decimals = 1 reads 1,234.6, 3 reads 3.0); without it the value keeps its own digits. prefix and suffix go before and after the number, and a negative number puts - before the prefix (-¥1,200). The grouping and decimal separators follow the screen language: 1,234.5 in English, Japanese, Chinese and Korean, 1.234,5 in German, Spanish and Portuguese, and 1 234,5 (a narrow no-break space) in French. Columns of formula.* can have a format too (quote the name: [format."formula.rate"]); text values and values with a name from labels keep their own look.

The format applies to table cells, the detail view, pending values, the summary row, the subtotals in group headings and the values of a chart whose value column it is (sum, average, min, max). Counting summaries (Checked, Unchecked, Empty, Filled, Unique) and count charts stay plain numbers. It only changes what you see: the notes, sorting, filters, formulas, the cell input, --print, --count and copies keep the plain number. A narrower scope wins item by item. Unknown items, values of the wrong type, decimals outside 0 to 10, and a prefix or suffix with a control character or a text direction mark (which could garble the terminal, since a marker can come with a ledger someone sent you) produce a warning and are ignored; the other items still apply.

[format.amount]
thousands = true
prefix = "¥"

[format."formula.rate"]
decimals = 1
suffix = "%"

[keys] — key bindings

keys

  • Type: table of tables ([keys.<mode>] with key = action)
  • Default: none
  • Scope: global only

Rebind keys per mode; without this item the built-in key bindings are used. Under [keys.<mode>], write key = "action name". The action name "none" removes the key. Keys are written like "j", "ctrl+s", "shift+tab"; a space separates a prefix key sequence such as "g g".

Modes: table, edit, review, quit, help, palette, search, filter, detail, settings, settings_input, chips, list_select, menu, freq, sorts, relations, drawer, filter_window, filter_input, screen_menu, column_type, tree, gantt, kanban, chart, notice, switch, and input_normal in vim mode. Action names are shown in the command palette (:); keys.md lists every default key and action name per mode. Unknown modes, keys, or actions produce a warning and are skipped.

[keys.table]
"ctrl+f" = "search"
"x" = "none"

keys.vim

  • Type: boolean
  • Default: false
  • Scope: global only

Turns on vim mode. Every input box (a cell, search, the palette, a settings value, the name of a new note) starts in insert mode, where you type as usual. Esc switches it to normal mode, where h l 0 $ w b e move, i a I A go back to insert mode, x X dw db d$ D dd delete, cw c$ C cc change and u undoes. Esc in normal mode cancels the input, and Enter confirms in both modes. The bottom band shows -- INSERT -- or -- NORMAL --, and the cursor is a bar or a block.

The table gets three keys: dd moves the notes of the marked rows (or the selected row) to the trash after confirming their names, p puts the value you copied with y (a cell) or Y (a row), and . puts the value you last set in a cell into the same column of the selected row. Digits stay free for other keys and are never counts. The palette’s q! (quit without saving) works with or without vim mode.

With false (the default) every key works as before. The added keys are in keys.md, and you can rebind or remove them under [keys.table] and [keys.input_normal].

[keys]
vim = true

[search] — searching across tables

search.across

  • Type: boolean
  • Default: false
  • Scope: global only

Adds “Search across the workspace” to the command palette (:). Use it when you remember a row but not which table you wrote it in. Type a word and press Enter: mdgrid reads every table in the current workspace (or your registered tables when no workspace is open) in the background and lists the matching rows per table, each with the note name and the column and value that matched. A row matches the same way as the search box (\): the note name or a value contains the word, ignoring case unless the word has a capital letter.

Results appear as each table is read, with “read 3 / 5” until all are done; Esc stops and leaves the table as it was. Tables that cannot be read are skipped and named at the end. Pick a row and press Enter to open its table with the word in the search box and that row selected; if you have unsaved changes, mdgrid asks first, as when switching tables from the drawer.

With false (the default) the palette does not show the command, so people who don’t need it see nothing new.

[search]
across = true

[ask] — asking AI

ask.command

  • Type: list of strings (a command and its arguments)
  • Default: []
  • Scope: global only

The command and arguments that “Ask AI” in the palette runs. It runs without a shell and receives on standard input the selected rows (or the rows of the current view, up to 200) with their paths from the ledger root and front matter values, the columns with their types and allowed values, and the request you typed. Note bodies are not sent. The JSON changes the command prints ([{"path": …, "set": {column: value}}]) are narrowed to the rows and columns that were sent and become an AI proposal, which you review and take with “Show AI proposals”. mdgrid holds no API keys and never goes online; the command (your local AI tool) holds the keys and decides where the data goes. So that a shared ledger’s marker cannot make your machine run a command, it can only be set in the global config (config.toml). Empty by default, and then “Ask AI” does not appear in the palette.

Row values may have been written by other people, and someone could slip instructions for an AI into them. mdgrid puts the values inside marked delimiters, tells the model not to follow instructions found there, and narrows the reply to a proposal for the rows and columns it sent; still, choose a command that cannot use tools such as reading or writing files or running commands.

[ask]
command = ["claude", "-p", "--tools", ""]

[templates] — templates

templates

  • Type: table of tables ([templates.<name>] with profile items)
  • Default: none
  • Scope: global only

Named pieces of a profile ([look], [display], [dates], [edit], [new_note]). use = "<name>" in any place lays one under that place’s values. A template cannot use another. Templates saved from the “Look” section of the view settings go to ui.toml; a ui.toml template wins over a config.toml template of the same name.

[templates.night.look]
theme = "dracula"
preset = "dozy-pink"

[conditions] — named conditions

conditions

  • Type: table of tables ([conditions.<name>] with expr, label, key, hide)
  • Default: none
  • Scope: global, workspace marker

Give a name to a condition you use often, such as “due within a week”, and write it once. expr is an expression in the same language as the filters of a .base file. A name starts with a letter and uses only letters, digits, _ and -. Then use the condition by name:

  • in any expression as cond("<name>") (true when the row matches): --print --filter, --count --filter, the expression filter of the screen, a .base file, or another condition;
  • with key = 1 … 9: that digit key shows only the matching rows, and pressing it again shows all rows (more than one digit narrows to the rows that match all of them); when nothing is selected and the search box does not filter, Esc in the table clears every condition turned on with a digit key or from the notice band (conditions with hide = true stay);
  • in the filter section of the view settings (o), to keep only the matching rows or to hide them in that view;
  • with hide = true: the matching rows are hidden in every table and screen and in --print, --pick and --count; the settings band shows the condition and how many rows it hides, the digit key of the condition shows them again, and --show-hidden prints them.

In the example, far hides the plans that start more than 30 days from now, unless they are due within a week. label is the name shown on the settings band and in the help (label = "Due soon"). Inside cond(), a column the table does not have reads as empty, so one condition works for tables with different columns. A name that is not allowed, an expression that cannot be read, conditions that call each other in a loop, and a digit that another condition in the same file already uses produce a warning and are skipped.

Conditions can also be written, in the same shape, at the top of a ledger’s marker .mdgrid/workspace.toml. A people ledger can carry “time to get in touch” and a money ledger “payment due soon”, and they travel with the ledger. A condition in a marker is available only while a table of that ledger is open, next to the global conditions. With the same name the marker wins, and cond() in a global condition points to the marker’s one too. Put them in the marker of a starter and every ledger made from it has them. mdgrid <table> --print-config --resolved shows where each condition came from.

Digit keys go to the conditions with a key: first the marker’s, then the global ones, numbered from 1 with no gaps. The key number sets the order within one file. A condition whose expression uses a column (a note key or formula.*) that no row of the current table has gets no digit there, and it is left out of the help and of the filter section of the view settings. So with task conditions (due date, owner) in config.toml, a people ledger still starts at 1 with its own conditions, and no digit leads to an empty table. Conditions with hide = true apply whatever the columns.

[conditions.soon]
expr = 'due <= today() + "7d"'
key = 1

[conditions.far]
expr = 'start > today() + "30d" && !(due <= today() + "7d")'
hide = true
key = 9

[[notices]] — the notice box

notices

  • Type: array of tables ([[notices]] with cond, text, scope, show_zero, or note, lines)
  • Default: none
  • Scope: global, workspace marker

A small box above the header that shows what you want to notice, such as how many tasks are overdue. It appears only when you write items here; nothing changes for anyone else. Each [[notices]] is one item, shown in the order written. Items can also sit at the top of a ledger’s marker: they show only in the tables of that ledger, before the global items (a relative note starts at the marker’s folder).

  • A count item counts the rows that match a named condition (cond). text is the sentence with {count} replaced by the number (default: the condition’s label and the number). scope picks what to count: "table" (the open table, the default), "workspace" (every table of the current workspace) or a list of table names. Rows are counted after the table’s own filter and the conditions with hide = true, not after the view, search or digit keys. An item with 0 rows is left out unless show_zero = true. Tables without the columns the condition uses are not counted, and a "table" item is left out, show_zero or not, when the open table lacks them.
  • A note item shows the first lines non-empty lines (default 1) of a note’s body (note; ~ is the home folder, a relative path starts at the folder of the config file).

Count items share the first line, separated by ·; each note line gets its own line; the box is at most 3 lines. Move into the box with its key, pick an item and press Enter: a count item narrows the table to that condition (or lists the tables that have matching rows), a note item opens the note in your editor. mdgrid --notices prints the same items, one per line, for a tmux status line, a shell prompt or the Herdr sidebar.

[[notices]]
cond = "overdue"
text = "{count} overdue"
scope = "workspace"

[[notices]]
note = "~/notes/inbox.md"
lines = 2

[conditions.overdue]
expr = 'due < today() && status != "done"'

[[notify]] — notifications

notify

  • Type: array of tables ([[notify]] with cond, scope, title, text, to, group_over, group_text, command)
  • Default: none
  • Scope: global, workspace marker

Tells you when a row starts to match a named condition: a reminder time has come, or a task has just become overdue. Nothing happens until you write an item here. Each [[notify]] watches one condition, and one condition can be watched by only one item. Items can also sit at the top of a ledger’s marker: they are checked only by a screen showing a table of that ledger and by mdgrid <ledger> --notify. When the marker and config.toml watch the same condition, the ledger uses the marker’s item. Rows of tables without the columns the condition uses are never notified. A marker item cannot send to a command (command in to, and command): markers also arrive inside folders other people give you, and opening one must never run their commands. mdgrid warns and drops that outlet; write command notifications in config.toml.

  • cond is the condition to watch.
  • scope picks the tables to watch: "workspace" (every table of the current workspace, the default), "table" (the open table) or a list of table names.
  • title and text are the title and the text of the notification. {column} becomes the row’s value, and {file.name} and {formula.x} work too; a column the row doesn’t have becomes empty. Without them, the title is the condition’s label and the text is the note’s name.
  • to lists where it goes: "desktop" (the OS notification, the default), "terminal" (your terminal’s own notification) and "command" (your own program).
  • command is the program and its arguments for "command". {title}, {text} and {path} in the arguments are filled in. No shell runs it, so a value in a note never turns into a command.
  • When more rows than group_over (default 3) start to match in one check, they arrive as one notification. group_text is its text, with {count} replaced by the number of rows (default: “4 new”).

A row is notified once, when it starts to match. It stays quiet while it keeps matching, and is notified again if it stops matching and later matches again. When you add an item, the rows that already match are remembered without a notification, so nothing floods in. The record is kept in mdgrid’s state folder, never in your notes.

mdgrid checks when you open a table, after you save and every minute while it is open. While mdgrid is closed, mdgrid --notify checks once without the screen, for your OS scheduler to run (how to register it); it shares the record with the screen, so a row is never notified twice. If a notification can’t be delivered, the reason shows at the bottom of the screen once, and the row is tried again at the next check.

macOS, Windows and WSL show the desktop notification with what the OS already has; inside WSL it goes to Windows. On Linux it needs notify-send. For "terminal", mdgrid sends the one signal your terminal understands (iTerm2, kitty, Ghostty, WezTerm, foot, Windows Terminal) and a bell to other terminals. Inside tmux, turn on set -g allow-passthrough on.

[[notify]]
cond = "remind"
text = "{title} ({remind})"
to = ["desktop", "terminal"]

[conditions.remind]
expr = 'remind <= now() && status != "done"'

Write-back safety

日本語

mdgrid edits your notes in place, so it is built around one promise: it changes only the values you edited (adding a key line or a frontmatter block when needed), and leaves every other byte of the file as it was. This page describes what mdgrid writes, which notes and values it refuses to write, what happens when a note changes on disk while you are editing it, and how a file is actually written. It describes the current behavior.

The examples of read-only notes below are checked by a test (tests/test_safety_docs.rs): each example is run through the frontmatter reader, and the test fails if it does not come out read-only for the stated reason, or if the reader gains a reason that this page does not list.

What mdgrid changes

Edits are not written immediately. mdgrid keeps them as pending changes (marked in the table, and counted in the bottom bar), and writes them only when you save (Ctrl+S or :w by default). Before writing, it shows a diff for each file and asks you to confirm. Pending changes can be undone and redone, and if you quit with pending changes, mdgrid asks whether to save, discard, or go back.

When it writes, mdgrid changes only:

  • The value of the edited key. It finds the byte range of that key’s value in the frontmatter and replaces just that range. Other keys, key order, comments, blank lines, line endings (LF or CRLF), and the body stay byte-for-byte the same. After writing, only the edited value differs in a diff.
  • One new line for a missing key. If the note has frontmatter but not the key, mdgrid adds a key: value line at the end of the frontmatter. A list value is added in the vertical form Obsidian uses (key: followed by - item lines).
  • A new frontmatter block, for notes without one. If the note has no frontmatter (its first line is not ---), mdgrid adds ---, key: value, --- at the very top and leaves the body bytes as they were. If the note has empty frontmatter (just two --- lines), mdgrid adds the key line between them. This can be turned off; see no_frontmatter below.
  • A key’s name, or a whole key, when you rename or delete a key across notes (the column actions “Rename the key” and “Delete the key”). Renaming replaces only the bytes of the key name on its line; the value, its quoting and any comment stay. Deleting removes the key’s line and the lines of its value (list items, multi-line text); blank lines and comments after it stay, since they usually belong to the next key.

New lines use the file’s own line ending (LF for a file with no line break at all).

mdgrid writes only top-level keys of a note’s frontmatter. It never edits a note’s body (e opens the note in your editor instead), never rewrites a .base file, and does not replace any other existing file. The only files it creates are a new note (along with any missing folders above it), a new .base when you export a view under a name you choose, the temporary file used while saving (see How a file is written), views.toml in the config folder ($XDG_CONFIG_HOME/mdgrid/, or ~/.config/mdgrid/ if that is not set), and the view-state file in the state folder ($XDG_STATE_HOME/mdgrid/, or ~/.local/state/mdgrid/). It reads config.toml but never writes it.

How values are written:

  • A new value keeps the quoting style of the old one (plain, 'single', or "double"). If the old quoting cannot represent the new value safely, mdgrid uses double quotes. A value containing a line break is rejected.
  • Strings that YAML could read as something else, such as no, yes, on, numbers, values containing : or #, or values starting with a symbol, are quoted, so they read as the same string under both YAML 1.1 and YAML 1.2.
  • In a date or datetime column, a date is written unquoted (due: 2026-11-03), as Obsidian does, unless the old value was quoted, in which case the quotes are kept. The exception is a quoted empty string (due: ""), which is replaced by an unquoted date. In a text column, a date-like string is quoted, because writing it unquoted would change its type.
  • If you change a value and then change it back to what was last read from the file, the cell stops being a pending change and nothing is written for it. Re-writing the “same” value could still change its quoting or format, so mdgrid does not touch it.
  • A list keeps its original form (one-line [a, b] or one item per line) and indentation, and items you did not change keep their original spelling. Removing every item writes key: and keeps the key.

Read-only notes

Some notes cannot be written without risking damage, or without guessing which value is meant. mdgrid shows these notes but makes the whole row read-only, and shows the reason when you try to edit a cell. Except for the two forms that depend on [edit] add_frontmatter, this cannot be changed by any setting.

Each reason below has a small example note. In the examples, every line ends with LF unless marked, and these markers stand for bytes:

  • <BOM> is the UTF-8 byte order mark (EF BB BF).
  • <CRLF> at the end of a line means the line ends with CR LF instead of LF.
  • <XX>, two uppercase hex digits, is that single byte (for example <E9>).

no_frontmatter

The first line is not ---, so the note has no frontmatter.

Meeting notes
Talked about the release date.

By default this note is writable: saving a value adds a frontmatter block at the top, and the body stays as it was. With add_frontmatter = false under [edit] in the config file, these notes are read-only instead and show the reason.

A note whose first line is +++ (TOML frontmatter, as used by Hugo and Zola) is always read-only, whatever the setting: adding a YAML block above it would break the page for the site generator.

empty_frontmatter

The frontmatter is just the opening and closing ---, with nothing between them.

---
---
Meeting notes

By default this note is writable: saving a value adds the key line between the two --- lines. With add_frontmatter = false under [edit] in the config file, these notes are read-only instead and show the reason. Frontmatter that contains only blank lines or comments is not empty; it is treated as normal frontmatter.

bom

The file starts with a UTF-8 byte order mark.

<BOM>---
status: todo
---
Meeting notes

The values are still shown (and printed by --print) when the frontmatter after the byte order mark can be read; only writing is refused.

not_utf8

The file is not valid UTF-8, for example a note saved in Latin-1 or Shift_JIS.

---
title: Caf<E9>
---
Meeting notes

Two more cases are handled the same way, with their own reason:

  • A file that starts with a UTF-16 BOM (FF FE or FE FF). The reason is “the file is UTF-16”. It is still a text file, so e opens it in the editor; saving it as UTF-8 fixes it.
  • A file with a NUL byte in its first 8,000 bytes. The reason is “not a text file (contains NUL bytes)”. An executable, an archive or an image renamed to .md (a disguised extension) can still be valid UTF-8. mdgrid reads no values from such a file, does not add frontmatter to it as if it were a note without one, and e does not open it in the editor. A UTF-8 note never contains NUL, so an ordinary note is never treated this way.

The same rule applies to every other file mdgrid reads (CSV and TSV ledgers, .base files, settings and workspace markers, new-note templates, the input of --apply). A file that is not text is not opened, the reason is shown, and the file is never rewritten.

mixed_newlines

The frontmatter mixes line endings (CRLF and LF), or has a stray CR inside a line. Only the lines from the opening --- to the closing --- are checked; the body may mix line endings freely.

---<CRLF>
status: todo
---<CRLF>
Meeting notes

duplicate_key

The same top-level key appears more than once, so there is no single value to edit.

---
status: todo
status: done
---
Meeting notes

unclosed

The frontmatter opens with --- but never closes.

---
status: todo
Meeting notes

invalid_yaml

The frontmatter is not something mdgrid can read safely as YAML. A common case is an unquoted value containing : , which YAML rejects. Other cases include a flow list that is never closed and has no continuation lines (one that continues onto the next lines only makes that value read-only; see Read-only values), a tab used for indentation, or an indented line before the first key.

---
title: Re: release date
---
Meeting notes

Frontmatter written as one JSON or flow-style map ({"status": "todo"} between the --- lines) is also read-only, but its values are shown (and printed by --print, and used by file.tags).

The note file has more than one hard link (on Unix). Saving replaces the file with a new one, which would separate this name from the other links, so mdgrid does not write it. This is found from the file system rather than from the note’s content, so there is no example note: the row is marked read-only when the note is loaded, and the check is repeated when saving, including right before the file is replaced.

Read-only values

Within a note that can be written, some individual cells are still read-only, each with its own reason:

  • Columns that are not frontmatter keys: file properties (file.*) and formula columns (formula.*).
  • Nested maps (key: followed by indented sub: value lines, or {a: 1}) and block scalars (| and >). mdgrid shows them but does not rewrite them.
  • Values that use anchors or aliases (&a, *a), tagged values (!!str 12), and values that span several lines (a plain or quoted scalar continued on the next line, or a flow list like [a, followed by b]).
  • A column whose type differs between the types.json files of different root folders.
  • Lists that mdgrid cannot rewrite while keeping their original layout. In a list column, the item picker does not open for these, and the reason names the form: a blank line or a comment between items, a comment at the end of an item, items with different indentation, a tab after -, an item that continues onto the next line, nested items (a list or map inside an item), items that are not strings (for example - 2024, which would change type if rewritten). A list column written as a single string (tags: x) opens as a one-item list and is rewritten as tags: [x, y] when you change it; a single value that is not a string (tags: 2024) stays read-only.

For example, notes and aliases here are read-only, while status can be edited:

---
status: todo
notes: |
  First line
  Second line
aliases:
  - one

  - two
---

External changes

A note may change on disk while mdgrid has it open, for example when you edit it in Obsidian or with e in your editor, or when a sync tool updates it.

  • Detection. mdgrid polls the files’ modification time and size (every poll_ms, 1000 ms by default). A note with no pending changes is simply re-read. A note with pending changes is also re-read so the table shows the new values, but your pending changes are kept and the row is marked as changed outside (!). If a pending value now equals the value in the file, it stops being a pending change.
  • The save baseline. For each note, mdgrid remembers a baseline: the modification time, size, and SHA-256 hash of the content it had last read at the moment you first made a pending change to that note. Re-reading after an external change does not move the baseline. After mdgrid writes a note itself, the content it wrote becomes the new baseline, so saving the same note twice is not mistaken for an outside change.
  • Merging when other keys changed. Right before writing, mdgrid reads the note again. If the modification time, size, or hash differs from the baseline, but every key you have a pending change on still has the value you read when you started editing it (the outside change touched other keys or the body only), mdgrid takes the current content as the new baseline and writes only your pending values. The outside change is kept, and the message says which notes were merged with changes made outside. In a CSV or TSV ledger this happens when the rows you edited are byte for byte unchanged and only other rows changed.
  • Saving stops. If a key you have a pending change on was also changed outside (in a CSV ledger, if a row you edited changed), it does not write that note. The other notes are still saved. The stopped note keeps its pending changes, and the review screen shows its diff and marks it as changed outside.
  • Write over, or discard. For a stopped note you can choose o to write over the external change, or d to discard your pending changes for that note (the file keeps the external change). Writing over re-reads the file and uses that content as the new baseline only if it is the same content the diff showed you. Then only your edited values are written on top, so the external change to other keys and the body is kept. If the file changed again after you saw the diff, nothing is written and the diff is rebuilt for you to review. You can also go back (Esc or q) and keep the pending changes for later.

mdgrid also marks conflict files from sync tools (names containing .sync-conflict- or conflicted copy), so you can notice them and resolve them by hand.

--apply checks for changes made after an export with a mark per row. CSV and JSON from --print --with-path (and from the export on screen) end with a column _rev, a mark made from each note’s values. If the mark no longer matches when you apply the file, someone (a person, a sync tool, another AI) changed that note after the export, so if the row has any cell that differs from the note, nothing is written. This keeps the old values in your file from undoing their edit; export again and redo the same edit. A file without a _rev column (a CSV made by hand, for example) is compared with the current values as before.

How a file is written

Saving a note follows these steps. If any step fails, the original note is left untouched, the temporary file is removed, and the pending changes are kept.

  1. Check the baseline. mdgrid resolves symbolic links and works on the target file. It refuses a note with more than one hard link or one you have no permission to write, reads the note, and stops if it no longer matches the baseline.
  2. Build and verify the new content in memory. It replaces only the edited value ranges, then reads the result back and checks that each edited key has the intended value, that every other key has the same value and form as before, that no unexpected key appeared, and that the body is unchanged. If any check fails, nothing is written.
  3. Write a temporary file in the same folder. The temporary file is created next to the note (a hidden name starting with . and containing .mdgrid-tmp.), so the final rename stays within one file system. The note’s permissions are copied to it, and on Unix its owner and group as well.
  4. Write, fsync, and read back. The new content is written to the temporary file and flushed to disk with fsync. mdgrid then reads the temporary file back and checks that it matches the verified content byte for byte.
  5. Check again right before replacing. mdgrid checks the hard link count, the write permission, and the baseline once more. If the note changed in the meantime, it stops.
  6. Replace by renaming. The temporary file is renamed over the note. The rename is atomic, so the note is always either the old version or the new one, never half written. mdgrid then fsyncs the folder as well, where the file system supports it.

Some consequences:

  • Symbolic links stay links: mdgrid writes to the file the link points to, and the link itself is unchanged.
  • Permissions are kept: the new file has the same mode (and, on Unix, owner and group) as the old one. If they cannot be copied, the save fails. Only these are kept: because the note is replaced by a new file, extended attributes, ACLs, and the creation time are those of the new file (so the creation time Obsidian shows may change).
  • Notes without write permission (for example mode 0444) are read-only. Replacing by rename needs write permission only on the folder, so mdgrid checks the file itself: if you cannot write to it (mdgrid checks whether the file can be opened for writing, then closes it without writing, so root can still write; on Linux, tools that watch files, for example through inotify’s IN_CLOSE_WRITE, may react to this), every cell of that note is read-only and selecting one shows the reason “書き込めない権限” (no write permission); setting a value on many rows skips that note and counts it. If the permission is removed after you have pending changes for the note, saving stops for that note without writing (its content and mode stay the same), shows the same reason, and keeps its pending changes; other notes are still saved. If the folder itself is not writable, the temporary file cannot be created, so the save fails and the note is unchanged.
  • The new baseline is taken from the temporary file and the verified content before the rename, so a change made by someone else between the rename and the next read is still detected as an external change.

To look at notes without any risk of writing, start mdgrid with --readonly.

Obsidian Bases support

日本語

mdgrid opens an Obsidian Bases file (.base) and shows its table views. .base has no published grammar and its meaning can change between Obsidian versions, so mdgrid aims to get the commonly used parts of the table view right and to say plainly when it meets something it does not understand. It never guesses rows or values.

This page lists what mdgrid reads and what it does not. The lists of functions, methods and file properties below are checked by tests against the expression parser (tests/test_bases_docs.rs): adding a function to the parser without listing it here, or listing a function the parser rejects, fails the tests.

mdgrid never changes an existing .base file. Exporting a view writes a new .base file under a name you choose instead. Unknown keys are ignored rather than reported as errors.

Which notes are searched

The rows come from the root folder the .base belongs to. mdgrid finds the root folder by walking up from the .base file’s folder to the nearest folder that contains .obsidian/, then reads every note under it. If no .obsidian/ folder is found (for example, a root folder copied without its settings), only the .base file’s own folder is searched, so a filter such as file.inFolder("Projects") can match nothing. When that happens and the view is empty, mdgrid says which folder it searched (on the bottom line, and on stderr with --print). To fix it, create an empty .obsidian/ folder in the root folder.

Like Obsidian, mdgrid does not look inside folders whose names start with . (such as .obsidian, .git and .trash). It also skips node_modules, so opening a code repository does not list the documentation of its dependencies. A folder you name on the command line is always searched, even if its name starts with ..

Keys read

Top level:

KeyWhat mdgrid does with it
filtersApplied to every view, combined with the view’s own filters by AND.
formulasNamed expressions. Each one can be shown as a column formula.<name>, used for sorting and grouping, and referenced from other expressions.
propertiesOnly displayName, which becomes the column title. Every other place that names the column uses it too: group headings, the condition chips of the view band, the kanban and gantt titles, the fields of the new note window and the columns of the tree screen. Values written to notes, expressions and settings keep the original key. Keys may be written as status or note.status. Columns without a displayName get Obsidian’s default titles (a formula column shows the formula’s name, file.name shows file name, file.ctime shows created time, and so on). The keys of --print --format json use the same titles.
viewsThe list of views. Each view becomes a tab; the first view opens at startup.
summariesFormula summaries (such as values.mean()) are not evaluated. A view that uses one still opens, and the bottom line names it as unsupported. See Summaries.

Inside a view:

KeyWhat mdgrid does with it
typeMust be table. See View types.
nameThe tab name.
filtersThe view’s own filters.
orderThe columns, in order: note properties (status or note.status), file.* and formula.*. Without order, the columns are file.name followed by every frontmatter key found in the notes.
sortA list of property and direction (ASC or DESC, case-insensitive; anything else means ASC). Earlier entries win.
groupByproperty and direction. Rows are gathered under one heading per value; empty values go under (empty) ((空) in Japanese). Within a group, rows follow sort.
limitA whole number. Applied last, to the total number of rows.
summariesA map from a column (estimate, note.estimate, file.* or formula.*) to a built-in summary name. See Summaries.
summary_labelsA key mdgrid adds (Obsidian ignores it). A map from a column to the name its summary shows instead of the built-in one, in every language: finished: Books makes Filled 13 read Books 13. Only text names are read. See Summaries.
tab_breakA key mdgrid adds (Obsidian ignores it). With true, the row of tabs breaks before this tab. When a shown tab other than the first has it, all tabs go on rows below the search box, whatever the terminal width and display.tab_wrap, and a new row starts here (a row that does not fit wraps within itself). On a hidden tab, the row breaks at the next shown tab. For example, keep the tabs that filter by status and the tabs that filter by due date on separate rows.

filters (both at the top level and in a view) is either an expression string or a map with and, or and not, each holding a list of expression strings or further maps. Several of these keys in one map are combined by AND. not keeps a row when none of its entries is true. Any other key in such a map, or a value of another shape, makes the view fail to open (see Not supported). A filter keeps a row only when its expression is true under the same rules as if: null, false, 0, and an empty string are false.

Sorting by a note property puts values that fit the column’s type first (in the given direction), then values that do not fit (by text, A to Z), then empty values, whatever the direction. Sorting by formula.* or file.* has no column type: values of different types are ordered by type (booleans, numbers, durations, dates and date-times, strings, lists), and DESC reverses that whole order; empty values (null, an empty string, an empty list) still come last. Rows with equal keys keep their original order.

Everything else in the file (for example columnSize, rowHeight, and keys mdgrid does not know) is ignored, but never removed, because mdgrid does not change the file.

View types

Only table is supported. A view with another type (cards, list, map, a plugin’s view, …) or with no type does not open: its tab is still listed, the table area shows the reason, for example cards view "Gallery" is not supported (mdgrid shows table views only), and the bottom line tells you to switch with [ ]. mdgrid does not try to draw these views as a table.

Operators

OperatorMeaning
== !=Equal and not equal, for any type. Values of different types are not equal, except dates (see below). === and !== are read as == and !=.
< <= > >=Order of numbers, strings, booleans, durations, and dates and date-times. A duration compares with a number as milliseconds. Other mixes of types give null.
&& || !And, or, not, using the truthiness rules of if.
+ - * / %Arithmetic on numbers. + also joins strings (and a string with a number). Division by zero and overflow give null.
-x +xUnary minus and plus.
( )Grouping. * / % bind tighter than + -, then comparisons, then == !=, then &&, then ||. Operators of the same level group from the left.
x[i]Item i (counted from 0) of a list.

Date arithmetic:

  • date + or - a duration string, such as due + "1d", today() - "2 weeks", or now() + "1d 3h". Units: y/year, M/month, w/week, d/day, h/hour, m/min/minute, s/sec/second (plurals and yr, hr, hrs, mins, secs also work). Months and years follow the calendar; a day past the end of the month becomes the last day of that month.
  • date + or - a value from duration(), such as due + duration("1d"). duration() values can also be added to and subtracted from each other.
  • date - date gives a duration in milliseconds.
  • duration * or / a number gives a duration (a duration under one second shows as ms). To get a number of days, use number(): number(due - today()) / 86400000.

Values:

  • Literals: strings in "..." or '...' (with \n, \t, \r escapes), numbers, true, false, null, and lists [a, b].
  • References: a bare name or note.name is a frontmatter key; note["a b"] reaches a key with spaces. formula.name (or formula["name"]) is a formula. file.name and the rest are listed under File properties. A missing key gives null.
  • A frontmatter string in the form YYYY-MM-DD is read as a date, and YYYY-MM-DDTHH:MM(:SS) as a date-time in local time, as Obsidian does. today() and now() also use the local time zone. When one side of a comparison or of +/- is a date and the other a string, the string is read as a date too.

An operation on types that do not fit gives null instead of stopping.

Functions

  • if(condition, then, else): then when condition is true, otherwise else. else may be left out, giving null.
  • date(text): reads YYYY-MM-DD as a date and YYYY-MM-DDTHH:MM(:SS) as a date-time; a date passes through; anything else gives null.
  • now(): the current date and time.
  • today(): today’s date.
  • duration(text): reads a duration string such as "1d" or "2 weeks" as milliseconds (a month counts as 30 days and a year as 365).
  • number(value): a duration as milliseconds, a date or date-time as milliseconds since 1970-01-01, true/false as 1/0, and text that reads as a number as that number; anything else is null.
  • max(a, b, ...): the largest of the numbers; null if any value is not a number.
  • min(a, b, ...): the smallest of the numbers; null if any value is not a number.
  • list(value): a list stays as it is; any other value becomes a list with that one item.

Methods

  • contains(value): for a string, whether it contains the text; for a list, whether it has an equal item.
  • containsAll(a, b, ...): whether every value is contained.
  • containsAny(a, b, ...): whether at least one value is contained.
  • isEmpty(): true for null, an empty string and an empty list.
  • toString(): the value as text.
  • lower(): a string in lower case; null for anything else.
  • upper(): a string in upper case, so status.upper() == "ACTIVE" works as a filter.
  • title(): a string with the first letter of each word in upper case and the rest in lower case.
  • trim(): a string without white space at both ends.
  • startsWith(text): whether a string starts with the text.
  • endsWith(text): whether a string ends with the text.
  • slice(start, end): part of a string or a list, from start up to (not including) end. end may be left out; negative numbers count from the end.
  • replace(pattern, replacement): a string with every occurrence of the text pattern replaced. Regular expressions are not supported.
  • split(separator, n): a string cut at the text separator into a list (at most n items when given). Regular expressions are not supported.
  • reverse(): a list in reverse order, or a string with its characters reversed.
  • round(digits): a number rounded to the nearest whole number, or to digits decimal places.
  • floor(): a number rounded down.
  • ceil(): a number rounded up.
  • abs(): the absolute value of a number.
  • date(): a date or date-time as a date (the time dropped).
  • time(): the time of a date or date-time as HH:mm:ss (00:00:00 for a date).
  • format(pattern): a date or date-time as text. The pattern uses Moment’s tokens (English names): YYYY YY Q MMMM MMM MM M DDDD DDD DD Do D dddd ddd dd d e E HH H hh h A a mm ss SSS X x, ISO weeks GGGG WW W, and Sunday-start weeks gggg ww w (the week with January 1 is week 1). Other characters, and anything inside [...], are copied as they are.
  • relative(): how far a date is from today, or a date-time from now, as text in mdgrid’s language: in 14 days, 5 days ago, today, in 3 months, in 1 year. Less than a calendar month is counted in days, less than twelve months in months, and beyond that in years; a part of a month or year is dropped. A date-time less than a day away is counted in hours, less than an hour in minutes, and less than a minute is now. Anything that is not a date gives null. The wording is mdgrid’s own and may differ from what Obsidian shows, so use it to show a column and compare dates with < and today() in filters.
  • nextRun() (added by mdgrid; not in Obsidian): from a routine’s repeat rule (weekly mon, monthly last and so on; see Create routine runs for the forms), the nearest run date from today on (today when today is a run day), as a date. For every 3d, pass the start date: recurrence.nextRun(start). A rule that cannot be read, an empty value, or every without a start gives an empty value. Use it in a formula column to show a routine’s next run without writing it into the note.
  • join(separator): the items of a list as text joined by the separator.
  • unique(): a list without repeated items (the first of each is kept).
  • sort(): a list from smallest to largest.
  • flat(): a list with the lists inside it opened up by one level.
  • asFile(): the note a link points to. It takes a value that is a whole link ([[name]], [text](https://github.com/S6U5/mdgrid/blob/main/docs/path.md), or a path) and an item of file.backlinks (a path from the root folder), and finds the note the same way as file.links. A link that matches no note, and any other value, give null. See Linked notes.
  • filter(condition): the items of a list for which condition is true. Inside condition, value is the item and index its position, counted from 0: [1, 2, 3, 4].filter(value > 2) gives [3, 4]. Elsewhere, and written as note.value, value is still a frontmatter key.
  • map(expression): a list with expression worked out for each item, using the same value and index: [1, 2, 3].map(value * 10) gives [10, 20, 30].
  • reduce(expression, start): one value made from a list. acc starts as start and becomes expression for each item in turn: [1, 2, 3].reduce(acc + value, 0) gives 6.
  • max() (added by mdgrid; Obsidian only has max(a, b, ...) for numbers): the largest number in a list, or, when the list has no numbers, its latest date or date-time. Other items are skipped, and a list with nothing to compare gives null.
  • min() (added by mdgrid): the smallest number in a list, or the earliest date or date-time, in the same way as max().
  • sum() (added by mdgrid): the total of the numbers in a list, skipping other items (0 when there are none).
  • length: the number of characters of a string or items of a list, written without parentheses (tags.length).
  • year: the year of a date or date-time, written without parentheses (due.year). The same goes for the five below.
  • month: the month (1 to 12).
  • day: the day of the month.
  • hour: the hour (0 for a date).
  • minute: the minute (0 for a date).
  • second: the second (0 for a date).

File properties

Values:

  • file.name: the file name with its extension.
  • file.basename: the file name without the extension.
  • file.ext: the extension.
  • file.path: the path from the root folder.
  • file.folder: the folder from the root folder.
  • file.size: the size in bytes.
  • file.mtime: the time the file was last modified.
  • file.ctime: the time the file was created.
  • file.tags: the tags of the note: the frontmatter tags (also tag, Tags, in any case; a list, or text split at commas and spaces) and the #tags in the body.
  • file.links: the notes this note links to, as a list. Links are taken from the body and from frontmatter values: [[name]], [[name|text]], [[name#heading]], ![[name]] and [text](https://github.com/S6U5/mdgrid/blob/main/docs/path.md). Links inside code blocks and inline code are skipped, as are web addresses. Each link becomes the path of the target note from the root folder without .md (for example sub/c). The target is the note at that path from the root folder (a [text](https://github.com/S6U5/mdgrid/blob/main/docs/path) link first tries the path relative to the note’s folder); otherwise the note with that name, and when several notes share the name, the one nearest the root folder (then the shortest path). Case does not matter. A link that matches no note stays as written ([[missing]] gives missing). Each target is listed once.
  • file.backlinks: the notes that link to this note, as a list of their paths without .md (the same link rules as file.links).

Functions on file:

  • file.hasTag(tag, ...): true when the note has any of the tags. A leading # is ignored, case does not matter, and a nested tag a/b also matches a.
  • file.inFolder(folder): true when the note is in that folder or one of its subfolders.
  • file.hasProperty(name): true when the frontmatter has that key.
  • file.hasLink(note): true when the note links to note (a name, a path, or this.file).
  • file.linkedFrom(key, ...) (added by mdgrid; not in Obsidian): the notes whose frontmatter key (any of the keys given) links to this note, as a list of notes in path order. Links in the body and in other keys do not count, which is what sets it apart from file.backlinks: file.linkedFrom("question").length counts only the news notes whose question points at this question.

A note itself is a value too: file on its own is the note of the row, and asFile() gives the note a link points to. A note value takes every name above, so source.asFile().name and value.inFolder("Meetings") work. See Linked notes.

this

When a .base file is opened directly, this is that .base file. this.file gives its path, and this.file.name, this.file.basename, this.file.ext, this.file.path, this.file.folder, this.file.size, this.file.mtime and this.file.ctime give the same values as for a note (this.file.tags is an empty list). For example, file.inFolder(this.file.folder) keeps the notes next to the .base file, and file.links.contains(this.file) keeps the notes that link to it ([[Projects.base]] or [[P/Projects.base]]: a link to the .base file by its name or path gives the same value as this.file). Where there is no .base file to point at (a mdgrid view of a folder), an expression with this is not supported.

Linked notes

A formula can read values from the note a row links to (a lookup) and gather values from the notes that link to the row (a rollup). A reading note can show the author of its book, a book can count its reading notes, and a person can show the date of the last meeting they attended, without anyone copying the value by hand.

formulas:
  # Reading notes: the author and kind of the book in `source`
  author: 'source.asFile().properties.author'
  kind: 'source.asFile().properties.kind'
  # Books: how many reading notes cite this book in `source`
  quotes: 'file.linkedFrom("source").length'
  # People: the last meeting they attended that is done
  met: 'file.linkedFrom("attendees").filter(value.inFolder("Meetings") && value.properties.status == "done").map(value.properties.when).max().date()'

.properties.<key> (or .properties["key"]) on a note value is that note’s frontmatter value, with pending (unsaved) values on top. When that value is a whole link, it becomes the note it points to, found from that note’s folder, so a lookup can go one more step: attendees[0].asFile().properties.org.properties.kind. The names of a note value also work straight on a link text, so source.properties.author is the same as source.asFile().properties.author. A note and a link text are compared by the note they point to: "[[Ana Lima]]" == file and value.properties.attendees.contains(file) both work.

On the screen, a note shows as its name (with display.note_name applied), a date in the date format of dates.format, and a value read with .properties.<key> with the value’s name from [rules.<key>] labels of the current table. --print writes a note as its path from the root folder without .md, the same as file.links.

Only notes under the table’s root folder can be looked up, the same ones file.links and file.backlinks see. A ledger whose tables are narrowed with [table.base] filters reaches every note of the ledger; a table opened on its own folder with path does not see the other folders. The links between notes come from the saved notes, so a link added in a pending value counts once it is saved. They sit in an index that mdgrid builds once per load, so a rollup reads only the notes that link to the row. One cell can use up to 200,000 steps; a formula that goes past that (deeply nested filter and map over long lists) shows the unsupported mark with the reason, and the other cells still show.

Summaries

A view’s summaries adds one row under the table, just above the bottom line. The left column says Summary (集計 in Japanese), and each summarized column shows the summary name and its value, for example Sum 18 or Earliest 2026-10-05, lined up with the column and scrolled with it. Summaries are computed from the rows the view shows now, after its filters, the view settings and the search, so narrowing the table changes the values. Pending (unsaved) values count. A view without summaries has no summary row. In Japanese the names are shown in Japanese (合計 18).

A view with groupBy also shows the summaries of each group, on the right of the group heading, lined up with the columns in the same way (▾ status: done (2) Sum 8). The heading text takes the room before the first summarized column (the note column grows a little, up to its usual limit, so that it fits). A folded group keeps its subtotals, so folding every group gives a list of the totals per group. The summary row under the table stays the total of the whole table. Numbers follow the column’s number format (Sum ¥101,500), except for the counting summaries.

To give a summary your own name, add summary_labels to the view. It is a key mdgrid adds, and Obsidian ignores it.

views:
  - type: table
    name: Open
    summaries:
      estimate: Sum
      due: Earliest
      done: Checked
    summary_labels:
      done: Done

The built-in summaries, as in Obsidian. Values of another type are not counted. When there is nothing to count, a number or date summary is blank; the counting summaries show 0.

NameCountsValue
Averagenumbersthe mean
Minnumbersthe smallest number
Maxnumbersthe largest number
Sumnumbersthe sum
Rangenumbers, or datesMax − Min; for a column of dates, Latest − Earliest as a duration
Mediannumbersthe middle number (the mean of the two middle numbers when the count is even)
Stddevnumbersthe population standard deviation (divided by the count)
Earliestdates and date-timesthe earliest
Latestdates and date-timesthe latest
Checkedbooleansthe number of true
Uncheckedbooleansthe number of false
Emptyanythe number of empty values (null, a missing key, an empty string, an empty list)
Filledanythe number of values that are not empty
Uniqueanythe number of different values that are not empty (the number 1 and the string "1" differ)

Not supported

mdgrid does not evaluate the following. It never guesses a result for them.

  • Every other function and method from Obsidian, for example link(), icon(), image(), and methods such as toFixed(), repeat(), asLink(), linksTo(), keys(), and values(), and a regular expression given to replace() or split(). Obsidian’s list may grow; anything not listed on this page is treated as unsupported.
  • file properties file.embeds and file.file, file.properties on its own and with a method (file.properties.keys(); file.properties.<key> works), and the function link().
  • this other than this.file and its values listed under this, and this for a base embedded in a note (mdgrid only opens .base files).
  • Formula summaries: the top-level summaries (for example customAverage: 'values.mean()') and a view summary that names one, or any name that is not a built-in summary. The view still opens; the bottom line lists it after unsupported: (未対応: in Japanese) and the other summaries are shown.
  • Views other than table: cards, list, map, and plugin views.
  • base code blocks inside notes. mdgrid only opens .base files.

What you see when mdgrid meets one of these (the examples are the English messages; the Japanese screen says the same in Japanese):

  • In filters (top level or view): the view does not open. The table area shows the reason with the name, for example (this view cannot be opened: cannot evaluate the filters of view "Open": unsupported function or field .toFixed() (expression: price.toFixed(2) == "1.00")), and the bottom line says the view cannot be opened. Other views still open; switch with [ ].
  • In a column (formula.* or file.* in order): every cell of that column shows a dim ? instead of a value and cannot be edited. The dim ? is distinct from an empty cell (missing key) and from a real ? value. Selecting such a cell shows the unsupported expression on the bottom line (so you can tell even when the terminal cannot draw dim text), and the column is listed after unsupported: on the bottom line.
  • In sort or groupBy: the key is treated as empty for every row, and the bottom line notes that the view cannot be sorted by it.
  • A formula that refers to a missing formula or to itself in a loop counts as unsupported in the same way.
  • A syntax error in an expression is reported the same way, with the reason instead of a name.