Skip to content

bob capture-templates

List, save, show, and manage saved capture templates

bob capture-templates --help
List, save, show, and manage saved capture templates

Bare `bob capture-templates` runs the read-only list.

Usage: bob capture-templates [COMMAND]

Commands:
  clear   Clear the saved-template shelf
  delete  Delete templates by list index or content id
  list    List saved capture templates (default)
  save    Save a template definition without capturing a row
  show    Print one template as a ready-to-insert draft

Options:
  -h, --help  Print help

Examples:
  bob capture-templates list -f json
  bob capture-templates show 1
  bob capture-templates save '@@template:\nApply {0}\n\n'
  bob capture-templates delete 1
  bob capture-templates clear

Store: ${XDG_STATE_HOME:-~/.local/state}/bob-cli/capture/templates.json (override: BOB_CAPTURE_TEMPLATES_FILE).
See docs/capture.md § Saved templates.
Run 'bob capture-templates <command> --help' for more information.

bob capture-templates clear

Clear the saved-template shelf

bob capture-templates clear --help
Remove the shelf and its corrupt-file quarantine copy. This is also the recovery path when a newer bob has written the shelf schema.

Usage: bob capture-templates clear [OPTIONS]

Options:
  -f, --format <FORMAT>
          Output format: human or json

          [default: human]
          [possible values: human, json]

  -h, --help
          Show help

Example:
  bob capture-templates clear -f json

bob capture-templates delete

Delete templates by list index or content id

bob capture-templates delete --help
Delete one or more entries. TEMPLATE is a 1-based list index (one or two digits) or a content id. Deleting a missing entry succeeds.

Usage: bob capture-templates delete [OPTIONS] <TEMPLATE>...

Arguments:
  <TEMPLATE>...
          1-based list index or content id

Options:
  -f, --format <FORMAT>
          Output format: human or json

          [default: human]
          [possible values: human, json]

  -h, --help
          Show help

Examples:
  bob capture-templates delete 1
  bob capture-templates delete 1 9c1f0e2a7b3d -f json

bob capture-templates list

List saved capture templates (default)

bob capture-templates list --help
List the bob-owned saved `@@template:` blocks. The command is read-only. Bare `bob capture-templates` runs this list.

Usage: bob capture-templates list [OPTIONS]

Options:
  -f, --format <FORMAT>
          Output format: human or json

          [default: human]
          [possible values: human, json]

  -h, --help
          Show help

Examples:
  bob capture-templates
  bob capture-templates list -f json
  bob capture-templates show 1

bob capture-templates save

Save a template definition without capturing a row

bob capture-templates save --help
Save one template definition from TEXT or stdin. Only definition errors are checked; missing rows and row errors are ignored. A successful save does not increment use_count. `--template-origin` is an internal checkout id used by Bob Mac Capture.

Usage: bob capture-templates save [OPTIONS] [TEXT]...

Arguments:
  [TEXT]...
          Template draft; multiple args are joined with spaces; unknown `--flag` before `--` is rejected

Options:
  -f, --format <FORMAT>
          Output format: human or json

          [default: human]
          [possible values: human, json]

  -h, --help
          Show help

Examples:
  bob capture-templates save '@@template:\nApply to {0} @job^apply-{1}\n\n'
  cat template-draft.txt | bob capture-templates save -f json

bob capture-templates show

Print one template as a ready-to-insert draft

bob capture-templates show --help
Print the selected template as an unstyled `@@template:` draft. TEMPLATE is a 1-based list index (one or two digits) or a content id.

Usage: bob capture-templates show [OPTIONS] <TEMPLATE>

Arguments:
  <TEMPLATE>
          1-based list index or content id

Options:
  -f, --format <FORMAT>
          Output format: human or json

          [default: human]
          [possible values: human, json]

  -h, --help
          Show help

Examples:
  bob capture-templates show 1
  bob capture-templates show 9c1f0e2a7b3d -f json
Tested rolling snapshot bob-cli 41afa14 bob-mac-capture 556bb67 bob-plugins af1e691 Built 2026-10-24T22:34:13Z (zensical) build.json