Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pkg/cmd/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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...] <command>",
Annotations: map[string]string{"access": ""},
Use: `exec [instance...] "<command>"
brev exec [instance...] @<script-file-present-on-local>`,
DisableFlagsInUseLine: true,
Short: "Execute a command on instance(s)",
Long: execLong,
Expand Down
Loading