You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace bs version subcommand with --version flag showing client and server versions
bs --version (-v) now contacts the server and prints both client and
server versions as plain text, or 'server: unavailable' if the server
cannot be reached. This makes it a quick way to check server presence.
The separate 'bs version' subcommand is removed.
@@ -144,7 +145,7 @@ The client also reads `BS_TOKEN`, `BS_USER`, and `BS_URL` from a `.env` file in
144
145
|`bs move <id> --into <epic-id>`| Move a bead into an epic (set parent) |
145
146
|`bs move <id> --out`| Detach a bead from its parent epic |
146
147
147
-
All output is pretty-printed JSON. IDs are short by default (`bd-` + 4 chars) and must be specified exactly and in full.
148
+
All command output is pretty-printed JSON except `--version`, which outputs plain text. IDs are short by default (`bd-` + 4 chars) and must be specified exactly and in full.
Copy file name to clipboardExpand all lines: internal/cli/root.go
+27-5Lines changed: 27 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
1
package cli
2
2
3
3
import (
4
+
"encoding/json"
5
+
"fmt"
6
+
4
7
"github.com/spf13/cobra"
5
8
)
6
9
@@ -9,12 +12,32 @@ var version = "dev"
9
12
// NewRootCmd creates the root cobra command for the bs CLI.
10
13
funcNewRootCmd() *cobra.Command {
11
14
root:=&cobra.Command{
12
-
Use: "bs",
13
-
Short: "Beads server CLI",
14
-
Long: "Beads server CLI — a tool for managing beads (issues/tasks).\n\nClient commands require BS_TOKEN and optionally BS_URL (default http://localhost:9999).",
15
-
Version: version,
15
+
Use: "bs",
16
+
Short: "Beads server CLI",
17
+
Long: "Beads server CLI — a tool for managing beads (issues/tasks).\n\nClient commands require BS_TOKEN and optionally BS_URL (default http://localhost:9999).",
0 commit comments