A Squadron plugin that gives agents the ability to execute shell commands. Supports local execution, remote execution over SSH, and execution inside Docker containers.
plugin "shell" {
source = "github.com/mlund01/plugin_shell"
version = "v0.0.1"
}Execute a shell command on the configured target.
| Parameter | Type | Required | Description |
|---|---|---|---|
command |
string | yes | The shell command to execute |
timeout |
integer | no | Timeout in seconds (default: 120, 0 = no timeout) |
The plugin supports three execution modes configured via plugin settings.
Execute commands on the local machine:
plugin "shell" {
source = "github.com/mlund01/plugin_shell"
version = "v0.0.1"
settings = {
mode = "local"
shell = "bash" # optional, defaults to bash (unix) or cmd (windows)
}
}Execute commands on a remote host over SSH:
plugin "shell" {
source = "github.com/mlund01/plugin_shell"
version = "v0.0.1"
settings = {
mode = "ssh"
host = "10.0.0.5"
user = "deploy"
port = "22" # optional, default 22
key_file = "/path/to/key" # preferred over password
password = vars.ssh_password # fallback if no key_file
shell = "bash" # optional
}
}Execute commands inside a running container or a fresh container from an image:
# Attach to a running container
plugin "shell" {
source = "github.com/mlund01/plugin_shell"
version = "v0.0.1"
settings = {
mode = "docker"
container = "my-app"
shell = "sh" # optional, defaults to sh
}
}
# Create a container from an image
plugin "shell" {
source = "github.com/mlund01/plugin_shell"
version = "v0.0.1"
settings = {
mode = "docker"
image = "ubuntu:24.04"
}
}Assign the plugin's tools to an agent:
agent "ops" {
model = models.anthropic.claude_sonnet_4
role = "DevOps engineer"
tools = [plugins.shell.all]
}See LICENSE.