Getting Started
Install
Section titled “Install”One line on Windows (PowerShell):
irm https://raw.githubusercontent.com/lacodda/turnout/main/tools/install.ps1 | iexOne line on macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/lacodda/turnout/main/tools/install.sh | shVia npm:
npm i -g turnout-cliVia cargo:
cargo install turnoutOr download the archive for your platform from Releases (Windows x86_64, Linux x86_64, macOS arm64), unpack and put turnout on your PATH.
Installer options
Section titled “Installer options”Both scripts read two environment variables:
| Variable | Effect |
|---|---|
TURNOUT_VERSION |
Install this tag (e.g. v0.24.1) instead of the newest release |
TURNOUT_INSTALL_DIR |
Where the binary lands; defaults to %LOCALAPPDATA%\Programs\turnout on Windows and ~/.local/bin elsewhere |
The tn alias
Section titled “The tn alias”The installers and the npm package also set up tn as a short second name, so tn use web staging is the same as turnout use web staging. It is skipped when something else in your PATH already answers to tn; set TURNOUT_NO_ALIAS=1 to opt out entirely. Installing through cargo install gives you turnout only - add your own alias if you want the short form.
The alias is a link to the binary, not a second copy of it: a symlink on macOS and Linux, a hard link on Windows (a symlink there would need elevation, which an installer has no business asking for). One binary on disk answers to both names, so an install costs half of what two copies would and the two names can never drift apart - including across turnout self-update, which points the alias back at the new binary as its last step.
First run
Section titled “First run”turnout setupThe wizard shows where turnout will keep its data and creates the directory:
| OS | Data directory |
|---|---|
| Windows | %LOCALAPPDATA%\lacodda\turnout |
| macOS | ~/Library/Application Support/lacodda/turnout |
| Linux | ~/.local/share/lacodda/turnout |
Set the TURNOUT_DATA_DIR environment variable to override the location (useful for tests and scripting). Pass --yes to skip prompts.
Besides the catalogs, the directory holds the action journal and a logs/ folder with the output of every command turnout has run for an app - see the quiet console.
Once a day turnout also checks whether a newer release exists and mentions it at the end of a command. The lookup runs in the background, so it never delays anything; TURNOUT_UPDATE_CHECK=0 switches it off. See the update check.
Check the state
Section titled “Check the state”turnout statusShows the data directory, the four catalogs - apps, servers, credentials, paths - and whether the gateway is running.
Describe your first app and server
Section titled “Describe your first app and server”cd ~/dev/myappturnout app add # wizard: every field of the app, commands includedturnout server add # wizard: URL, SSH host, credential, TLS policyThat is enough for the dev gateway. Deploying also needs to know who logs in and where files land:
turnout credential add prod-deploy --user deployturnout path add wwwroot --dir /var/www/myapp --restart "systemctl restart myapp"turnout server edit prod --credential prod-deployturnout target add --app myapp --server prod --credential prod-deploy --path wwwrootOr let one wizard walk all of it, offering to create the credential and path as it goes:
turnout deploy-setup myappEither way, turnout deploy myapp-prod deploys from any directory afterwards. See turnout app, turnout server, turnout credential, turnout path and turnout target for the full command reference.
A working day
Section titled “A working day”turnout gateway start # once: the gateway routes apps to their standsturnout use myapp staging # bind the app to a standturnout dev # from the project dir: UI local, API on stagingturnout pass copy prod-deploy # password on the clipboard when the stand asksturnout use myapp prod-eu # switch stands - no restarts, no env editsNext steps
Section titled “Next steps”- Learn the entity model - apps, servers, credentials, paths, targets and state.
- See how the dev gateway routes your apps to stands.
- Coming from turnout 0.8? Read Upgrading to 0.9.