Configuration
URL options and environment variables of the install scripts.
Pick a repository and the settings you need, then copy the command. Each setting maps to a URL option or an environment variable from the tables below.
$ curl -fsSL https://installer.dev/YOUR/REPO/install.sh | shPaste your/repo or a GitHub URL.
Command
Domain
Both serve the same script. instl.sh is shorter to type.
A release tag, such as v1.2.3. Empty installs the latest.
Words the file name must contain, such as musl, for releases with several builds per machine. Empty picks the build that fits.
Shell PATH
The script lists the files it wants to change and waits for a yes. Without a terminal it changes only the current shell.
Where the files of every install go. Uninstall and update need the same folder. See Install locations.
Where the script links the commands. Pick a folder that is on your PATH.
Safety
Stops when the release has no SHA-256 for the file.
Also replaces commands of the same name from other installs.
Output
For bug reports and for reading what the script does.
Colors
Colors in a terminal, plain text in files and logs.
URL options
Every URL works on installer.dev and on the short domain instl.sh. Both serve the same scripts.
| URL | Script |
|---|---|
installer.dev/YOUR/REPO/install.sh |
Installs the latest release on Linux and macOS. |
installer.dev/YOUR/REPO/install.ps1 |
Installs the latest release on Windows, for PowerShell. |
installer.dev/YOUR/REPO/install.sh/verbose |
Installs and prints every decision. |
?version=TAG |
Installs the release with this tag instead of the latest. |
?match=TERMS |
Installs the file whose name contains every comma-separated term, such as ?match=musl. See Pick a build. |
un.installer.dev/YOUR/REPO/install.sh |
Removes the install. installer.dev/YOUR/REPO/install.sh/uninstall serves the same script. See Uninstall. |
un.installer.dev/install.sh |
Removes every install and its PATH changes. See Remove everything. |
update.installer.dev/install.sh |
Updates every install to its latest release. See Update. |
Every URL with install.sh also takes install.ps1 for the Windows script. The older /linux, /macos and /windows paths keep working and serve the same scripts.
Unknown script files and invalid names return 404 with a body that prints an error and exits with status 1 when piped into sh.
Environment variables
The script reads these variables at run time. Environment variables override the URL. Tools can read this table from the Options API.
| Variable | Default | Effect |
|---|---|---|
INSTL_VERSION |
latest | Release tag to install. Overrides ?version=. |
INSTL_MATCH |
unset | Terms the file name must contain. Overrides ?match=. |
INSTL_VERBOSE |
0 |
1 prints every decision, like the /verbose URL. |
INSTL_HOME |
see Install locations | Directory for the installed files. Absolute path. The scripts expand %VARIABLES% on Windows and a leading ~ on Linux and macOS. |
INSTL_BIN_DIR |
see Install locations | Directory for the command links. Linux and macOS only. Absolute path, a leading ~ expands to your home directory. |
INSTL_MODIFY_PATH |
ask, or current without a terminal |
all, current or no. On Windows, all and current both mean yes. |
INSTL_FORCE |
0 |
1 reinstalls the same version, and replaces conflicting commands and an install directory without a receipt. |
INSTL_REQUIRE_CHECKSUM |
0 |
1 refuses releases without a checksum. |
INSTL_YES |
0 |
1 lets Remove everything remove without asking. |
GITHUB_TOKEN, GH_TOKEN |
unset | Token for the GitHub API, to raise the rate limit. |
NO_COLOR |
unset | Disables colors. |
FORCE_COLOR |
unset | Enables colors when the output is not a terminal. |
CI |
unset | Set by CI systems. Disables the PATH question. |
GITHUB_PATH |
set by GitHub Actions | The script appends the bin directory, so later steps find the commands. |
Set a variable for one run
In sh, put the variable in front of the shell that runs the script, not in front of curl:
curl -fsSL https://installer.dev/YOUR/REPO/install.sh | INSTL_VERSION=v1.2.3 shIn PowerShell, set it in the session first:
$env:INSTL_VERSION = 'v1.2.3'; irm https://installer.dev/YOUR/REPO/install.ps1 | iexPick a build
Some releases ship several builds for the same machine, such as a gnu and a musl build for Linux, or a plain and an extended build. The script picks one by itself, as How a file is picked describes. To get another one, name a word from its file name:
curl -fsSL "https://installer.dev/YOUR/REPO/install.sh?match=musl" | shThe match ignores case. With several terms, separated by commas, the name must contain all of them: ?match=extended,musl. Use words that stay the same between releases, never the version. The OS and CPU still have to fit, so a match never installs a build for another machine. When no file that fits contains the terms, the script stops and lists the files that fit.
The receipt records the match, and Update keeps it. To return to the automatic pick, run the install command without a match.
Exit status
The Linux and macOS script exits with 0 on success and 1 on any error. The Windows script never calls exit, because that would close the PowerShell window it runs in. It throws an error instead, which fails the step in CI.