Files
Alessandro ScandoneandGitHub 5dfc34cd3c feat: feature flag syntax (#120)
* feat: feature flag syntax

* feat: change syntax

* feat: reject invalid features

* feat: add static check of unknown features

* feat: more defensive args handling

* fix: fix typo
2026-03-04 13:32:35 +00:00

38 lines
632 B
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
type CliOptions struct {
Version string
}
var rootCmd = &cobra.Command{
Use: "numscript",
Short: "Numscript cli",
Long: "Numscript cli",
CompletionOptions: cobra.CompletionOptions{
DisableDefaultCmd: true,
},
}
func Execute(options CliOptions) {
rootCmd.Version = options.Version
rootCmd.AddCommand(lspCmd)
rootCmd.AddCommand(mcpCmd)
rootCmd.AddCommand(checkCmd)
rootCmd.AddCommand(getTestCmd())
rootCmd.AddCommand(getTestInitCmd())
rootCmd.AddCommand(getRunCmd())
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}