Shell-style programming framework for Go
gloo.foo is a Go framework for building composable, shell-style commands. Create commands that pipe together like Unix utilities, but with Go's type safety, performance, and zero-dependency portability.
// Build pipelines with composable commands
pipeline := gloo.Pipe(
mycommands.Read("input.txt"),
mycommands.Filter(criteria),
mycommands.Transform(options),
mycommands.Write("output.txt"),
)
err := gloo.Run(pipeline)Shell composability meets Go reliability:
- 🐚 Familiar patterns - Commands pipe together naturally
- 🔥 Type safety - Catch errors at compile time
- ⚡ Performance - In-memory operations, no subprocess overhead
- 📦 Zero dependencies - Single binary, works anywhere
- 🧩 Modular - Each command is an independent Go module
- 🌍 Extensible - Third-party commands work seamlessly
go get github.com/gloo-foo/frameworkpackage mycommand
import gloo "github.com/gloo-foo/framework"
type flags struct {
IgnoreCase bool
}
type command gloo.Inputs[gloo.File, flags]
func New(pattern string, parameters ...any) gloo.Command {
return command(gloo.Initialize[gloo.File, flags](append(parameters, pattern)...))
}
func (c command) Executor() gloo.CommandExecutor {
return gloo.Inputs[gloo.File, flags](c).Wrap(
gloo.LineTransform(func(line string) (string, bool) {
// Your processing logic here
return line, true
}).Executor(),
)
}
func IgnoreCase(f *flags) { f.IgnoreCase = true }- 📚 Framework Documentation - Complete guide with patterns and examples
- 🚀 yup.sh Commands - Production-ready command implementations
- 💬 Discussions - Ask questions and share ideas
- 🤝 Contributing - Join the community
Built for developers who want shell power with Go reliability