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.10.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.
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.
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: detects the project type, proposes commandsturnout 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-deploy --deploy-path myapp=wwwrootOr let one wizard walk all of it, offering to create the credential and path as it goes:
turnout deploy-setup myappSee turnout app, turnout server, turnout credential and turnout path 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 and state.
- See how the dev gateway routes your apps to stands.
- Coming from turnout 0.8? Read Upgrading to 0.9.