func Run(name string, version string) error {
	cmd := &cobra.Command{
		Use:           name,
		Long:          fmt.Sprintf("Name:\n  %s - a simple tool for creating and organizing daily notes on the command line", name),
		SilenceUsage:  true,
		SilenceErrors: true,
		RunE: func(cmd *cobra.Command, args []string) error {
			return open.CreateOpenCmd().Execute()
		},
	}
	cmd.AddCommand(
		open.CreateOpenCmd(),
		archive.CreateArchiveCmd(),
		config.CreateConfigCmd(),
		initialize.CreateInitCmd(),
	)
	setVersion(cmd, version)
	setHelp(cmd, name)
	return cmd.Execute()
}
Run executes the CLI
package cmd
import (
	"fmt"
	"strings"
	"github.com/dkaslovsky/textnote/cmd/archive"
	"github.com/dkaslovsky/textnote/cmd/config"
	"github.com/dkaslovsky/textnote/cmd/initialize"
	"github.com/dkaslovsky/textnote/cmd/open"
	pkgconf "github.com/dkaslovsky/textnote/pkg/config"
	"github.com/spf13/cobra"
)