Skip to content

sigcli and sigtui: design

Status on 2026-12-01. Phase 1 (one-command certificates and a check for missing secrets) is in the fleet scripts and the template. Phase 2, the read-only commands, is built: see cli/README.md. Everything else here is still a proposal, and sigtui does not exist yet.

One way to set up and run a fleet from the admin’s machine: first setup, later changes, health, one-off commands and secrets.

  • sigcli is the command line: short commands for repeat work, usable in scripts.
  • sigtui is the terminal interface: menus and step-by-step wizards for the same work. sigcli tui opens it too.

Both are front ends to one library. If something can be done in one, it is the same code in the other. Neither adds a service, a daemon or a listening port. cmdr stays the read-only web view.

Where the code lives, and how a fleet gets updates

Section titled “Where the code lives, and how a fleet gets updates”

A fleet repo is made from consigliere-fleet-template once. The two then have no shared Git history, and nothing carries later template changes into the fleet repo. The helper scripts are copies in each, and the copies drift.

Fleet repos should not pull or merge from the template. Instead:

What Home How a fleet gets a newer version
Code: roles, sigcli, sigtui, helper scripts, tag manifests, setup descriptors This framework It already pulls the framework
Your values: host table, variables, routes, encrypted secrets, your own tags and descriptors The fleet repo You change them
Starting files: examples, starter variables, runbook stubs The template sigcli template diff shows what changed upstream; you choose what to copy. Nothing is applied automatically

Why not an automatic merge: the fleet repo’s main is deployed to every host. Merging a second repository into it would let a change there reach hosts without review, and merges would collide with local values. Note that hosts already apply this framework’s main automatically, so the framework itself must be reviewed like a deployment, as AGENTS.md says.

Until the scripts move here (phase 4), a shared fix is made in both the fleet repo and the template.

sigcli with no arguments prints its usage and exits 0. The text below is the target, once every command exists. Until then the real text lists only what is built and says what is not. sigcli help <command> and sigcli <command> --help give details with an example.

sigcli: set up and run a Consigliere fleet from your admin machine.
USAGE
sigcli <command> [arguments] [options]
sigtui the same tasks as menus and wizards: or sigcli tui
New or setting up a fleet? Start with sigtui.
LOOK (changes nothing)
doctor is this machine ready? tools, keys, repos
check run the fleet repo's checks
health [HOST...] are hosts up to date and their runs succeeding?
host list | host show HOST
route list [HOST]
secret list secret names and who may read them, never values
template diff what changed in the starter template
CHANGE (prepares a branch, never pushes to main)
init set up a new fleet
host add | disable | enable
cert add NAME --host HOST after creating the certificate in Cert Warden
route add | remove
feature add NAME --host HOST
secret set | edit | rotate NAME
ACT ON HOSTS (asks first)
run HOSTS -- COMMAND run a command on hosts
reconcile HOST apply the current configuration now
OPTIONS
--fleet PATH fleet repo (default: SIG_FLEET, else found from this folder)
--dry-run show what would happen; change nothing
--json machine-readable output (LOOK commands)
--help help for a command
EXAMPLES
sigcli health
sigcli cert add example.com --host web1
sigcli run web1 -- uptime

A test keeps this text and the real command list in step.

Every CHANGE command goes through the same stages:

  1. Ask for what is missing. In a script, a missing input is an error, not a prompt.
  2. Plan: list the files that will change and any effect outside the repo.
  3. Prepare on a new branch from the up-to-date main, in a separate worktree, so your working copy is not touched. Any failure removes it.
  4. Check: secrets encrypted, hosts can read what they need, routes consistent.
  5. Show the diff, then ask whether to push and open a pull request.

It never pushes to main and never merges. Without GitHub’s gh, it stops after pushing the branch and says what to do. --local edits the current checkout and commits nothing, as today’s scripts do.

Today most features have their own setup script (grafana, garage, cmdr and so on) that asks questions, writes a secret and tags a host. A tag manifest already says which roles run and which secrets they need. A setup descriptor adds what is needed to create each secret:

# hosts/setup/grafana.server.yml (a fleet can add its own in config/setup/)
secret: grafana.server
title: "Grafana sign-in"
fields:
- {name: grafana_oidc_client_id, prompt: "OIDC client id"}
- {name: grafana_oidc_client_secret, prompt: "OIDC client secret", hidden: true}
- {name: grafana_admin_password, generate: password}
help: "Create the OIDC client in your identity provider first."

(The field names are an illustration.) sigcli feature add grafana --host web1 and the matching wizard are built from the manifest and the descriptor. Someone who swaps in a different app adds a role, a manifest and a descriptor in their own fleet repo, with no change to the tools. A descriptor may name a test from a fixed list (for example an authenticated HTTP request). It cannot run commands of its own.

Parts that talk to a particular product sit behind a small interface, so that another can be added:

Part First version
Certificates Cert Warden
Publishing a change GitHub pull request, or a pushed branch
Health data SSH over the tailnet; Loki if the fleet has it

sops with age keys is the base of the secrets model and is not swappable here.

Read-only. For each host: reachable; the framework and fleet commits it is on, against main; the result and age of its last run; failed services; restarting containers; certificates close to expiry.

Unknown is never shown as healthy. An offline host, an unreadable log or a missing source is listed as unknown, with the reason. health exits non-zero when something is failing or unknown, so it can be used in scripts. It does not replace alerting: it only reports when you ask.

run and reconcile use the existing fleet_run and reconcile_now logic. They show the exact hosts and command and ask before running. Skipped and unreachable hosts are listed, and any failure gives a non-zero exit. sigtui never starts a command from a single key press.

  • Values are typed at hidden prompts or generated. They are never accepted as command-line arguments, printed, logged or shown in a diff.
  • They are encrypted from memory; no plaintext file is written.
  • Listing shows names and readers only.
  • The admin’s age key stays on the admin machine. The tools do not copy it.
  • host disable says which secrets that host could read and should be rotated.
  • Python, in cli/ in this repository. Installed with uv tool or pipx from the framework checkout, so it never goes into a system Python.
  • sigtui uses Textual. It is an optional part, so sigcli works without it. Versions are pinned.
  • The tools say so when the fleet repo needs a newer framework than the one installed.
  • Unit tests run against a throwaway fleet with test keys and a fake certificate server, in this repository’s CI.
  • bash 3.2 and macOS or Linux admin machines. A Windows admin machine is not planned. VERIFY the lowest Python version before phase 2.
Phase Delivers Done when
1 One-command certificates; checks fail on a missing or unreadable secret Merged in the fleet repo and the template
2 sigcli skeleton: help, doctor, check, health, lists. Read-only The help text matches; health agrees with a manual check of each host
3 The change flow, then cert add, secret, host, route Each is tested on a throwaway fleet, including failure part-way
4 Helper scripts move here; setup descriptors replace the per-feature scripts. The fleet repo and the template keep thin wrappers for one release No code is duplicated between the two
5 sigtui: init wizard, health view, then the change wizards A new fleet can be set up from the template with sigtui alone, apart from steps in other products’ own pages

sigtui comes after the commands so that it has proven operations to call. A read-only health screen could come earlier, after phase 2, to try the interface.

A web interface, a background service, merging pull requests, creating things inside other products (such as a certificate in Cert Warden) in the first version, and replacing cmdr, alerting or Arcane.

  1. Is a branch and pull request the right default for every change, with --local as the exception?
  2. Should the read-only health screen come before the change commands?
  3. Names: on 2026-12-01 I found no sigcli or sigtui on PyPI, npm, Homebrew formulae or crates.io. A GitHub project, sigcli/sigcli, uses the name for an authentication tool for AI agents. Check whether its command would clash before publishing a package.
  4. Could Cert Warden certificates be created through its own API? VERIFY; not looked at.