Guide for flagx Convert to *flag.FlagSet flagx.FlagSet has a AsStdlibFlagSet() which does this: fset := flagx.NewFlagSet("name") // add flags to fset fs := fset.AsStdlibFlagSet() // fs now has all flags and aliases as fset