on main help sign in
update mainter email
commitf879a94c95678592060b3ade1d78f69f18c5866e authorKujtim Hoxha <kujtimii.h@gmail.com> dateWed 23 Apr 2025, 12:26 (2 years ago) parent6d05d5a
2 files changed+9−3
.goreleaser.yml+3−3 cmd/root.go+6
.goreleaser.yml+3−3
@@ -32,9 +32,9 @@ snapshot:
3232aurs:
3333 - name: opencode
3434 homepage: "https://github.com/opencode-ai/opencode"
35− description: "Deploy anything"
35+ description: "terminal based agent that can build anything"
3636 maintainers:
37− - "opencode <noreply@opencode.ai>"
37+ - "kujtimiihoxha <kujtimii.h@gmail.com>"
3838 license: "MIT"
3939 private_key: "{{ .Env.AUR_KEY }}"
4040 git_url: "ssh://aur@aur.archlinux.org/opencode-bin.git"
@@ -49,7 +49,7 @@ brews:
4949 owner: opencode-ai
5050 name: homebrew-tap
5151nfpms:
52− - maintainer: opencode
52+ - maintainer: kujtimiihoxha
5353 description: terminal based agent that can build anything
5454 formats:
5555 - deb
cmd/root.go+6
@@ -15,6 +15,7 @@ import (
1515 "github.com/kujtimiihoxha/opencode/internal/logging"
1616 "github.com/kujtimiihoxha/opencode/internal/pubsub"
1717 "github.com/kujtimiihoxha/opencode/internal/tui"
18+ "github.com/kujtimiihoxha/opencode/internal/version"
1819 zone "github.com/lrstanley/bubblezone"
1920 "github.com/spf13/cobra"
2021)
@@ -31,6 +32,10 @@ to assist developers in writing, debugging, and understanding code directly from
3132 cmd.Help()
3233 return nil
3334 }
35+ if cmd.Flag("version").Changed {
36+ fmt.Println(version.Version)
37+ return nil
38+ }
3439
3540 // Load the config
3641 debug, _ := cmd.Flags().GetBool("debug")
@@ -247,6 +252,7 @@ func Execute() {
247252
248253func init() {
249254 rootCmd.Flags().BoolP("help", "h", false, "Help")
255+ rootCmd.Flags().BoolP("version", "v", false, "Version")
250256 rootCmd.Flags().BoolP("debug", "d", false, "Debug")
251257 rootCmd.Flags().StringP("cwd", "c", "", "Current working directory")
252258}