Szymon's Language Overengineered Parser. A Go-based CLI tool for infrastructure orchestration using the Slopfile
slop parses Slopfile definitions to automate shell commands, environment variable management, and database seeding.
It is designed to replace repetitive bash scripts with a structured DSL.
Used to set internal state or driver settings.
config::name.key["value"]- Static assignment.config::name.key[$env.VAR]- Dynamic assignment from system environment.
source::env["path/to/.env"]- Loads a.envfile into the process environment for subsequent variable interpolation.
var::namespace.name["value"]- Defines a reusable string.- Variables are referenced using the
$prefix (e.g.,$namespace.name).
run::seed["path/to/file.sql"]- Executes a MariaDB seed command using the provided SQL file.
Tasks currently only support run commands
# Setup a task
@my-cool-task {
run::seed["/path/to/seed.sql"]
run::seed["/path/to/another/seed.sql"]
run::seed["/path/to/yet/another/seed.sql"]
}
# Run the task like a variable
run::task[$my-cool-task]Slopfile does not populate tasks that are empty
and slop command won't recognize them
@empty-task {
# won't get rendered anywhere / slop cli won't recognize it
}Note
Tasks currently cannot be nested in themselves due to parser constraints
Tasks can invoke an infinite circular cycle: @a calling run::task[$b] and @b calling run::task[$a] will cause an infinite runtime loop.
# Configure database credentials via environment
config::db.user[$env.DB_USER]
config::db.password[$env.DB_PASSWORD]
# Or via env sourced here
source::env[".env"]
# Define seed paths
var::seed.rbac["/app/seed.sql"]
# Execute seeding
run::seed[$seed.rbac]
- Build the binary:
go build -o slop
- Execute:
./slop
Default behavior: looks for Slopfile in the execution directory.
Releases are automated via goreleaser on tag pushes.
Cut a new release:
git tag v0.1.0
git push --tagsThe GitHub Actions release workflow builds Linux/macOS binaries (amd64 + arm64), publishes them as a GitHub Release, and attaches checksums.
Install from a release:
curl -L https://github.com/thegroobi/slop/releases/latest/download/slop_Linux_x86_64.tar.gz | tar xz
sudo mv slop /usr/local/bin/