Note kit command

template.expand

Expand a template

Answers `markdown` with the template variables (`{{title}}`, `{{date}}`, `{{time}}`, `{{date:FORMAT}}`) filled in, without changing the note; pass the result to `note.write` or `section.insert`.

Kit
Note 0.3.0 (Markdown (.md))
Changes the document
no

Parameters

Parameters of template.expand
NameTypeRequiredDescription
datestringnoThe date and time to use, ISO 8601 (2026-10-23 or 2026-10-23T14:05); now by default.
markdownstringyesTemplate text with {{title}}, {{date}}, {{time}} and {{date:FORMAT}} (YYYY, MM, DD, HH, mm, ss).
titlestringnoWhat {{title}} becomes.

Call through note_run

text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "template.expand", "params": { "markdown": <string> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: date, title. note_run answers the step’s result in completed[i].result.

Result

Result of template.expand
NameTypeRequiredDescription
markdownstringyesThe template with its variables filled in.
Result JSON Schema
json
{
  "additionalProperties": false,
  "properties": {
    "markdown": {
      "description": "The template with its variables filled in.",
      "type": "string"
    }
  },
  "required": [
    "markdown"
  ],
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "date": {
      "description": "The date and time to use, ISO 8601 (2026-10-23 or 2026-10-23T14:05); now by default.",
      "type": "string"
    },
    "markdown": {
      "description": "Template text with {{title}}, {{date}}, {{time}} and {{date:FORMAT}} (YYYY, MM, DD, HH, mm, ss).",
      "type": "string"
    },
    "title": {
      "description": "What {{title}} becomes.",
      "type": "string"
    }
  },
  "required": [
    "markdown"
  ],
  "type": "object"
}

Generated from kition-sdk packages/script/kits/note.ts and the kit itself (kition-note@69e14d9). As data: commands.jsonl.