Root object
A Seristack configuration is a YAML document containing a
stacks list.
stacks:
- name: system-health
count: 1
cmds:
- echo "system-health is good"
| Attribute | Type | Required | Description |
|---|---|---|---|
stacks |
list | yes | List of stack definitions. |
Stack attributes
Each item under stacks represents an executable
Seristack stack.
| Attribute | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Unique name of the stack. Used by CLI selection, dependencies, HTTP routing, MCP registration, and execution results. |
description |
string | no | Human-readable description of the stack. Used when exposing stacks through MCP. |
method |
string | no |
HTTP method associated with the stack,
such as GET or POST.
|
urlPath |
string | no | HTTP URL path associated with the stack. |
workDir |
string | no | Working directory used when executing the stack. |
continueOnError |
boolean | no | Controls whether execution continues after a command failure. |
dependsOn |
list[string] | no | Names of stacks that must be resolved before this stack. |
vars |
list | no | Variable definitions and validation rules. |
matchAccess
HTTP
|
string | no |
Controls how multiple access rules are evaluated:
ANY or ALL.
|
access
HTTP
|
list | no | Identity-header authorization rules for the stack. |
executionMode |
string | no | Controls how repeated executions and commands are scheduled. |
count |
integer | no | Number of execution iterations. |
shell |
string | no | Shell implementation used for command execution. |
shellArg |
string | no | Argument passed to an external shell. |
cmds |
list[string] | no | Commands or scripts executed by the stack. |
timeouts |
string | no | Execution timeout represented as a Go duration string. |
output |
string | no | Optional output-processing command. |
discardOutput |
list[string] | no | Output/result keys to discard from the registry. |
Variables
Variables are declared with the vars list.
They can be referenced by stack commands through the Seristack
variable template syntax.
vars:
- name: env
value: staging
required: true
allowed_value:
- staging
- production
| Attribute | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Name of the variable. |
value |
string | no | Default value. |
allowed_value |
list[string] | no | Restricts the value to the specified values. |
denied_value |
list[string] | no | Rejects specified values. |
allowed_regex |
string | no | Restricts the value using a regular expression rule. |
denied_regex |
string | no | Rejects values matching a regular expression rule. |
required |
boolean | no | Requires the variable to have a valid value. |
Example
vars:
- name: environment
value: staging
required: true
allowed_value:
- staging
- production
- name: version
required: true
allowed_regex: regex("^[a-zA-Z0-9._-]+$")
- name: command
denied_regex: regex("(?i)rm|delete|drop")
Variables are normalized when the configuration is loaded. Validation rules are then applied when values are resolved for execution.
Do not place passwords, API tokens, private keys, or other secrets in stack variables when audit logging is enabled. Prefer environment variables or a secrets manager.
Dependencies
A stack can depend on one or more other stacks using
dependsOn.
stacks:
- name: build
cmds:
- ./build.sh
- name: test
dependsOn:
- build
cmds:
- ./test.sh
- name: deploy
dependsOn:
- test
cmds:
- ./deploy.sh
Seristack resolves the dependency graph before execution. Dependencies allow larger workflows to be composed from smaller stacks.
Execution modes
| Mode | Purpose |
|---|---|
PARALLEL |
Execute independent work concurrently. |
STAGE |
Execute iterations concurrently while preserving command ordering within an iteration. |
PIPELINE |
Execute iterations sequentially while allowing command-level concurrency. |
SEQUENTIAL |
Execute work sequentially. |
Choose the execution mode based on whether command ordering, iteration ordering, or concurrency is important to the workflow.
Timeouts
The timeouts field controls the maximum duration
allowed for command execution.
timeouts: 30s
500ms
500 milliseconds
30s
30 seconds
5m
5 minutes
1h
1 hour
1h30m
1 hour 30 minutes
2.5h
2 hours 30 minutes
Go duration units include
ns, us, µs,
ms, s, m, and h.
Shell settings
Seristack can execute commands using its supported shell execution
mechanisms. The shell and shellArg fields
allow an external shell to be selected where supported.
Example: Bash
shell: bash
shellArg: -c
Example: PowerShell
shell: powershell
shellArg: -Command
Shell commands execute with the permissions of the Seristack process. Run Seristack with the minimum operating-system privileges required by the configured workflows.
Commands, output, and registry
cmds
The cmds field contains the commands executed by
the stack.
cmds:
- |
echo "starting"
./script.sh
echo "finished"
output
The output field can be used to process accumulated
stack output.
output: |
echo '{{.Self.result}}' |
grep "^{" |
jq -s '{records: ., total: length}'
discardOutput
Use discardOutput to remove selected output/result
entries from the registry after execution.
discardOutput:
- build
- test
HTTP behavior
A stack can be associated with an HTTP endpoint using
method and urlPath.
stacks:
- name: deploy
method: POST
urlPath: /deploy
cmds:
- ./deploy.sh
Request variables
HTTP requests can provide declared variables through supported request inputs such as query parameters, request bodies, and headers.
# Query parameter
curl "http://127.0.0.1:8080/deploy?env=staging"
# JSON body
curl -X POST http://127.0.0.1:8080/deploy
-H "Content-Type: application/json"
-d '{"env":"staging","version":"v1.2.3"}'
Only variables declared in the stack's vars
configuration should be treated as supported external inputs.
Audit logging
Structured JSON audit logging can be enabled from the command line.
seristack run \
--config config.yaml
--audit-log /var/log/seristack/audit.log
Audit entries can contain information such as:
- Timestamp
- Event type
- Stack name
- HTTP path and method
- Source IP when available
- Identity information
- Variables
- Success or failure
- Execution duration
- Output and error information
{
"timestamp": "2026-09-19T10:00:00Z",
"event": "stack_executed",
"stack": "system-health",
"path": "/health",
"method": "GET",
"success": true,
"duration_ms": 42,
"output": "system-health is good"
}
Querying logs
# Failed executions
jq 'select(.success == false)'
/var/log/seristack/audit.log
# Slow executions
jq 'select(.duration_ms > 30000)'
/var/log/seristack/audit.log
# Executions for a specific stack
jq 'select(.stack == "system-health")'
/var/log/seristack/audit.log
Do not put secrets into stack variables when audit logging is enabled. Variables and execution information may be recorded in the audit trail.
MCP behavior
Seristack can expose configured stacks through the Model Context Protocol (MCP).
seristack mcp \
-t streamableHTTP
--addr 127.0.0.1
--port 8081
Stacks with a description can be registered as
MCP tools. Declared variables can be provided as tool arguments.
For remote MCP deployments, place the MCP server behind a trusted HTTPS and authentication layer such as nginx, oauth2-proxy, or another gateway.
Recommended deployment
MCP client / IDE
│
▼
HTTPS
│
▼
nginx / authentication proxy
│
├── TLS
├── Authentication
└── Identity propagation
│
▼
Seristack MCP
127.0.0.1:8081
│
▼
Stack execution
Security considerations
Seristack executes shell commands on the machine where it runs. Treat the configuration as executable operational code.
- Bind Seristack to localhost or a private network when possible.
- Put an authenticated reverse proxy or gateway in front of remotely accessible HTTP and MCP endpoints.
- Use HTTPS/TLS for remote access.
- Do not trust identity headers directly from public clients.
- Apply per-stack authorization to sensitive workflows.
- Run the process with the minimum operating-system privileges required.
- Avoid putting credentials or secrets in YAML variables.
- Review shell commands before exposing them through HTTP or MCP.
- Protect and rotate audit logs.
Testing
Run the complete Go test suite with:
go test ./...
To force all tests to execute instead of using Go's test cache:
go test -count=1 ./...
For verbose output and individual test execution times:
go test -count=1 -v ./...
Run tests for a specific package:
go test -count=1 -v ./pkg/opsy
Run the race detector:
CGO_ENABLED=1 go test -race ./...
The -count=1 flag disables reuse of cached test
results for that invocation, making the reported package
duration the result of the current test execution.
Complete example
stacks:
- name: build
description: Build the application
count: 1
executionMode: SEQUENTIAL
timeouts: 10m
cmds:
- ./build.sh
- name: test
description: Run application tests
dependsOn:
- build
count: 1
executionMode: SEQUENTIAL
timeouts: 10m
cmds:
- ./test.sh
- name: deploy-production
description: Deploy the application to production
method: POST
urlPath: /deploy/production
dependsOn:
- test
matchAccess: ALL
access:
- headerName: X-Auth-Request-Groups
headerValue:
- platform
- sre
- headerName: X-Auth-Request-Roles
headerValue:
- admin
count: 1
executionMode: SEQUENTIAL
timeouts: 10m
vars:
- name: version
required: true
allowed_regex: regex("^[a-zA-Z0-9._-]+$")
- name: environment
value: production
required: true
allowed_value:
- staging
- production
cmds:
- |
echo "Deploying {{.Vars.version}}"
echo "Environment: {{.Vars.environment}}"
./deploy.sh "{{.Vars.version}}" "{{.Vars.environment}}"
output: |
echo '{{.Self.result}}'
- name: cleanup
description: Cleanup temporary resources
dependsOn:
- deploy-production
count: 1
executionMode: SEQUENTIAL
timeouts: 30s
cmds:
- ./cleanup.sh
discardOutput:
- deploy-production
Start the HTTP server
seristack run \
--config config.yaml
--addr 127.0.0.1
--port 8080
--audit-log /var/log/seristack/audit.log
Start the MCP server
seristack mcp \
-t streamableHTTP
--addr 127.0.0.1
--port 8081