johnsonolly4184 downloadsLive calculation tables, lab snippet forms and a hazard header for a chemistry lab notebook.
Live calculation tables, lab snippet forms and a hazard header for a chemistry lab notebook in Obsidian.
Lab Kit turns a plain note into an experiment page: a hazard table built from your chemical notes, tables that calculate like a spreadsheet, and pop-up forms that write the tables you use every day (solutions, recipes, RAFT, sampling timetables, NMR / GPC / DLS sample tables). It started as a PhD lab notebook; the vocabulary is a chemistry lab's, but nothing stops you using it for anything that needs small calculations in a note.
[!note] Beta Lab Kit is a beta: the planning kit and the multi-kit system are new and not yet tested by many people. Report problems on GitHub.
```calc blocks with Excel-style formulas (SUM, XLOOKUP, IF, …), references between tables, and MW() read from your chemical notes. Click a cell to edit; everything that depends on it updates. While you type a formula each reference gets its own colour, the cell it points at is outlined in that colour, and the column letters and row numbers show.[[ in a calc cell and the reagent/solvent fields of the forms suggest them, by note name or by the names in a note's Names property. New chemical makes a chemical note with a name and a class.```rig block draws the rig figure (symbols and lines, on a white card, no Mermaid) from their ID and Feeds columns and redraws when they change. **New rig** makes one from the Rig template in your Rigs folder. A batch setup (a stirred vessel, no pumps) is a Reactor row with a Heater and a Stirrer row feeding it. **Save snapshot…** under the block saves a dated picture of the rig (<rig> YYYY-MM-DD.svg in a <rig> history folder beside the note, with the parts tables inside the file) and adds a row to the note's ## Rig history table; the block says when the rig has changed since the last snapshot. In **Figure…** you can drag parts by hand; **Save layout** writes their places as plain lines in a ```rig-layout block under the rig block, Reset to automatic goes back. All of it stays readable without Lab Kit: see Recovering rig records without Lab Kit.Needs Obsidian 1.14 or newer. Templater is still used by some note templates (project, concept, topic hub) until they move into Lab Kit; the snippet forms, to-dos, meetings, lab entries and chemicals no longer need it. Check setup… (step 3) lists every plugin the kits use, which are needed and which are optional, and what each is for (Dataview belongs to the planning kit); Lab Kit never installs a plugin for you.
ABC0016-A). Until then the snippets use XX.The full walk-through, with every feature explained, is the tutorial. What changed in each version: changelog.
0016 - Batch esterification) with a hazard table, a data-folder button and five sections: Objectives, Apparatus, Procedure, Results / Analysis, Notes for next time.[[DCM]]). The hazard table fills in from each chemical note's H_Phrase list.raft, sol, nmr), press Enter, fill in the form, press Enter. The table appears in your note.A ```calc block holds a Markdown table that behaves like a small spreadsheet.
```calc
name: sol1
title: Stock solution
| Item | MW | mass (mg) | mmol |
|---|---|---|---|
| [[DCM]] | =MW(A2) | 250 | =C2/B2 |
```
sol1!D2, SUM(sol1!D2:D4)).SUM AVERAGE STDEV SLOPE INTERCEPT RSQ MIN MAX COUNT COUNTA PRODUCT SUMPRODUCT ROUND ROUNDUP ROUNDDOWN INT ABS SQRT POWER EXP LN LOG LOG10 MOD PI IF IFERROR AND OR NOT CONCAT MATCH INDEX XLOOKUP CLOCK MW PROP. MW("DCM") reads the molecular weight from a chemical note, PROP("PABTC", "Density") any property, CLOCK("10:30", 90) gives a clock time 90 minutes later.name, title, icon, decimals, sig, grid, copy, codes. See the tutorial.excel_to_calc.py script turns the sheets of an .xlsx into calc blocks, formulas included (tutorial section 5).Set Chemical folder to the folder that holds your chemical notes (one note per chemical). Lab Kit then uses them in three places:
MW() and PROP() read the note's properties (MW from the property you choose in Molecular weight property, or MW, Mr, Molecular weight and similar).[[ in a calc cell, or in a reagent, solvent, monomer, CTA or initiator field of a form, suggests your notes by file name or by their Names property (a list or a single value). A name found through Names inserts [[Note|name]].H_Phrase property.The command New chemical asks for the chemical's name, then its class (a list of the classes your notes already use; type a new one, or pick no class), and makes the note from the Chemical database template (no Templater needed).
Give a chemical a Chemical class (a list property: solvent, monomer, initiator, CTA, or a class of your own; plain text works too). Form fields that ask for a class (Solvent, Monomer, CTA, Initiator) then suggest those chemicals first; switch on Only suggest chemicals of the asked class to hide the others. Reagents and solutes stay unfiltered.
A chemical note is an ordinary note with properties, for example:
---
Names:
- dichloromethane
- methylene chloride
MW: 84.93
Density: 1.33
H_Phrase:
- H315
- H336
---
Put the cursor where you want the table, press Alt+S, pick a snippet, fill in one form, press Enter. Forms start empty (grey placeholders show what to type), and submitting an untouched form inserts nothing.
| Snippet | Use it for |
|---|---|
| Solution prep | An acid (or base) solution for a target pH, made by mass: a small window at the cursor asks for the aqueous phase, target pH, reagent (a chemical note with Purity or Concentration, Density, pKa, Acid / base), the share made as acid solution and used, and your balance; it inserts a live ```solution block with numbered steps. You type the masses you weighed into the block's Actual cells; the estimated pH follows. **Edit set-up** changes the set-up later. (The old volume tables are still available as a snippet with run: solution-volume.) |
| Recipe by equivalents | Planning amounts from equivalents relative to any reagent; the first amount in mmol, g or M; solvent "rest" row; total mass and wt% |
| RAFT recipe generator | RAFT / PISA: monomer mass, DP, CTA:I, solids → every mass, solvent (and optional co-solvent), theoretical Mn |
| Variant naming matrix | A grid of conditions, with sample codes ABC0016-A, -B… |
| Sample list · Sampling timetable | Sample codes, with target clock times for kinetics (add the analysis tables below afterwards) |
| NMR / GPC / DLS samples · your own methods | Sample tables with machine, checklist and result columns. The sample codes come from every table in the note that holds codes; with more than one, Codes from picks which |
| Combined results | One row per sample with the results of every method |
| Flow column prep · Residence times | Packing a column, reactor volume, flow rates. Pick a solvent and leave the density empty, and the density is read from that chemical's note |
| Rig | Links the rig note, puts a dated snapshot of the rig at the cursor (![[<rig> YYYY-MM-DD.svg]] with the caption Snapshot of <rig>, <date> in italics; an unchanged rig reuses its latest snapshot) with the rig note's Summary table under it, if it has one, sets the Rig and Rig snapshot properties and copies the parts tables under Flow platform setup at the bottom of the note (a Setup heading property on the rig note changes the heading, e.g. for a batch rig) |
| Blank calc table | Your own columns |
Choose which snippets you want in Manage files… (each has a Use toggle). Icons for the Alt+S menu are a setting. Seven snippets (Variant naming matrix, Sample list, Sampling timetable, Flow column prep, Residence times, Blank calc table, Rig) are plain notes with a header of questions and {{tokens}} in the text, so you can read and edit them: syntax in docs/snippet-syntax.md.
One note per method in your Methods folder, with a Columns property, gives you a sample table of your own (mass spec, XRD, TGA, …), a Results property chooses what goes into Combined results, and one note per machine fills in defaults. Each method appears in the Alt+S menu by itself. NMR, GPC and DLS are built in. Details and an example: tutorial section 6.1.
A ```lab-header block shows, for the note it is in:
back: false in the block hides it);<data folder root>/<note name> and opens it (desktop only; set the root in Settings → Lab Kit → Lab notebook).It only redraws when this note's Chemicals or a linked chemical note changes. The command Insert lab header block adds one; the Lab Book template already has it. Every option is in Settings → Lab Kit → Hazards and can be overridden for one note with lines inside the block (layout: table, collapsed: false, …): see tutorial section 4.
Rig records are plain files, so they can be read if Lab Kit is switched off or no longer supported:
Rig and Rig snapshot properties, the embedded snapshot picture (Obsidian shows it on its own) and the parts tables under Flow platform setup..svg (in the <rig> history folder beside the rig note) in any web browser for the picture; in a text editor, its <metadata> holds the parts tables and the layout as they were that day.## Rig history lists every snapshot with its date and change; the parts tables are the rig's current state; the ```rig-layout block lists hand-placed parts as ID: x, y.```rig block shows as an empty code block: expected, it never held data.The templates (Lab Book, Alt+S menu, one file per snippet), the Templater scripts and a CSS snippet are bundled inside the plugin. Updating the plugin brings the new kit, but your files only change when you say so:
icon: line is updated with your icon kept (the row says Only your icon changed: kept.).The kit is split into two kits, each with its own files, state and switch: the lab kit (Lab Book template, snippets, scripts; on by default) and the planning kit (homepage, to-do board, projects, meetings, knowledge notes; off until you switch it on). Review, Manage and Update work per kit.
The kits expect these folders. Each is a setting; empty means the default below, and a folder you rename inside Obsidian is followed by its setting.
| Folder (default) | Used by | Setting |
|---|---|---|
03 Lab Book/Notes |
lab kit: experiment notes | Lab notes folder |
05 Chemicals/Chemicals |
lab kit: chemical notes | Chemical folder |
03 Lab Book/Methods (a new vault; a vault set up before 2026-10-21 keeps an empty setting until you set it) |
lab kit: analysis methods | Methods folder |
03 Lab Book/Rigs |
lab kit: rig notes | Rigs folder |
| Figures folder (empty: the rig note's own folder; made when first saved to) | lab kit: rig figure SVG and PNG files | Figures folder |
Module pack folder (empty: the built-in symbols; see docs/rig-pack-symbol.md) |
your own rig symbols (SVG / PNG) and Pack list.md |
Module pack folder |
00 Inbox · 01 Daily Notes |
planning kit | Planning folders |
00 Planning (to-dos in 00 Planning/To-dos) |
planning kit | Planning folders |
02 Projects · 06 Knowledge · 07 How-tos · 08 Meetings |
planning kit | Planning folders |
99 Archive (made when first needed) |
planning kit | Planning folders |
Extras/Templates (note templates) · Extras/Snippets (Alt+S snippets) · Extras/scripts |
both kits | Setup → Kit folders |
The kit's first install makes these folders (a vault set up before keeps its own: an older vault has its snippets in <templates>/Snippets). The generated starter (see Development) holds only the Obsidian settings, the plugin list and the install scripts.
Settings → Lab Kit is searchable and grouped. A name in bold with several settings after it in brackets is a sub-menu: a row that opens its own page.
| Group | What is in it |
|---|---|
| Updates | Update available, Kept files with a newer kit version, Lab kit (Manage files, Review update, Update all safe files), Planning kit switch and its files, update notice, What's new, Backups (Old backups with Clear old backups…, Backup folder) |
| Setup | Check setup… (its Fix sets up Templater), Check hotkeys…, Find moved folders…, Kit folders (Templates folder, Scripts folder, Snippets folder), Folder templates (which folders Lab Kit fills new notes in, and with which template), console log |
| Lab notebook | Initials; Lab notes folder, Chemical folder, Rigs folder, Figures folder, Module pack folder; Data folder root (one for Windows, one for macOS / Linux); Molecular weight property; Checklist progress (writes progress, for example 3/7 ticked check boxes, into the properties of lab notes and the Shopping list so a board card can show it; off by default); Board colours (Colour board columns: kanban columns coloured by status, Planned, Started, Processing results, Closed, with a colour for each) |
| Snippets | Methods folder; Only suggest chemicals of the asked class; Open snippet forms at the cursor (on: Alt+S question windows open under the cursor on desktop; off: in the middle of the window); one switch per Alt+S group (Make up, Samples, Characterise, Flow, Tables and My snippets (your own snippets and groups it does not know): Show these snippets in the Alt+S menu. Off hides the group, its entries in the search and in Recent; no file is removed) |
| Hazards | Layout, property names, collapsed / legend / sorting options |
| Planning (planning kit on) | Due-date countdown (Off / every to-do with a due date: days left on the board card; a vault set to the old "only to-dos with countdown: true" reads as every to-do), Project plan map direction (left to right, or top to bottom), Freeze meeting notes automatically (on: a meeting note is frozen the day after its date, only its generated lists, never your text; off: only the command and Tidy freeze), Planning folders (Inbox, Daily notes, Planning, Projects, Literature, Knowledge, How-tos, Meetings, Archive; empty = the default, e.g. 02 Projects; the row says how many are changed, for example "2 of 9 changed") |
Folder settings left empty are detected; the data folder roots are empty until you set them. Rename or move folders inside Obsidian and the folder settings follow; a folder moved outside Obsidian (Finder, File Explorer, a sync tool) is found again with Find moved folders. Settings changed on another device (Obsidian Sync, iCloud, Dropbox, Syncthing, Git) are read again when they arrive.
Open the command palette and type Lab Kit. There are no default hotkeys: Check hotkeys can set the suggested ones, only when you press its button and confirm.
| Command | Does |
|---|---|
| Insert empty calc block | Adds a small example calc table at the cursor |
| Insert lab header block | Adds the hazard / data-folder header at the cursor |
| New lab entry | A new experiment note from the Lab Book Template in your Lab notes folder |
| New chemical | Asks the chemical's name, then its Chemical class; makes the note from the Chemical database template in your Chemical folder |
| New rig | Asks the rig's name; makes the note from the Rig template in your Rigs folder and opens it |
| Clone experiment | Copies the open lab note (or one you pick) into a new numbered lab note and opens it: properties, objectives, apparatus, procedure, rig and tables are kept with the sample codes renumbered; Status goes back to Planned, dates and Outcome are emptied, free text under Results / Analysis and Notes for next time is cleared. The title box starts with the old title and the new note gets a Cloned from link to the old one. The old note is not changed. Not seen in Obsidian yet |
| Review kit files | Opens the update preview |
| Manage kit files | Opens the list of kit files |
| Show what's new | Opens the What's new popup for this version |
| Find moved folders | For each folder in the settings that no longer exists (moved outside Obsidian), suggests where it went; Apply changes only the settings |
| Check hotkeys | Reports the keys the Hotkeys note recommends for the kit's functions and what Obsidian has now (also a button in Settings → Lab Kit). Set the suggested keys… lists the commands that have no key and whose suggested key is free, each with a tick box, and sets those after you confirm; a key you have is never changed or removed |
| Check setup | Lists what the kits need (plugins and Obsidian's Bases and Daily notes, kit files that are missing or have an update waiting, Lab Kit's settings, Templater and its scripts, Meta Bind buttons, the homepage and its read-only mode, the Daily notes folder and date format, Dataview's inline queries, property types, meeting series, CSS snippets, folders) with a Fix where Lab Kit can make the change; nothing changes until you confirm. The window stays open behind the windows it opens; Check again redraws it |
| Tidy up notes | Shows the notes of an existing vault that don't match the kit layout, before and after; every rule and every note has a tick box, and Change notes… rewrites only what you tick, after a backup and a second confirmation. Unchanged lines are folded and a change that is the same in several notes is shown once, with one tick box. One rule, Hubs: bring the page up to the current template, rewrites the page of project, topic and meeting series hubs from the kit's templates (keeping a project's goal and Related text and a topic's intro) and is never ticked by default |
With the planning kit on (Settings → Lab Kit → Updates), these are added. Open meeting deck is desktop only.
| Command | Does |
|---|---|
| New to-do | A to-do note in the Planning folder's To-dos |
| Quick capture | An empty note in the Inbox, opened |
| Add to shopping list | Adds comma-separated items to Shopping list.md in the Planning folder |
| Sort inbox | Opens each Inbox note in turn and asks where it goes (to-do, a project, Knowledge, How-tos, Meetings, archive, delete, skip); in a folder list you can type a new folder name. Esc or Stop ends it |
| Add result | Sets the one-line result of the to-do you have open (shown on its plan map card) |
| Link to-dos in order | Select a list of [[to-do]] links in a note; each to-do then comes after the one before it (a preview first, Undo afterwards) |
| Archive old to-dos | Moves to-dos finished more than 30 days ago into the Archive folder, except those of a project that is not Done |
| New meeting series | Asks name, how often, day, date of the first meeting, the deck path and (optional) the name of your own meeting note template; makes the series folder under Meetings and its hub note. Also a button on the Meetings hub |
| New meeting · New one-off meeting · New extra meeting now | A note for a meeting series (asks which when there are several); a one-off meeting uses the smaller kit template One-off meeting; New extra meeting now (the Extra meeting now button on each series hub) adds a meeting on a date you give without moving the schedule. A series hub's template property names your own meeting note template |
| Open meeting deck | Opens the deck location of this computer: set in the series' note (deck_windows / deck_mac) as a folder with all the decks in, or the path to one deck file. On a series hub or a meeting note it opens that series' deck; from any other note it asks which series |
| New project · New project note | A project hub (its top row has New to-do, New note, a Status drop-down, a Deadline date and the countdown), or a note inside a project, linked to its hub |
| New concept | A knowledge note: asks title and topic, files it in the Knowledge folder under the topic. The New concept button on a topic hub skips the topic question |
| New topic hub | The index note of a topic folder under Knowledge (kind: hub, named like the folder): pick a topic without one, or type the name of a new topic; a text area for what the topic is about, then a list of its notes. Project, topic and series hubs start with a back link to the hub one folder up, which follows folder renames |
| Roll over to-dos now | Carries unfinished to-dos over to today |
| Open to-do board | Opens the to-do board in the Planning folder |
lab-kit folder inside it), Templater's template folder when it is empty (Set up only), and the Alt+S template in Templater's hotkeys. A Check setup Fix changes one thing, after its own confirmation: Templater's folder templates, its template matching mode (only from None) and the old roll-over entry in its startup templates; Obsidian's Properties in document (to Hidden) and the type of the properties due, deadline and priority (values in notes are not changed); with the planning kit, Meta Bind's button templates (adds the missing ones; a second Fix puts the kit's action back on a kit button that does something else), Notebook Navigator's homepage (only when none is set) (ZotLit's templates and settings are set up by the Refpane plugin, not by Lab Kit). Check hotkeys → Set the suggested keys… sets Obsidian hotkeys for the commands you leave ticked, only where the command has no key and the key is free. Tidy up notes can change Templater paths and Meta Bind buttons that point at a renamed folder or an old template, only the ones you tick, after a backup.<data folder root>/<note name> on your computer and opens it in your file manager, only when you press it. The root is empty until you set it in Settings → Lab Kit → Lab notebook. Nothing else reads or writes outside your vault.Calc tables, the hazard header and the built-in kit work on mobile. The data-folder button is desktop only: on mobile the header shows "Data folder: desktop only". Snippet forms need Templater. The planning kit's Open meeting deck and the plan map's Picture for a slide are desktop only.
| Problem | Fix |
|---|---|
| Alt+S does nothing, or the forms ask one question at a time | Install Templater, run Check setup… and Fix the Templater rows (Settings → Lab Kit → Setup), and set the Alt+S hotkey |
#NOTE? in an MW cell |
No chemical note with that name: check the spelling, or type the MW over the formula |
#PROP? in an MW cell |
The note has no molecular weight property (set Molecular weight property) |
#REF! |
The formula points at a deleted row, or a table name that doesn't exist or is used twice |
| A calc table looks like plain code | Lab Kit isn't enabled |
| Hazard table empty | Chemicals property empty, or the chemical notes have no H_Phrase list |
| A homepage or hub button does nothing, or shows "Button ID not found" | Check setup… → Fix on the Meta Bind buttons row, then restart Obsidian (Meta Bind loads its buttons at start-up) |
| "Folder … not found", or homepage lists empty after moving folders outside Obsidian | Command Find moved folders (or Check setup → Find): pick where each folder went |
More in the tutorial.
Found a bug or want a feature? Open an issue and say what you did, what you expected and what happened (a screenshot of the table helps). Pull requests are welcome; run npm test and npm run lint first.
npm install
npm run dev # builds into test-vault/.obsidian/plugins/lab-kit/ and watches
npm test # vitest
npm run lint
npm run build
npm run starter # new-vault settings + plugin list, from the kits, into dist/starter/
npm run tidy-fixture writes test-vault-tidy/, a small vault of old-style notes (from tests/fixtures/) to try Tidy up notes on; open it as its own vault, never your real one.
npm run starter writes dist/starter/: empty contract folders, Obsidian settings (plugin list, CSS snippets, Alt+S, Templater folders) and install-plugins.sh / .ps1, generated from the kits so they can't drift. Copy it into an empty folder, run the install script with Obsidian open, then Check setup. Steps in GETTING-STARTED.
Open test-vault/ as a vault in Obsidian to try changes. Never develop in your real vault. The kit files live in kits/ and are embedded in main.js at build.
MIT, see LICENSE.