Graphrt

Shell Commands

Run allowlisted local executables with argument arrays (never a shell) in allowed directories, with a clean environment, timeouts that kill the whole process group, output caps and secret redaction, for workflow nodes, agents only for exact paths and argument patterns allowed by SHELL_EXEC_TOOL_RULES

Stable v0.1.0 Node.js 1 action
Use in Graphrt Desktop

About

A Graphrt plugin that runs allowlisted local executables with an argument array, for workflow steps that have no dedicated plugin (a build script, a converter, a report generator). It is designed for workflow nodes. Agent tool calls are refused unless a rule in SHELL_EXEC_TOOL_RULES allows that exact executable and argument list.

What it can do

  • run_command: command (base name or absolute path from SHELL_EXEC_COMMANDS), args (array, passed as-is), cwd (inside SHELL_EXEC_ALLOWED_DIRS), env (nodes only), stdin, command_timeout_ms, fail_on_error.
  • Result: command, args, cwd, exit_code, signal, stdout, stdout_truncated, stderr, stderr_truncated, duration_ms. A non-zero exit is a result, not an error, unless fail_on_error: true.

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • Run an allowlisted command shell-exec.run_command

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • SHELL_EXEC_COMMANDS (required)
    Comma-separated absolute executable paths that may run, e.g. /usr/bin/pandoc,/usr/local/bin/report
  • SHELL_EXEC_ALLOWED_DIRS (required)
    Comma-separated directories (absolute or ~/...) that may be the working directory, the first is the default
  • SHELL_EXEC_TOOL_RULES (none: no agent calls)
    JSON array of rules for agent calls, see below
  • SHELL_EXEC_TIMEOUT_MS 30000
    Default and maximum run time (100 to 600000)
  • SHELL_EXEC_MAX_OUTPUT_BYTES 1 MiB
    Cap for stdout and for stderr, each (1024 to 64 MiB)

How to use it

In Graphrt Desktop

  1. Open Plugins and search for Shell Commands.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install shell-exec
workflow.yaml
- id: report
  type: shell-exec.run_command
  command: /usr/local/bin/report
  args: ["--format", "text", "--month", "{{#start.month#}}"]
  cwd: reports
  command_timeout_ms: 10000
  fail_on_error: true
Plugins in the docs