A terminal tool for executing into running Nomad allocations. Browse jobs and allocations through an interactive UI, or execute commands directly.
go install github.com/ssh-bastion/nui/cmd@latestexport NOMAD_ADDR="http://localhost:4646" # Required
export NOMAD_TOKEN="your-token" # Required
export NOMAD_NAMESPACE="default" # Optional
export NOMAD_REGION="" # OptionalLaunch the UI to browse and execute into allocations:
./nui- Select a job from the filterable list
- Choose an allocation and task
- Enter the command to execute (default:
sh) - The command runs in the selected allocation's container
Exit the UI with ESC.
Execute commands directly without the UI:
./nui alloc exec -task <task-name> <allocation-id> <command>Examples:
# Execute sh in a nginx task
./nui alloc exec -task nginx abc123def456 sh
# Execute a specific command
./nui alloc exec -task nginx abc123def456 ls -laIf the task group has only one task, omit the -task flag:
./nui alloc exec abc123def456 sh