tea is creating new technologies that will change the way code is distributed
Max Howell, author of the popular macOS homebrew package management system brew , announced that he is working on the development of a new package manager called Tea, which is positioned as a continuation of brew's development, going beyond the package manager and offering a unified package management infrastructure that works with decentralized repositories.
Tea is not conceptually like traditional package managers , and instead of the "I want to install a package" paradigm, it uses the "I want to use a package" approach.
Specifically, Tea doesn't have a package installation command as such; instead, it uses environment generation to run package contents that don't overlap with the current system. Packages are placed in a separate ~/.tea directory and are not assigned to absolute paths (they can be moved).
Tea provides two basic modes of operation: jumping to a command shell with access to an environment with installed packages, and directly invoking package-related commands. For example, running "tea +gnu.org/wget" will cause the package manager to download the wget utility and all necessary dependencies, and then provide shell access in an environment where the installed wget utility is available.
The second option involves a direct launch: ` tea +gnu.org/wget -qO- tea.xyz/white-paper | tea +charm.sh/glow glow -` , which will install the wget utility and run it immediately in a separate environment, downloading a file that will then be rendered with glow. A more complex chain is possible; for example, to download the file `white-paper.pdf` and process it with the glow utility, you can use the following command (if wget and glow are not already present, they will be installed).
Similarly, you can directly run scripts , code examples, and clever phrases, automatically loading the tools needed for the job.
For no example, run:
tea https://gist.githubusercontent.com/i0bj/2b3afbe07a44179250474b5f36e7bd9b/raw/colors.go --yellow
tea: installing go 1.18.3
go: installing deps
go: running colors.go
…
It will install the Go language toolkit and run the colors.go script with the “–yellow” as argument.
To avoid calling the tea command every time, you can connect it as a universal virtual environment manager and missing program handler. In this case, if the running program is unavailable, it will be installed, and if it was previously installed, it will be launched in your environment.
In its current form, the packages available for Tea are collected in two collections , pantry.core and pantry.extra , which include metadata describing the package download sources, build scripts, and dependencies.
The pantry.core collection includes core libraries and utilities that Tea developers keep updated and tested. pantry.extra contains packages that are not yet well-stabilized or that are suggested by the community. A web interface is provided for browsing the packages.
The process of creating packages for Tea is greatly simplified and reduced to creating a universal package.yml file (example), which does not require the package to be adapted for each new version. To discover new versions and download its code, the package can be linked to GitHub.
The file also describes dependencies and provides build scripts for supported platforms. Installed dependencies are immutable (version is fixed), which eliminates repeating situations similar to the left pad incident.
In the future, plans are in place to create decentralized repositories that are not tied to any separate storage and to use a distributed blockchain for metadata and a decentralized infrastructure for storing packages. Versions will be certified directly by the maintainers and reviewed by stakeholders. It may be possible to distribute cryptocurrency tokens to contribute to the maintenance, support, distribution, and verification of packages.
Finally, it's worth mentioning that the project is currently being developed as a cross-platform application (macOS and Linux are currently supported, with Windows support under development). The project code is written in TypeScript and distributed under the Apache 2.0 license (brew was written in Ruby and released under a BSD license).
If you are interested in learning more, you can consult the details and user manual for Tea at the following link.