brew creator develops new tea package manager

Max Howell, author of the popular macOS brew (Homebrew) package management system, is developing a new package manager, Tea, positioned as a continuation of the development of brew, going beyond the package manager and offering a unified package management infrastructure that works with decentralized repositories. The project is initially developed as a multi-platform one (currently macOS and Linux are supported, Windows support is under development). The project code is written in TypeScript and distributed under the Apache 2.0 license (brew was written in Ruby and shipped under a BSD license).

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" paradigm. In particular, Tea does not have a package installation command as such, instead using environment generation to execute package contents that do not overlap with the current system. Packages are placed in a separate ~/.tea directory and are not mapped to absolute paths (can be moved).

Two basic modes of operation are provided: jumping to a command shell with access to an environment with installed packages, and directly invoking package-related commands. For example, when executing "tea +gnu.org/wget", the package manager will 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 implies a direct launch - "tea +gnu.org/wget wget https://some_webpage", which will install the wget utility and immediately launch it in a separate environment. Complex chaining is possible, for example, to download the white-paper.pdf file and process it with the glow utility, you can use the following construction (if wget and glow are not present, they will be installed): tea +gnu.org/wget wget -qO- https:/ /tea.xyz/white-paper.pdf | tea +charm.sh/glow glow - or you can use the simpler syntax: tea -X wget -qO- tea.xyz/white-paper | tea -X glow

Similarly, you can directly run scripts, code examples, and one-liners, automatically loading the tools necessary for their work. For example, executing "tea https://gist.githubusercontent.com/i0bj/…/raw/colors.go --yellow" will install the Go language toolkit and execute the colors.go script with the --yellow argument.

In order not to call the tea command every time, it is possible to connect it as a universal manager of virtual environments and a handler for missing programs. In this case, if the running program is not available, it will be installed, and if it was installed earlier, it will be launched in its environment. $ deno zsh: command not found: deno $ cd my-project $ deno tea: installing deno.land^1.22 deno 1.27.0 > ^D

In its current form, the packages available to Tea are collected in two collections, pantry.core and pantry.extra, which include metadata describing package download sources, build scripts, and dependencies. The pantry.core collection includes core libraries and utilities that are kept up to date and tested by the Tea developers. pantry.extra contains packages that are not well-stabilized or that are suggested by the community. A web interface is provided for navigating through the packages.

The process of creating packages for Tea is greatly simplified and boils down to creating one universal package.yml file (example), which does not require the package to be adapted for each new version. To discover new versions and download their code, the package can link to GitHub. The file also describes dependencies and provides build scripts for supported platforms. Installed dependencies are immutable (the version is fixed), which eliminates the repetition of situations similar to the left-pad incident.

In the future, it is planned to create decentralized repositories that are not tied to any separate storage and use a distributed blockchain for metadata, and a decentralized infrastructure for storing packages. Releases will be certified directly by maintainers and reviewed by stakeholders. It is possible to distribute cryptocurrency tokens for contribution to the maintenance, support, distribution and verification of packages.

brew creator develops new tea package manager


Source: opennet.ru

Add a comment