Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix(cli): remove manual --id flag from instance stop/logs, use positional args only

Bosch8188b6fd5e38
diff --git a/internal/cli/actions/actions_instance.go b/internal/cli/actions/actions_instance.go
index bd1d8520..c7d04bec 100644
--- a/internal/cli/actions/actions_instance.go
+++ b/internal/cli/actions/actions_instance.go
@@ -30,8 +30,6 @@ func InstanceNavigate(client *http.Client, base, token string, args []string) {
instID := args[0]
targetURL := args[1]
- // Instance navigate now works via tab-scoped navigation:
- // open a tab on the instance, then navigate that tab.
openResp := apiclient.DoPost(client, base, token, fmt.Sprintf("/instances/%s/tabs/open", instID), map[string]any{
"url": "about:blank",
})
@@ -40,47 +38,18 @@ func InstanceNavigate(client *http.Client, base, token string, args []string) {
cli.Fatal("failed to open tab for instance %s", instID)
}
- // apiclient.DoPost auto-prints JSON response.
apiclient.DoPost(client, base, token, fmt.Sprintf("/tabs/%s/navigate", tabID), map[string]any{
"url": targetURL,
})
}
func InstanceLogs(client *http.Client, base, token string, args []string) {
- var instID string
-
- if len(args) == 0 {
- cli.Fatal("Usage: pinchtab instance logs <instance-id> OR pinchtab instance logs --id <instance-id>")
- }
-
- if args[0] == "--id" {
- if len(args) < 2 {
- cli.Fatal("Usage: --id requires instance ID")
- }
- instID = args[1]
- } else {
- instID = args[0]
- }
-
+ instID := args[0]
logs := apiclient.DoGetRaw(client, base, token, fmt.Sprintf("/instances/%s/logs", instID), nil)
fmt.Println(string(logs))
}
func InstanceStop(client *http.Client, base, token string, args []string) {
- var instID string
-
- if len(args) == 0 {
- cli.Fatal("Usage: pinchtab instance stop <instance-id> OR pinchtab instance stop --id <instance-id>")
- }
-
- if args[0] == "--id" {
- if len(args) < 2 {
- cli.Fatal("Usage: --id requires instance ID")
- }
- instID = args[1]
- } else {
- instID = args[0]
- }
-
+ instID := args[0]
apiclient.DoPost(client, base, token, fmt.Sprintf("/instances/%s/stop", instID), nil)
}