Documentation

down is the small, dull sibling of up. It reads the profile, works out the session name and kills that session. The one thing worth knowing is how little of the profile it reads, because that is what keeps it usable in a script.

Console
$ glaze down                        # kill the session that ./.glaze describes
$ glaze down --var district=watson  # resolve an interpolated session name
$ glaze down --session daemon-run   # kill by name; no profile is required

Flags

FlagDescription
--sessionThe session to kill. The flag skips profile resolution.
--profile-pathThe path to a .glaze file. See Profile resolution.
--var key=valueSet a variable. The flag is repeatable. See Variables.
--var-file <path>An HCL file of variable values.
--socket-path / --socket-nameA custom tmux socket. See Custom sockets.

What down evaluates

Glazier evaluates only the session name. An interpolated name, for example name = "gig-${var.district}", resolves through the same --var flags as up. A variable that appears only deeper in the profile is not required. The name follows the same rules as in up: a number or a bool becomes a string, and a missing name becomes default.

When the name needs a variable that has no value, down reports “Required variable not set” for each declared variable without a value and exits with code 3.

With --session, down does not read a profile at all.

A session that is not running

A session that is not running causes no error. down exits with code 0. Thus down stays idempotent for scripts: a clean-up step can run it after every job without a check for a live session first.

The reason down reads only the name is a practical one. Your up might need a --var token=... for a pane command, but the tear-down should not care about a token, so it does not ask for one. The one rule that follows is that the name cannot contain random(), directly or through a local, because down evaluates the name again and would then look for a session that never existed. See Functions.