Scriby Pro Agent CLI

Use scribyctl with local Drafts and Snippets

scribyctl talks to the running Scriby app over a local Unix socket. It supports read queries, explicit writes, template fill, and Markdown-to-HTML output without opening a localhost port or reading data.json directly.

Requirements and executable path

  • Scriby must be running.
  • scribyctl status can report whether Pro is locked.
  • Draft, Snippet, tag, search, fill, HTML stdout, and write commands require Scriby Pro.

The bundled CLI lives at:

/Applications/Scriby.app/Contents/MacOS/scribyctl

For a shorter command, add that directory to your shell path or create a local symlink you control.

Query Drafts, Snippets, and tags

# Report app and Pro lock state
scribyctl status

# Print the current Draft
scribyctl draft

# Search body text and saved tag metadata
scribyctl snippets "#reply client"

# Print one saved Snippet by UUID
scribyctl snippet <id>

# List saved tag names
scribyctl tags

Use --json for machine-readable output. Snippet search supports --limit N or --all. Query and render commands are read-only and do not open the Panel.

Fill variables or render HTML to stdout

# Fill variables and print text
scribyctl draft --fill client=Acme --fill date=2026-07-12

# Fill first, then print escaped Markdown-derived HTML
scribyctl snippet <id> --fill client=Acme --html

# Ask for missing values in a transient local overlay
scribyctl draft --interactive
  • --fill writes filled text to stdout only.
  • --html writes escaped HTML to stdout only.
  • Only explicit --interactive may open a transient Variables overlay and return text or HTML to scribyctl.
  • Blank values without a fallback keep their original placeholders.

Fill and HTML output never copy to the clipboard, paste into another app, open a file, or replace saved template source.

Explicit write commands

# Replace or append Draft text
scribyctl draft replace --text "New draft"
printf '%s' "More text" | scribyctl draft append --stdin

# Clear Draft after explicit confirmation
scribyctl draft clear --yes

# Create or update a saved Snippet
printf '%s' "Saved reply" | scribyctl snippet create --tag reply --stdin
scribyctl snippet <id> update --text "Updated body" --keep-tags

# Change tag metadata on one Snippet
scribyctl snippet <id> tags add --tag client

# Rename or delete one tag globally
scribyctl tags rename old-name new-name
scribyctl tags delete old-name --yes

CLI write commands are explicit Draft, Snippet, or tag metadata commands. They mutate local Scriby data through the running app and synchronously flush the result to disk.

Destructive write commands require --yes. If the target saved Snippet has a dirty open edit, update or delete returns busy unless you intentionally pass --force.

Local bridge boundaries

  • The bridge uses scriby-agent-bridge.sock under Scriby's app-support location and never opens a TCP or localhost port.
  • The CLI never reads or writes data.json directly and never falls back to offline file access.
  • It cannot copy, paste, import, export, create backups, sync, upload data, or open local files.
  • Default commands do not open the Panel. Only explicit interactive fill can open a transient Variables overlay.
  • The Agent CLI does not expose memory-curve review metadata.

Exit codes

CodeMeaning
0Success
1Usage error
2Running app or bridge unavailable
3Snippet not found
4Protocol or internal error
5Scriby Pro required
6Interactive fill cancelled
7Target or interactive flow busy

Built-in help

scribyctl --help
scribyctl --version
scribyctl draft --help
scribyctl snippet --help
scribyctl tags --help

Use the built-in help as the syntax authority for the version installed on your Mac.