// Command cletus-plugin creates, checks and runs Cletus plugins. // // cletus-plugin new . [folder] // cletus-plugin check // cletus-plugin run [flags] tools | invoke [json] | ui [json array] | service [json] package main import ( "fmt" "os" ) // sdkVersion is the SDK release new plugins require (tag sdk/). const sdkVersion = "v0.1.0" func main() { if len(os.Args) < 2 { usage() os.Exit(2) } var err error switch os.Args[1] { case "new": err = runNew(os.Args[2:]) case "check": err = runCheck(os.Args[2:]) case "run": err = runRun(os.Args[2:]) case "version": fmt.Println("cletus-plugin", sdkVersion) case "help", "-h", "--help": usage() default: usage() os.Exit(2) } if err != nil { fmt.Fprintln(os.Stderr, "cletus-plugin:", err) os.Exit(1) } } func usage() { fmt.Fprint(os.Stderr, `cletus-plugin builds Cletus plugins. cletus-plugin new . [folder] create a plugin from the template cletus-plugin check run the store's automated checks here cletus-plugin run [flags] run the worker under the test host tools list the chat tools invoke [json] call a chat tool ui [json array] call a screen method service [json] call a provided service flags: -files the folder the user "opened" (default: testdata) -workspace simulate one shared folder backed by this directory -edit the user allows edits (default: read-only) -capability a Cletus feature the user has (repeatable) cletus-plugin version Docs: https://git.eidonix.com/eidonix/cletus-plugins `) }