on main help sign in
update mainter email
f879a94Kujtim Hoxha
.goreleaser.yml+3−3
@@ -32,9 +32,9 @@ snapshot:
32aurs:
32aurs:
33 - name: opencode
33 - name: opencode
34 homepage: "https://github.com/opencode-ai/opencode"
34 homepage: "https://github.com/opencode-ai/opencode"
35− description: "Deploy anything"
35+ description: "terminal based agent that can build anything"
36 maintainers:
36 maintainers:
37− - "opencode <noreply@opencode.ai>"
37+ - "kujtimiihoxha <kujtimii.h@gmail.com>"
38 license: "MIT"
38 license: "MIT"
39 private_key: "{{ .Env.AUR_KEY }}"
39 private_key: "{{ .Env.AUR_KEY }}"
40 git_url: "ssh://aur@aur.archlinux.org/opencode-bin.git"
40 git_url: "ssh://aur@aur.archlinux.org/opencode-bin.git"
@@ -49,7 +49,7 @@ brews:
49 owner: opencode-ai
49 owner: opencode-ai
50 name: homebrew-tap
50 name: homebrew-tap
51nfpms:
51nfpms:
52− - maintainer: opencode
52+ - maintainer: kujtimiihoxha
53 description: terminal based agent that can build anything
53 description: terminal based agent that can build anything
54 formats:
54 formats:
55 - deb
55 - deb
cmd/root.go+6
@@ -15,6 +15,7 @@ import (
15 "github.com/kujtimiihoxha/opencode/internal/logging"
15 "github.com/kujtimiihoxha/opencode/internal/logging"
16 "github.com/kujtimiihoxha/opencode/internal/pubsub"
16 "github.com/kujtimiihoxha/opencode/internal/pubsub"
17 "github.com/kujtimiihoxha/opencode/internal/tui"
17 "github.com/kujtimiihoxha/opencode/internal/tui"
18+ "github.com/kujtimiihoxha/opencode/internal/version"
18 zone "github.com/lrstanley/bubblezone"
19 zone "github.com/lrstanley/bubblezone"
19 "github.com/spf13/cobra"
20 "github.com/spf13/cobra"
20)
21)
@@ -31,6 +32,10 @@ to assist developers in writing, debugging, and understanding code directly from
31 cmd.Help()
32 cmd.Help()
32 return nil
33 return nil
33 }
34 }
35+ if cmd.Flag("version").Changed {
36+ fmt.Println(version.Version)
37+ return nil
38+ }
34
39
35 // Load the config
40 // Load the config
36 debug, _ := cmd.Flags().GetBool("debug")
41 debug, _ := cmd.Flags().GetBool("debug")
@@ -247,6 +252,7 @@ func Execute() {
247
252
248func init() {
253func init() {
249 rootCmd.Flags().BoolP("help", "h", false, "Help")
254 rootCmd.Flags().BoolP("help", "h", false, "Help")
255+ rootCmd.Flags().BoolP("version", "v", false, "Version")
250 rootCmd.Flags().BoolP("debug", "d", false, "Debug")
256 rootCmd.Flags().BoolP("debug", "d", false, "Debug")
251 rootCmd.Flags().StringP("cwd", "c", "", "Current working directory")
257 rootCmd.Flags().StringP("cwd", "c", "", "Current working directory")
252}
258}