DEVELOPMENT ENVIRONMENT

~liljamo/tamma

a small TUI program to run commands on a set of similar targets
feat: optional confirm dialog, other rendering changes
feat: add a way to view output
docs: add example

clone

read-only
https://git.src.quest/~liljamo/tamma
read/write
git@git.src.quest:~liljamo/tamma

You can also use your local clone with git send-email.

#tamma

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.
    • Optionally, you can provde confirm: true to have a dialog to confirm the command before running it.

#Example

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