
Security News
Inside Lodash’s Security Reset and Maintenance Reboot
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.
:smile: CLI manager library, heavily inspired by ffcli.
This package is originally based on peterbourgon's ff package (Apache2 License).
It implements small changes that don't fit with the original's author Goals and Non-goals.
Changes include:
Command.FlagSetBuilder callback to configure commands and subcommands dynamically and support sharing the same flag targets.flag.ContinueOnError by default instead of flag.ExitOnError.Exec func.DefaultUsageFunc.import (
"context"
"flag"
"fmt"
"log"
"os"
"moul.io/climan"
)
func Example() {
var opts struct {
Debug bool
}
root := &climan.Command{
Name: "example",
ShortUsage: "example [global flags] <subcommand> [flags] [args...]",
ShortHelp: "example's short help",
LongHelp: "example's longer help.\nwith more details.",
FlagsBuilder: func(fs *flag.FlagSet) {
fs.BoolVar(&opts.Debug, "debug", opts.Debug, "debug mode")
},
Exec: func(ctx context.Context, args []string) error {
fmt.Println("args", args)
return nil
},
Subcommands: []*climan.Command{
&climan.Command{
Name: "sub",
},
},
// Options: []climan.Option{climan.WithEnvVarPrefix("EXAMPLE")},
}
if err := root.Parse(os.Args[1:]); err != nil {
log.Fatal(fmt.Errorf("parse error: %w", err))
}
if err := root.Run(context.Background()); err != nil {
log.Fatal(fmt.Errorf("run error: %w", err))
}
}
TYPES
type Command struct {
Name string
Exec func(context.Context, []string) error
FlagsBuilder func(fs *flag.FlagSet)
Subcommands []*Command
ShortUsage string
ShortHelp string
LongHelp string
// Has unexported fields.
}
func (c *Command) Parse(args []string) error
func (c *Command) Run(ctx context.Context) error
go get moul.io/climan
See https://github.com/moul/climan/releases

I really welcome contributions. Your input is the most precious material. I'm well aware of that and I thank you in advance. Everyone is encouraged to look at what they can do on their own scale; no effort is too small.
Everything on contribution is sum up here: CONTRIBUTING.md
Pre-commit script for install: https://pre-commit.com
Thanks goes to these wonderful people (emoji key):
Manfred Touron 🚧 📖 ⚠️ 💻 | moul-bot 🚧 |
This project follows the all-contributors specification. Contributions of any kind welcome!
© 2021 Manfred Touron
Licensed under the Apache License, Version 2.0
(LICENSE-APACHE) or the MIT license
(LICENSE-MIT), at your option.
See the COPYRIGHT file for more details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.

Security News
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.

Security News
The U.S. government is rolling back software supply chain mandates, shifting from mandatory SBOMs and attestations to a risk-based approach.