Skip to content

Files and schemas

~/Library/Application Support/molt/
File Purpose Format Created when
config.toml Interpreter and application settings TOML First configuration load when missing, or Settings save
notebooks.json Saved cell source for all four tabs Compact JSON First persistable notebook change after load

The code falls back to a relative working-directory path only if the operating system configuration directory cannot be resolved.

A representative file is:

notebooks.json
{
"version": 1,
"tabs": [
{
"tabIndex": 0,
"cells": [
{
"id": "0f4a9e9a-72de-4b04-a180-56e0c44fbf05",
"type": "code",
"source": "value = 21\nvalue * 2"
}
]
},
{
"tabIndex": 1,
"cells": [
{
"id": "1ec4e25e-81e4-4b44-8429-07ff095e8052",
"type": "code",
"source": ""
}
]
},
{
"tabIndex": 2,
"cells": [
{
"id": "97f8ef11-6248-4cd8-bc4f-e1386ec69cc0",
"type": "code",
"source": ""
}
]
},
{
"tabIndex": 3,
"cells": [
{
"id": "9b87faef-1524-4f13-b64d-8a0cf4701303",
"type": "code",
"source": ""
}
]
}
]
}
Field Type Meaning Validation on load
version Number Persistence format marker; writer emits 1 Must equal 1
tabs Array Persisted tab entries Must be an array
tabIndex Number Identifies Tab 1 through Tab 4 as indices 0 through 3 Unique integer from 0 through 3
cells Array Ordered cell records Empty array is replaced with one fresh code cell
id String Stable cell identity, normally a browser-generated UUID Nonempty and unique across all tabs
type code or markdown Reserved cell kind Restored, but UI still renders a Python editor
source String Raw Python source Restored verbatim

The writer strips:

  • executionCount
  • outputs
  • state
  • Notebook kernelState
  • Notebook executionCounter
  • Global activeTab
  • Focus and command-mode state
  1. Molt reads the file, or treats a missing file as a first launch.
  2. It validates the version, tabs, indices, cells, IDs, types, and sources.
  3. Valid matching tabs restore their ordered cell sources.
  4. Outputs, execution labels, and Python state begin fresh.
  5. The loaded snapshot is not immediately rewritten when nothing has changed.

If reading or validation fails, Molt shows a warning and disables autosave so the existing file is not overwritten with defaults.

  • The JSON is serialized without presentation whitespace.
  • Writes occur after a 1.5-second debounce.
  • Identical persistable snapshots are skipped.
  • Saves are serialized so older writes cannot finish after newer ones.
  • Molt creates the directory if necessary and atomically replaces the file through a temporary file.
  • A pending write is attempted when the app closes, but native Quit does not wait for it.

There is no cross-process file lock, backup rotation, or built-in history. Avoid concurrent manual edits.