Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Operators — Write

Write operators are value → world (pass-through). They emit data to the outside world and return the input value unchanged, so downstream operators in the chain continue to see the original value.

Operators

clipboard_text — copy text to clipboard

SyntaxDescription
clipboard_textCopy value to system clipboard (pass-through)

Outer Markdown code fences are stripped before copying. This ensures clean text reaches the clipboard even when the pipeline result is wrapped in a code block.

JSON mode: no-op — see Output Modes.

val:
  - name: result
    data: tag_output
    mods: 'clipboard_text'

clipboard_image — copy image to clipboard

SyntaxDescription
clipboard_imageCopy base64 PNG image to system clipboard (pass-through)

Input must be a base64-encoded image string.

JSON mode: no-op — see Output Modes.

val:
  - name: image
    data: tag_screenshot
    mods: 'clipboard_image'

file — write value to file

SyntaxDescription
file:<path>Write value to file (overwrite)
file:<path>:appendAppend value to file

The path is unescaped for brace-escape sequences. Empty path is a hard error. Write failure is a hard error.

Always passes the input value through, regardless of write outcome.

# Overwrite
val:
  - name: saved
    data: tag_json
    mods: 'file:/tmp/output.json'

# Append
val:
  - name: log
    data: tag_entry
    mods: 'file:/tmp/log.txt:append'

Pass-through behavior

Write operators always return their input unchanged:

input → [write op] → input (side effect: write to clipboard/file)

This means write operators can appear anywhere in a mods chain, and subsequent operators see the original value:

# Save to file AND copy to clipboard
mods: 'file:/tmp/result.txt|clipboard_text'

See Output Modes for details.