CLI client for the spel daemon.
Parses command-line arguments into JSON commands, sends them to the daemon over a Unix domain socket, and pretty-prints the results.
If the daemon isn't running, it auto-starts one in the background.
Usage: spel open https://example.com spel snapshot spel click @e1 spel fill @e2 "search text" spel screenshot shot.png spel close
CLI client for the spel daemon. Parses command-line arguments into JSON commands, sends them to the daemon over a Unix domain socket, and pretty-prints the results. If the daemon isn't running, it auto-starts one in the background. Usage: spel open https://example.com spel snapshot spel click @e1 spel fill @e2 "search text" spel screenshot shot.png spel close
Help text for each CLI command. Keys are primary command names.
Help text for each CLI command. Keys are primary command names.
(ensure-daemon! session opts)Ensures a daemon is running and responsive for the given session. Starts one if needed. Handles:
Ensures a daemon is running and responsive for the given session. Starts one if needed. Handles: - No daemon running → start fresh - Daemon running headless but --interactive requested → restart headed - Stale daemon (process alive but socket broken) → kill and restart - Dead daemon (PID file exists but process gone) → clean up and restart
(parse-args args)Parses CLI argv into a command map suitable for sending to the daemon.
Returns a map with :command and :flags. :command is the action map to send to the daemon. :flags contains global options like :session, :json.
Parses CLI argv into a command map suitable for sending to the daemon. Returns a map with :command and :flags. :command is the action map to send to the daemon. :flags contains global options like :session, :json.
(run-cli! args)Main CLI entry point. Parses args, ensures daemon, sends command, prints result.
Returns the response map (for programmatic use) or nil on error.
Main CLI entry point. Parses args, ensures daemon, sends command, prints result. Returns the response map (for programmatic use) or nil on error.
(send-command! session command-map)(send-command! session command-map timeout-ms)Sends a JSON command to the daemon and returns the parsed response.
Connects to the daemon's Unix domain socket, writes one JSON line,
reads one JSON response line, and closes the connection.
timeout-ms controls how long to wait for a response (default 30000ms).
Sends a JSON command to the daemon and returns the parsed response. Connects to the daemon's Unix domain socket, writes one JSON line, reads one JSON response line, and closes the connection. `timeout-ms` controls how long to wait for a response (default 30000ms).
(top-level-help)Returns the top-level help string shown by spel --help.
Returns the top-level help string shown by `spel --help`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |