feat: optional confirm dialog, other rendering changes
feat: add a way to view output
docs: add example
A small TUI program to run commands on a set of similar targets.
Initially created to aid my own NixOS deployments.
The program will read ./tamma.yaml
on start.
The config should contain two lists, targets
and actions
.
See the example below, but in a nutshell:
targets
has entries with name
and an arbitrary structure data
.
data
can be anything you want it to be.actions
has entries with name
and a go template string exectemplate
.
exectemplate
is a template for a command to be ran in a shell, it will be
ran with sh -c
. The template can access .A.target.Name
and anything in
.A.target.Data
.confirm: true
to have a dialog to confirm the
command before running it.targets:
- name: host1
data:
user: root
host: 1.2.3.4
- name: host2
data:
user: user
host: 1.2.100.42
actions:
- name: ssh
exectemplate: ssh {{ .A.target.Data.user }}@{{ .A.target.Data.host }}
- name: ssh (confirm)
exectemplate: ssh {{ .A.target.Data.user }}@{{ .A.target.Data.host }}
confirm: true