diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-12-26 21:33:19 -0500 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-12-26 21:33:19 -0500 |
| commit | 6ca424510f4d7d9786b624e3f6340d99f58a77ae (patch) | |
| tree | 3b40c81d8b3cce7a0b79ee5c639314d0a9125682 | |
| parent | Release v0.2.0 (diff) | |
| download | subcmd-6ca424510f4d7d9786b624e3f6340d99f58a77ae.zip | |
Update README on why subcmd
| -rw-r--r-- | README.md | 26 |
1 files changed, 10 insertions, 16 deletions
@@ -8,11 +8,15 @@ A simple and flexible subcommand framework for Go, built on top of the standard ## Why subcmd? -- **Simple** - Small 5-method interface and register your commands -- **Familiar** - Built on `flag.FlagSet` -- **Flexible** - Command groups, custom registries, and built-in help system -- **Lightweight** - Zero external dependencies for production use -- **Testable** - Custom registries make testing easy +There are more full-featured CLI libraries for Go, like +[cobra](https://github.com/spf13/cobra). If you need complex features, use one +of those. + +subcmd is a lightweight wrapper around Go's standard library `flag` package. +The entire implementation is a single file with zero production dependencies. +It provides subcommand registration and execution, built-in help and flag +listing commands, and command groups for organization. Because it wraps +`flag.FlagSet`, you use the standard library APIs you already know. ## Installation @@ -67,14 +71,4 @@ Hello, Alice! ## Documentation See the [GoDoc documentation](https://godoc.org/git.sr.ht/~eugenetriguba/subcmd) -for full documentation on: - -- Command interface implementation -- Organizing commands into groups -- Built-in commands (help, commands, flags) -- Custom registries for testing -- Advanced usage patterns - -## License - -See [LICENSE](./LICENSE) file for details. +for full documentation. |