module

Quartz::Plugin

Plugin: a YAML-declared bundle of new quartz subcommands built out of existing macro step types. Drop foo.yml into ~/.quartz/plugins/ and it registers as quartz foo <args> — no recompile.

Schema (see examples/plugins/*.yml):

name: nfc-dump description: sample NFC workflow version: 1.0.0 commands: - name: nfc-dump description: open NFC, snapshot, exit steps: - app_start: "NFC" - sleep: 1000 - screenshot: "/tmp/nfc.png" - app_exit: true

A plugin file can declare multiple commands. Each command's steps are executed by the same engine as a saved macro (Quartz::Macro#dispatch), so the action vocabulary is identical — no surprises.

Instance methods

ensure_library_dir
Source
find_command(manifests : Array(Manifest), subcommand : String) : Tuple(Manifest, Command) | Nil

Find the plugin command that owns subcommand, if any.

Source
install(src_path : String, force : Bool = false) : String

Install a plugin file by copying it into the library. Refuses to overwrite unless force is true so a typo can't blow away user state.

Source
library_dir
Source
load_all(warn : IO = STDERR) : Array(Manifest)

Load every plugin in the library. Broken manifests are reported but do not abort the CLI — one bad file shouldn't wedge quartz.

Source
parse(path : String) : Manifest
Source
run(manifest : Manifest, cmd : Command, client : Quartz::RPC::Client, & : String -> ) : Nil

Execute a plugin command's steps against a live RPC client by handing them to the Macro replay engine — plugin authors don't have to learn two vocabularies.

Source
uninstall(name : String) : Bool
Source

Nested types