Skip to content

The .base file

Where BaseStudio keeps its settings in a .base file, for people and agents who edit the YAML.

A .base file is YAML. Obsidian defines its own keys. BaseStudio adds one more key, basesStudio, for settings such as column types, option colors, board settings and record templates. Obsidian ignores this key, so the file stays a valid Obsidian Base.

To change records, use the command line or the MCP server, not the YAML. To change views and layouts that the command line cannot change, you can edit the YAML. BaseStudio shows the change at once.

BaseStudio reads and writes Obsidian’s own keys. It never copies them into basesStudio.

  • At the top of the file: filters, formulas, properties, views and summaries.
  • In each view: type, name, filters, order, sort, limit, groupBy, rowHeight, columnSize and summaries, and the settings of Obsidian’s cards and list layouts.
basesStudio: # for the whole Base
version: 1
palette: default
properties:
note.status:
type: select
options:
- { value: Shortlist, color: green-sea } # a palette color, "#RRGGBB" or none
- { value: Bought, category: done } # todo, active, waiting or done
pills: { mode: status, style: solid }
default: Shortlist
note.project:
type: link
linkTarget: projects/Projects.base # the Base that the link picker lists
rules: [] # conditional formatting for every view
templates:
- id: 9a1e
name: Bug report
properties: { status: Open, priority: 3 }
body: "## Steps\n\n## Expected\n"
views:
- type: table
name: Board
basesStudio: # for this view only
id: 3f2c
renderer: board
board: { labels: true }
defaultTemplate: 9a1e
columns:
note.notes: { wrap: true, style: { tone: faint } }
  • version: the version of the block. A block with a higher version than BaseStudio knows opens to read only.

  • palette: the color palette of the pills.

  • properties: for each property, its type, options (each with value and optional label, color, category, key and description), pills, text style, default value, linkTarget, and its display settings: display (number, percent, currency or progress), numberFormat, currency, dateFormat, zeroAsDash, ratingMax, ratingIcon and imageSize (medium or large; an Image or Attachment column without it shows small images that fit the row). Native properties.<id> also holds displayName and description.

  • rules: conditional formatting rules for every view. Each rule has an id, a name, enabled, its conditions in filters (an expression, or an and, or or not group, as in the view’s filters), and target: cell or row. A cell rule names the cell to format in propertyId. The style is color ({ kind: preset, name } or { kind: custom, hex: "#RRGGBB" }), backgroundOpacity, fontColor, bold, strikethrough and overridePillColors. For example:

    rules:
    - id: 7b1d
    name: Due is overdue
    enabled: true
    filters: date(due).date() < today()
    target: cell
    propertyId: note.due
    color: { kind: preset, name: pomegranate }
    backgroundOpacity: 18

    Rules from older versions saved propertyId, operator and operand instead of filters. BaseStudio reads them and saves them in the new form when a rule changes.

  • detailLayouts: the saved layouts of detail views.

  • templates: the record templates.

  • images: the image settings of a database (compression: original or compressed, and downloadRemote).

  • tasks: the task roles of a to-do list: which property is the status, the next step, the context, the importance, the scheduled and due dates, the parent task, the activity and the done date. Only a table of a .basestudio database can have this block. Its layouts array holds the named layouts that lists share (see A to-do list).

The type values are text, number, rating, checkbox, date, datetime, url, email, select, multiSelect, tags, link, list, image and attachment.

  • id: a stable id for the view.
  • renderer: the layout of a view that Obsidian stores as a table: board, timeline, calendar, form, chart, mindmap or detail. Task lists use the structure below.
  • The settings of that layout: board (including subColumns, rows, showEmptyRows, hideEmptyColumns), timeline, calendar, form, chart (type can be bar, line, pie or table), mindmap or tasks (see A to-do list).
  • A Calendar Bases view (type: calendar) keeps its startDate, endDate and weekStartDay in the plugin’s own keys. BaseStudio reads and writes them there, and keeps its other calendar settings in basesStudio.calendar.
  • Columns: columns (wrap and style for each column), columnOrder, frozenColumnCount, autoFit.
  • Grouping: additionalGroups (the second and third levels), showGroupCounts, showEmptyGroups, groupStyle, defaultCollapsed, pinnedGroups, groupLaneWidth, verticalGroupTitles.
  • Records: manualRowOrder, defaultTemplate, rules.
  • Filters: pinnedFilters, filterBarColumns, showFilterBar.
  • Display: horizontalGridlines, verticalGridlines, headerLines, newRowButton.
  • Saving: autosave (true saves each change at once; without it, both task layouts and database views keep a draft) and draft: the view’s unsaved changes, a full copy of the view without its name, id, autosave and defaultTemplate. BaseStudio shows the draft; Obsidian shows the saved keys. See Save a view.

A to-do list has saved lists and named layouts. A list chooses tasks with its filters. A layout chooses how those tasks show: display, columns, sort, groups, widths and formatting. Lists can share a layout. Changing that layout changes its display in every list that uses it.

The example shows the required role mappings and one layout; property definitions are left out:

basesStudio:
tasks:
status: note.status_todo
next: note.next_step_todo
context: note.comments_todo
importance: note.priority_todo
scheduled: note.scheduled_date_todo
due: note.due_date
parent: note.parent_todo
activity: note.activity_todo
doneDate: note.done_date_todo
layouts:
- name: By status
order: [file.name, note.next_step_todo, note.due_date]
sort: [{ property: note.due_date, direction: ASC }]
groupBy: { property: note.status_todo, direction: ASC }
basesStudio:
id: by-status
display: { current: board }
views:
- type: list
name: Today
filters: "scheduled_date_todo == today()"
basesStudio:
renderer: tasks
tasks: { view: by-status, icon: today }
  • basesStudio.tasks.layouts holds layout maps. Their settings have the same keys as database views. Each layout’s basesStudio block holds its stable id, display, manual, autosave and draft.
  • display.current is list, board, table, calendar or timeline (default: list).
  • display.list.open is inline (default) or drawer. Calendar settings are in display.calendar; Timeline settings are in display.timeline.
  • A list’s basesStudio.tasks.view names its layout by ID. Its name, filters, limit, icon and default record template belong to the list. Its filters save at once. A layout can keep unsaved display changes in its own draft.
  • Grouping is on the layout’s groupBy and additionalGroups, for all its displays. Column widths, field order, conditional formatting and the filter bar also belong to the layout.

Older tasks.display, tasks.views and per-list display settings are read for compatibility. Opening a Base does not rewrite them. The next layout edit stores the current layout structure. Use the app or the command line for changes to a to-do list; do not copy an older YAML example into a current database.

  • It changes only the keys that changed, and keeps the rest of the file as you wrote it, with its comments.
  • It merges its change with changes that another app made to the file at the same time, field by field.
  • It keeps keys that it does not know.

When you edit the YAML by hand, check it:

Terminal window
basestudio check "Vault/Tasks.base"
basestudio check "Vault/Tasks.base" --fix

--fix repairs the safe problems: tabs for indentation, keys that are there two times, YAML aliases and anchors, and tags that are not necessary.