diff options
Diffstat (limited to 'internal/cli')
| -rw-r--r-- | internal/cli/root.go | 1 | ||||
| -rw-r--r-- | internal/cli/version.go | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/internal/cli/root.go b/internal/cli/root.go index 5c6184e..e57a9d9 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -74,6 +74,7 @@ func NewRootCmd() *cobra.Command { newStartCmd(), newCreateCmd(), newReportCmd(), + newVersionCmd(), ) return cmd diff --git a/internal/cli/version.go b/internal/cli/version.go new file mode 100644 index 0000000..789416a --- /dev/null +++ b/internal/cli/version.go @@ -0,0 +1,18 @@ +package cli + +import ( + "fmt" + + "github.com/thepeterstone/claudomator/internal/version" + "github.com/spf13/cobra" +) + +func newVersionCmd() *cobra.Command { + return &cobra.Command{ + Use: "version", + Short: "Show the version of claudomator", + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("claudomator version %s\n", version.Version()) + }, + } +} |
