Popularity
4.8
Stable
Activity
0.0
Declining
165
4
17

Programming language: Go
License: MIT License
Tags: Command Line     Standard CLI    
Latest version: v1.0.4

clîr alternatives and similar packages

Based on the "Standard CLI" category.
Alternatively, view clîr alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of clîr or a related project?

Add another 'Standard CLI' Package

README

A Simple and Clear CLI library. Dependency free.

Features

  • Nested Subcommands
  • Uses the standard library flag package
  • Auto-generated help
  • Custom banners
  • Hidden Subcommands
  • Default Subcommand
  • Dependency free

Example

package main

import (
   "fmt"
   "log"

    "github.com/leaanthony/clir"
)

func main() {

    // Create new cli
    cli := clir.NewCli("Flags", "A simple example", "v0.0.1")

    // Name
    name := "Anonymous"
    cli.StringFlag("name", "Your name", &name)

    // Define action for the command
    cli.Action(func() error {
        fmt.Printf("Hello %s!\n", name)
        return nil
    })

    if err := cli.Run(); err != nil {
        fmt.Printf("Error encountered: %v\n", err)
    }

}

Generated Help

$ flags --help
Flags v0.0.1 - A simple example

Flags:

  -help
        Get help on the 'flags' command.
  -name string
        Your name

Documentation

The main documentation may be found here.

License Status

FOSSA Status


*Note that all licence references and agreements mentioned in the clîr README section above are relevant to that project's source code only.