@@ 1,4 1,36 @@
# tamma
-A small TUI program to run commands on a set of similar targets. Initially
-created to help myself with NixOS deployments.
+A small TUI program to run commands on a set of similar targets.
+
+Initially created to aid my own NixOS deployments.
+
+## Config
+
+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`.
+
+### Example
+```yaml
+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 }}
+```