From 32cda3ab4d0c55fab807f7f2ab0a693790ea7f74 Mon Sep 17 00:00:00 2001 From: prankur-sh Date: Wed, 2 Sep 2026 12:19:19 +0530 Subject: [PATCH 1/2] fix: quote the command in brev exec usage string --- pkg/cmd/exec/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/exec/exec.go b/pkg/cmd/exec/exec.go index e7f0cd924..86000d11d 100644 --- a/pkg/cmd/exec/exec.go +++ b/pkg/cmd/exec/exec.go @@ -58,7 +58,7 @@ func NewCmdExec(t *terminal.Terminal, store ExecStore, noLoginStartStore ExecSto var host bool cmd := &cobra.Command{ Annotations: map[string]string{"access": ""}, - Use: "exec [instance...] ", + Use: `exec [instance...] ""`, DisableFlagsInUseLine: true, Short: "Execute a command on instance(s)", Long: execLong, From 02997bf86ac4e40f7d9fdc8f3d0f58cd0cdcffde Mon Sep 17 00:00:00 2001 From: prankur-sh Date: Mon, 7 Sep 2026 09:27:26 +0530 Subject: [PATCH 2/2] docs: add script-file usage line and background job example to brev exec help --- pkg/cmd/exec/exec.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/exec/exec.go b/pkg/cmd/exec/exec.go index 86000d11d..88aec28c0 100644 --- a/pkg/cmd/exec/exec.go +++ b/pkg/cmd/exec/exec.go @@ -34,6 +34,9 @@ var ( brev exec my-instance @setup.sh brev exec my-instance @scripts/deploy.sh + # Run a background job + brev exec my-instance "nohup python train.py > /dev/null 2>&1 &" + # Chain: create and run a command (reads instance names from stdin) brev create my-instance | brev exec "nvidia-smi" @@ -57,8 +60,9 @@ type ExecStore interface { func NewCmdExec(t *terminal.Terminal, store ExecStore, noLoginStartStore ExecStore) *cobra.Command { var host bool cmd := &cobra.Command{ - Annotations: map[string]string{"access": ""}, - Use: `exec [instance...] ""`, + Annotations: map[string]string{"access": ""}, + Use: `exec [instance...] "" + brev exec [instance...] @`, DisableFlagsInUseLine: true, Short: "Execute a command on instance(s)", Long: execLong,