CLI and telesphorepo.toml
The commands of the Telesphorepo CLI, the project file it reads, and the variables it reads in CI. Each server serves the CLI of its own version: install the CLI from yours. Run telesphorepo help and a command to see its examples.
CLI commands
Section titled “CLI commands”| Command | What it does |
|---|---|
setup LINK |
Sets up the project of this folder |
publish [FILE...] |
Publishes the project, or uploads files |
get URL... |
Downloads files, from private repositories too |
login [SERVER] |
Approves this computer for a server, or switches accounts |
logout [SERVER] |
Revokes the device of the active account and removes its files |
status |
Shows the accounts of this computer and the project of this folder |
update [SERVER] |
Installs the CLI of the server |
version, help |
Prints the version, or the help of a command |
Sets up the project of this folder from the setup line on the Publish to this repository tab. A setup line works once, for 10 minutes. The CLI approves this computer, or uses the approval it has, and writes telesphorepo.toml. For a Docker repository it writes no file, and offers to add its credential helper to the Docker config instead. On a terminal, it then offers a CI file: GitHub Actions, Jenkinsfile or Jenkins freestyle job.
telesphorepo setup 'https://repo.example.com/#/setup/trsu_...'telesphorepo setup 'https://repo.example.com/#/setup/trsu_...' --name "build box"--name names the computer. The default is its host name.
publish
Section titled “publish”Publishes the project of this folder with its own build tool: Maven, Gradle, npm, Python, Cargo, .NET or a Helm chart. With files, it uploads them: to a raw, Debian, Arch Linux or RPM repository, .nupkg files to NuGet, or wheels and sdists to Python with no build. A Docker repository publishes with docker push and the credential helper. The steps are in Publish from your computer.
telesphorepo publishtelesphorepo publish build/hello_1.0_amd64.debtelesphorepo publish dist/app-1.0-py3-none-any.whl| Flag | What it does |
|---|---|
--version V |
The version that the rules of telesphorepo.toml match, in place of the one the CLI reads |
--into FOLDER |
Raw: uploads into this folder, in place of path |
--if-new |
Raw: uploads only when the path holds no file |
--if-match ETAG |
Raw: uploads one file only over the file of this ETag, from a GET of it. Takes * for any file |
When the server holds another file than --if-new or --if-match says, the CLI stores nothing and exits with code 3. Read the file again, and publish again. Use raw files for an updater shows the whole pattern.
Downloads files into this folder, as the web UI links them. On a computer approved for the server, it reads as the active account, so private repositories work with no token to copy. -o FILE names the file of one address, and -o - writes it to the standard output.
telesphorepo get https://repo.example.com/raw/releases/app/1.0/app.tar.gztelesphorepo get -o app.tar.gz https://repo.example.com/raw/releases/app/latest.tar.gzApproves this computer for a server, with no project. Open the link that the CLI prints, sign in, and approve the code: the computer belongs to the account that approves it. One computer can hold several accounts of one server, such as an admin and a publisher. On a terminal, login lists them and asks which one is active.
telesphorepo login https://repo.example.comtelesphorepo login https://repo.example.com --name "build box"logout
Section titled “logout”Revokes the approval of the active account, and deletes its key. The last account of a server also removes the Docker helper entries of that server. With no server, it uses the server of the project in this folder, else the one server of this computer.
telesphorepo logout https://repo.example.comstatus
Section titled “status”Shows each account of this computer, whether the server accepts it, and the Docker helper entries. For this folder, it shows telesphorepo.toml, the command that telesphorepo publish runs and, with rules, the version and the repository it picks. It shows no secret.
telesphorepo statusupdate
Section titled “update”Installs the CLI of the server: the server of this project, else the one you name, else the one server of this computer. The CLI checks the SHA-256 of the download. A newer CLI stays, because it works with an older server.
telesphorepo updateCLI version and help
Section titled “CLI version and help”telesphorepo versiontelesphorepo help publishFiles and the Docker helper
Section titled “Files and the Docker helper”- The key of each approved account is in
~/.telesphorepo/<server>/accounts/<user>/device.json. Only you can read it. docker-credential-telesphorepois the same program under the name that Docker, Podman, Helm and ORAS call.
telesphorepo.toml
Section titled “telesphorepo.toml”The project file that telesphorepo setup writes. It holds no secret: commit it. The CLI finds it in this folder or a folder above.
| Key | Needed | What it sets |
|---|---|---|
server |
yes | The address of the server |
repo |
yes | The repository |
kind |
no | maven or gradle, when the folder holds both |
path |
no | The folder in a raw repository |
dist |
no | The distribution of a Debian repository |
component |
no | The component of a Debian repository |
[[when]] |
no | A rule that publishes some versions elsewhere, as in Publish by version |
server = "https://repo.example.com"repo = "releases"The file names one repository. To publish to two, such as a library and a Debian package from one git repository, put a telesphorepo.toml in each folder and run telesphorepo publish in each.
Publish by version
Section titled “Publish by version”Each [[when]] rule names a version pattern and the keys it changes: repo, path, dist or component. The first rule that matches decides, and a version that no rule matches goes where the keys above say. In a pattern, * stands for any text.
server = "https://repo.example.com"repo = "maven-releases"
[[when]]version = "*-SNAPSHOT"repo = "maven-snapshots"The CLI prints the version and the repository before it publishes. It reads the version from the project:
| Project | Version |
|---|---|
| Gradle | version of the root project |
| Maven | project.version |
| npm | version in package.json |
| Cargo | version in Cargo.toml |
| Python | version in pyproject.toml |
| Helm | version in Chart.yaml |
| .NET | <Version> in the project file |
| Files | The version in each package: .deb, .rpm, .pkg.tar.*, .nupkg, .whl. Files of different versions can go to different repositories |
Raw files have no version: give one with --version. Each ecosystem marks a pre-release its own way, so write the pattern for yours: *-SNAPSHOT for Maven, *-* for npm pre-releases, *~* for a Debian version that sorts before its release.
CI variables
Section titled “CI variables”| Variable | What it is |
|---|---|
OIDC_TOKEN |
The identity token of a Jenkins job. Its audience must be the address of the server |
TELESPHOREPO_SERVER |
The server of the Docker credential helper in a CI job |
A GitHub Actions job needs no variable. It needs permissions: id-token: write.