Read a curl | bash script before you run it. Here is ours.
Plenty of developer tools install with one line: curl a URL and pipe it into bash. It is convenient, and it asks you to run a script you have not read, from a server you are trusting, on your own account. The reasonable response is not to refuse every such line. It is to read the script first, which takes two minutes, and to know what to look for.
DevThrottle installs on Linux this way, so here is our script, read for you, step by step.
Read it before you run it
The pipe is only one way to use the line. Save the script, read it, then run the copy you read:
curl -fsSL https://devthrottle.com/install-linux.sh -o install-linux.sh
less install-linux.sh
bash install-linux.shThat also means the script you run is exactly the one you read, not a second fetch.
What it does, in order
- Refuses the wrong machine. It stops unless the system is Linux on 64-bit Intel or AMD. An ARM build exists but nobody has run it, so the script refuses it with a plain sentence rather than hand you something untested.
- Checks its own tools. It needs
curl,sha256sum,python3andtar, and names the install line for Ubuntu or Debian if one is missing. - Checks the libraries the wizard's window needs. The setup wizard draws a window, so it links X11, OpenGL and fontconfig. A desktop already has them. On a server or a container it lists exactly which are missing instead of letting the wizard die later with a linker error.
- Finds the latest release. It reads
stable.jsonfrom our download server at devthrottle.com, checks that what it names looks like a release tag, and downloads the wizard and that release's manifest into a temporary folder that is removed when the script ends. - Verifies the download. It hashes the wizard with
sha256sumand compares it with the manifest. A mismatch stops the script with "Do not run this download". - Places one file. The wizard goes to
~/.local/bin/devthrottle-setup, replacing any earlier copy, and is made executable. SetDEVTHROTTLE_BIN_DIRto put it elsewhere. If that folder is not on your PATH yet, which is normal on a first install, it says so. - Starts the wizard, or tells you how. With
DEVTHROTTLE_NO_OPEN=1it stops after placing the file. With no graphical session at all, it says the wizard is installed and to run it from the desktop, rather than printing an error that reads like a broken download.
What to look for, in ours or anyone's
- Does it ask for root? Ours never runs
sudo. The only time the word appears is in advice it prints, such as which packages to install. Apart from a temporary folder it removes when it ends, everything it writes is under your home folder. - Does it check what it downloaded? A script that fetches a binary and runs it without a hash comparison is asking for more trust than one that does.
- What does it send? Ours sends one thing of its own: if the install fails, a report of the failed step and the message, with the distribution, the architecture, your numeric user id and an install id. Before it leaves, the home folder is reduced to
~and your user name and machine name are replaced. A successful run sends no report. - What does it change besides its own files? Ours installs no packages and adds no repository. Besides the wizard itself, the one file it can leave is the install id, kept under
~/.local/share/cc-directorwhen it sends a failure report.
After the script
The script installs one thing, the setup wizard, and the wizard installs and updates everything else. The Linux build is a workstation: it runs your coding agents on that machine and connects to a hosted gateway. For a machine with nobody at the screen, such as an ssh session or a coding agent doing the work, there is a headless installer with no window at all.
Both routes are under Installing on Linux.