Referencia de comandos thx
Todos los comandos de thx, sus argumentos y qué hace cada uno, leídos del texto de ayuda de cmd/thx/main.go.
thx es el único programa que instala y opera una caja. Estos son sus 38 comandos, tal como los lista su propio texto de ayuda (en inglés). Los comandos que cambian la caja editan /etc/thx/state.json; después thx apply deja la caja igual a ese estado.
Un comando con argumentos equivocados sale con código 2 y muestra esta lista; cualquier otra falla sale con 1, salvo que su línea diga otra cosa.
Ajustes de la caja
thx set public_ip
thx set public_ip <ipv4>
Qué hace (ayuda original, en inglés): the box's public (reserved) IP
thx set site_domain
thx set site_domain <domain>|''
Qué hace (ayuda original, en inglés): which domain serves the showcase site; apps live under it as <host>.<domain>
thx set showcase on|off
thx set showcase on|off
Qué hace (ayuda original, en inglés): on: the site domain shows the showcase site even with the home app on (off: it sends people to the home app)
Dominios
thx domain add
thx domain add <domain> [--org ORG]
Qué hace (ayuda original, en inglés): serve a domain (apex + www); adds ORG if new
thx domain rm
thx domain rm <domain>
thx domain ls
thx domain ls
thx domain upstream
thx domain upstream <d> <port> [--cloudflare]
Qué hace (ayuda original, en inglés): serve the apex from a web app on 127.0.0.1:<port> (0: stop); --cloudflare: proxied by Cloudflare (internal CA, its IPs only)
Empresas y equipos
thx org add
thx org add <org> [--title T]
Qué hace (ayuda original, en inglés): add a company (LDAP groups org-<org>, org-<org>-admins)
thx org title
thx org title <org> <title>
Qué hace (ayuda original, en inglés): change a company's display name
thx team add
thx team add <org> <team>
Qué hace (ayuda original, en inglés): add a team (LDAP group team-<org>-<team>)
thx org app
thx org app <org> <piece> on|off
Qué hace (ayuda original, en inglés): turn an installed app on or off for one company's people
Sitios web estáticos
thx site add
thx site add <host> [--org ORG]
Qué hace (ayuda original, en inglés): serve a static website (apex or one-label subdomain of a company domain) from /srv/thx/sites/<id>/current
thx site rm
thx site rm <host>
Qué hace (ayuda original, en inglés): stop serving it (its files are kept until site purge)
thx site ls
thx site ls [--json] [--removed]
thx site deploy
thx site deploy <host> [--by LABEL] [--id ID]
Qué hace (ayuda original, en inglés): put up a new version; a .tar.gz on stdin refuse unless the host is still site ID
thx site rollback
thx site rollback <host> [RELEASE]
Qué hace (ayuda original, en inglés): serve an earlier version again
thx site purge
thx site purge <id>
Qué hace (ayuda original, en inglés): delete a removed site's files
Apps (piezas)
thx pieces
thx pieces [--json]
Qué hace (ayuda original, en inglés): list every piece and whether it is enabled
thx enable
thx enable <piece>...
Qué hace (ayuda original, en inglés): enable pieces and everything they need
thx disable
thx disable <piece>...
Qué hace (ayuda original, en inglés): disable pieces (data and secrets are kept)
thx secret set
thx secret set <piece> <key>
Qué hace (ayuda original, en inglés): store an input the piece needs; value on stdin
Personas
thx user add
thx user add <uid> --email ADDR --name "NAME" [--org ORG]... [--team ORG/TEAM]... [--org-admin ORG]... [--admin] [--password-stdin | --no-password]
Qué hace (ayuda original, en inglés): create an LLDAP user; without a password flag prints a generated initial password once; a bare --team TEAM works with exactly one --org; the first admin also receives noreply@<site_domain>
thx user passwd
thx user passwd <uid>
Qué hace (ayuda original, en inglés): set the password; one line on stdin
thx user join|leave
thx user join|leave <uid> <group>
Qué hace (ayuda original, en inglés): admins, org-ORG, org-ORG-admins or team-ORG-TEAM
thx user suspend
thx user suspend <uid>
Qué hace (ayuda original, en inglés): no sign-in anywhere; the password is replaced
thx user resume
thx user resume <uid>
Qué hace (ayuda original, en inglés): lift it (then set a password: user passwd)
thx user rm
thx user rm <uid>
Qué hace (ayuda original, en inglés): delete the user (never the last admin)
thx user alias add|rm
thx user alias add|rm <uid> <addr>
Qué hace (ayuda original, en inglés): an extra address (on any served domain) for a user
Correo
thx mail send
thx mail send --to ADDR --subject S
Qué hace (ayuda original, en inglés): send a plain-text mail from noreply@<site_domain>; body on stdin
Operar la caja
thx apply
thx apply [--events json] [--only PART]
Qué hace (ayuda original, en inglés): bring this box to the state in /etc/thx/state.json; --events json adds progress lines (docs/pieces.md); --only runs one part (a piece, or system) after system
thx post-up
thx post-up <piece>
Qué hace (ayuda original, en inglés): rerun a piece's post_up (run daily by thx-post-up@<piece>.timer)
thx verify
thx verify
Qué hace (ayuda original, en inglés): probe the box; exits 1 if any probe fails
thx stats
thx stats
Qué hace (ayuda original, en inglés): write the site's stats.json (run by thx-stats.service)
DNS
thx dns
thx dns <domain>
Qué hace (ayuda original, en inglés): the DNS records the domain's owner publishes for mail (region from state, else instance metadata)
Correo saliente por el relay
thx relay status
thx relay status <domain> [--json]
Qué hace (ayuda original, en inglés): where outgoing mail through the relay stands (the provider's side is by hand: thx holds no API key)
thx relay dkim
thx relay dkim <domain> <selector> <target> [--verified]
Qué hace (ayuda original, en inglés): record the DKIM CNAME your cloud console shows
thx relay check
thx relay check
Qué hace (ayuda original, en inglés): sign in to the relay's SMTP with the stalwart relay_* inputs; exit 1 refused, 3 could not ask
thx relay test
thx relay test --to ADDR
Qué hace (ayuda original, en inglés): send one test through the relay as noreply@; exit 1/3
Notas del texto de ayuda
- every command but verify and stats takes --root DIR (tests use a scratch dir).