Install the CLI
Each Telesphorepo server serves the CLI of its own version. Install it from the server that you publish to. In the commands, put your server’s address in place of https://repo.example.com.
The web UI has the same lines with your address filled in. Open the account menu, then Install the CLI, or click Install the CLI in the Set up a project card of a repository’s Publish to this repository tab. The page has a tab for each system, the archives with their SHA-256, and the update command.
1Which computer?
macOS or Linux
-
Run this in a terminal.
Terminal window curl -fsSL https://repo.example.com/install.sh | shThe script downloads the CLI for your system and CPU from the server, and checks its SHA-256. It installs
telesphorepointo~/.local/bin, withdocker-credential-telesphoreponext to it. -
If
~/.local/binis not on yourPATH, the script asks to add it to the start-up file of your shell, for example:Add ~/.local/bin to your PATH in ~/.zshrc? [Y/n]Press Enter. The script adds one line to the file, and creates the file when it is missing.
-
Open a new terminal, or run the line that the script printed. Then check the install.
Terminal window telesphorepo version
Done when the CLI prints its version.
The script picks the file by the shell that $SHELL names:
| Shell | File | Line |
|---|---|---|
| zsh | ~/.zprofile on macOS, ~/.zshrc on Linux |
export PATH="$HOME/.local/bin:$PATH" |
| bash | ~/.bash_profile on macOS, ~/.bashrc on Linux |
export PATH="$HOME/.local/bin:$PATH" |
| fish | ~/.config/fish/config.fish |
set -gx PATH $HOME/.local/bin $PATH |
| any other | ~/.profile |
export PATH="$HOME/.local/bin:$PATH" |
Answer n, or run the script with no terminal, and the script changes no file. It prints the line and the file to add it to. When you run the script again and the file holds the line already, the script adds nothing.
Windows
-
Run this in PowerShell.
Terminal window irm https://repo.example.com/install.ps1 | iexThe script downloads the CLI for your CPU from the server, and checks its SHA-256. It installs
telesphorepo.exeinto%LOCALAPPDATA%\Programs\telesphorepo, withdocker-credential-telesphorepo.exenext to it, and adds that folder to your userPATH. -
Check the install in the same PowerShell window.
Terminal window telesphorepo versionThis window can run
telesphorepoat once. Open a new terminal to run it anywhere else.
Done when the CLI prints its version.
The script runs in Windows PowerShell 5.1 and in PowerShell 7. PowerShell on Linux and macOS installs into ~/.local/bin. When that folder is not on your PATH, the script prints a line for your PowerShell profile ($PROFILE):
$env:PATH = "$HOME/.local/bin:$env:PATH"Run a command after the install
Section titled “Run a command after the install”Put the CLI command after the install line. The CLI runs it once the install is done. The setup line of the Publish to this repository tab works this way:
curl -fsSL https://repo.example.com/install.sh | sh -s -- setup 'https://repo.example.com/#/setup/trsu_...'On Windows, the line with arguments takes this form:
& ([scriptblock]::Create((irm https://repo.example.com/install.ps1))) setup 'https://repo.example.com/#/setup/trsu_...'Install in CI
Section titled “Install in CI”Add the install line as a step before telesphorepo publish. In GitHub Actions, the script puts the folder on the PATH of the later steps, and changes no file. In Jenkins and other CI, add the folder to the PATH of the same shell:
curl -fsSL https://repo.example.com/install.sh | shexport PATH="$HOME/.local/bin:$PATH"telesphorepo publishThe CI files that the CLI writes hold these lines already. See Set up a project.
Update the CLI
Section titled “Update the CLI”After your server admin updates the server, run this to get the CLI of the new server version:
telesphorepo updateThe CLI installs the CLI of the server: the server of the project in this folder, else the server that you name (telesphorepo update https://repo.example.com), else the one server that this computer is approved for. A CLI that is the same as the server’s or newer stays, because a newer CLI works with an older server.
When a server needs a newer CLI, the CLI says so and asks to update. Answer Y. The CLI updates, then runs your command again.
Download by hand
Section titled “Download by hand”The Install the CLI page of the web UI lists the archives for your system with their SHA-256. Each has a Download button, and the page shows the commands that check and install the archive. The server keeps the archives at https://repo.example.com/cli/, with a SHA256SUMS file:
| System | Archive |
|---|---|
| Linux, x86-64 | telesphorepo_linux_amd64.tar.gz |
| Linux, ARM | telesphorepo_linux_arm64.tar.gz |
| macOS, Intel | telesphorepo_darwin_amd64.tar.gz |
| macOS, Apple silicon | telesphorepo_darwin_arm64.tar.gz |
| Windows, x86-64 | telesphorepo_windows_amd64.zip |
| Windows, ARM | telesphorepo_windows_arm64.zip |
-
Download the archive for your system, and
SHA256SUMS.Terminal window curl -fLO https://repo.example.com/cli/telesphorepo_linux_amd64.tar.gzcurl -fLO https://repo.example.com/cli/SHA256SUMS -
Check the archive. Its line must say
OK.Terminal window grep telesphorepo_linux_amd64.tar.gz SHA256SUMS | sha256sum -cOn macOS, use
shasum -a 256 -cin place ofsha256sum -c. On Windows, compare the output ofGet-FileHash telesphorepo_windows_amd64.zipwith the line inSHA256SUMS. -
Unpack the archive, and put
telesphorepoin a folder on yourPATH, such as~/.local/bin. -
For Docker, Podman and Helm, make the second name of the CLI in the same folder.
Terminal window ln -sf telesphorepo ~/.local/bin/docker-credential-telesphorepoOn Windows, copy
telesphorepo.exetodocker-credential-telesphorepo.exe.
If something goes wrong
Section titled “If something goes wrong”Find your problem, then do the fix
telesphorepo is not found in a new terminal. Run the install line again, and answer Y when the script asks to add ~/.local/bin to your PATH. Or add the line from the table above to the start-up file of your shell yourself. On Windows, open a new terminal: the install adds %LOCALAPPDATA%\Programs\telesphorepo to your user PATH.
The script did not ask about the PATH. It asks only on a terminal, and only when ~/.local/bin is not on your PATH. Piped with no terminal, it prints the line and the file instead.
The script says that the SHA-256 differs. The download does not match the file that the server named, and the script installed nothing. Run the line again. If it fails again, a proxy between you and the server may cache an old file. Ask your server admin.
The script says that the server has no CLI for your system. The server has the CLI for Linux, macOS and Windows on x86-64 and ARM only.
The page says that this server has no CLI downloads. The server was built without the CLI. Ask your server admin to build it with go tool task build, or to install a release.
telesphorepo update says that it cannot write the folder. It names the folder and the install line. Run the install line again, or fix the rights of the folder.
You lost a laptop. Open Settings › Devices and revoke that laptop. To remove the key from a computer that you still have, run telesphorepo logout.