File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -39,16 +39,26 @@ var (
39
39
logFile := viper .GetString ("log-file" )
40
40
readOnly := viper .GetBool ("read-only" )
41
41
exportTranslations := viper .GetBool ("export-translations" )
42
+ logCommands := viper .GetBool ("enable-command-logging" )
43
+
42
44
logger , err := initLogger (logFile )
43
45
if err != nil {
44
46
stdlog .Fatal ("Failed to initialize logger:" , err )
45
47
}
46
- logCommands := viper . GetBool ( "enable-command-logging" )
48
+
47
49
if err := runStdioServer (readOnly , logger , logCommands , exportTranslations ); err != nil {
48
50
stdlog .Fatal ("failed to run stdio server:" , err )
49
51
}
50
52
},
51
53
}
54
+
55
+ versionCmd = & cobra.Command {
56
+ Use : "version" ,
57
+ Short : "Print version information" ,
58
+ Run : func (_ * cobra.Command , _ []string ) {
59
+ fmt .Printf ("GitHub MCP Server\n Version: %s\n Commit: %s\n Build Date: %s\n " , version , commit , date )
60
+ },
61
+ }
52
62
)
53
63
54
64
func init () {
@@ -70,6 +80,7 @@ func init() {
70
80
71
81
// Add subcommands
72
82
rootCmd .AddCommand (stdioCmd )
83
+ rootCmd .AddCommand (versionCmd )
73
84
}
74
85
75
86
func initConfig () {
You can’t perform that action at this time.
0 commit comments