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 (
3939 logFile := viper .GetString ("log-file" )
4040 readOnly := viper .GetBool ("read-only" )
4141 exportTranslations := viper .GetBool ("export-translations" )
42+ logCommands := viper .GetBool ("enable-command-logging" )
43+
4244 logger , err := initLogger (logFile )
4345 if err != nil {
4446 stdlog .Fatal ("Failed to initialize logger:" , err )
4547 }
46- logCommands := viper . GetBool ( "enable-command-logging" )
48+
4749 if err := runStdioServer (readOnly , logger , logCommands , exportTranslations ); err != nil {
4850 stdlog .Fatal ("failed to run stdio server:" , err )
4951 }
5052 },
5153 }
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+ }
5262)
5363
5464func init () {
@@ -70,6 +80,7 @@ func init() {
7080
7181 // Add subcommands
7282 rootCmd .AddCommand (stdioCmd )
83+ rootCmd .AddCommand (versionCmd )
7384}
7485
7586func initConfig () {
You can’t perform that action at this time.
0 commit comments