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
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_MS30000Default and maximum run time (100 to 600000) -
SHELL_EXEC_MAX_OUTPUT_BYTES1 MiBCap for stdout and for stderr, each (1024 to 64 MiB)
How to use it
In Graphrt Desktop
- Open Plugins and search for Shell Commands.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
$ graphrt plugin install shell-exec - 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