Skip to content

yigit433/kommando

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Kommando Go Report Card

Simple and usable cli tool for golang.

Installation

go get github.com/yigit433/kommando

Example

package main

import (
    "fmt"
    "github.com/yigit433/kommando"
    "github.com/yigit433/kommando/types"
)

func main() {
    app := kommando.NewKommando(types.Config{
        AppName: "Kommando Test App",
    })

    app.AddCommand(
        &types.Command{
            Name:        "test",
            Description: "Hello world test example!",
            Flags:       []types.Flag{
                types.Flag{&[]bool{false}[0], "isbool", "description..", "bool"},
            },
            Aliases:     []string{"t"},
            Execute:     func(res *types.CmdResponse) {
                fmt.Println("Hello world!")
            },
        },
    )

    app.Run()
}