Files
gastown/internal/cmd/version.go
Steve Yegge 7f29a048a5 chore: set version to 0.0.1
Starting fresh to avoid the Beads versioning mistake.

🤝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 12:47:24 -08:00

31 lines
649 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
"github.com/steveyegge/gastown/internal/style"
)
// Version information - set at build time via ldflags
var (
Version = "0.0.1"
BuildTime = "unknown"
GitCommit = "unknown"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print version information",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(style.Bold.Render("gt") + " - Gas Town CLI")
fmt.Printf("Version: %s\n", Version)
fmt.Printf("Commit: %s\n", style.Dim.Render(GitCommit))
fmt.Printf("Built: %s\n", style.Dim.Render(BuildTime))
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}