diff --git a/api.go b/api.go
index 4b4cc8d268f8f957fca91016d219c3796bdf2c1c..145e092d87bfb701684c95e0c1b80435ef1e2ad2 100644
--- a/api.go
+++ b/api.go
@@ -24,10 +24,16 @@ func Execute[C any](cmd C) *Settings[C] {
 	return execute(cmd, noShadow{}, os.Args[0], os.Args[1:])
 }
 
+// PrintFlagOutput prints the flag output to the standard output.
 func (s *Settings[C]) PrintFlagOutput() {
 	fmt.Println(s.command.flagSet.Output())
 }
 
+// GetFlagOutput returns the flag output.
+func (s *Settings[C]) GetFlagOutput() {
+	fmt.Println(s.command.flagSet.Output())
+}
+
 // execute is the internal implementation of ExecuteWithShadow.
 func execute[C any, D any](cmd C, cnf D, name string, args []string) *Settings[C] {
 	instance := New(name, cmd)