Documentation

CLI reference / Maintain

cumaru tag

Read, write, and audit semantic tag bodies in Markdown files.

Synopsis

cumaru tag [<file>] [get|set <tag> [<content>]]
cumaru tag get|set [<file>] <tag> [<content>]
cumaru tag all [--body]

Arguments and options

Argument or optionMeaning
<file>A .md file relative to .cumaru/. Default: the root index.md.
get <tag>Print the body of a tag.
set <tag> [<content>]Replace the body with positional content or stdin.
all [--body]List every tag name, or every body, in every .cumaru/ Markdown file.

Side effects

  • Writes: set rewrites one host file through a staged rename. Other modes are read-only.
  • Network: None.

Behavior

  • Without get or set, the command audits the file: it prints the declared tags and the tags present, and reports mismatches.
  • get and set refuse a tag that config.yaml does not declare for the host. Exception: reference needs no declaration.
  • Bodies are opaque: tag never parses tables or links. The cumaru: prefix is implicit.
  • set checks that the result is balanced and the host did not change concurrently. A failure keeps the original file.

Example

cumaru tag get domain.md components

Failures

  • Exit 1: audit mismatch, undeclared tag, unbalanced or crossing tags, or traversal defect.

Sources: docs/tag.md; cumaru tag --help of CLI 0.15.3.

Back to all commands