• Stars
    star
    391
  • Rank 110,003 (Top 3 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Universal Package-management Tool for any OS.

UPT — Universal Package-management Tool

Build status Crates.io

Upt provides a unified command interface to manage packages for any operating system.

Upt relies on the platform's package management tool to perform the task, it's more like a wrapper or adaptive alias.

Install

Use Cargo

Upt is written in the rust so you can install it using cargo.

cargo install upt

Use Shell (Mac, Linux)

curl -fsSL https://raw.githubusercontent.com/sigoden/upt/main/install.sh | sh -s -- --to /usr/local/bin

Binaries for macOS, Linux, Windows, BSD

Download from GitHub Releases, unzip and add upt to your $PATH.

Features

Unified command interface

Each operating system (OS) has its own package management tool, which requires different commands to complete the same operation. This can be inconvenient when switching between or trying new OSs.

apt install $pkg          # Ubuntu, Debian, Linux Mint...
apk add $pkg              # Alpine
pacman -S $pkg            # Arch, Manjaro...
nix-env -i $pkg           # Nixos
xbps-install $pkg         # Voidlinux
emerge $pkg               # Gentoo

With upt, You just need to remember one command:

upt install $pkg          # Works on any OS

Upt identifies the os type and runs the appropriate package management tool to install $pkg.

Act as another tool

Upt can act as another tool and use their syntax by renaming it.

cp upt brew
brew install $pkg

cp upt pacman
pacman -S $pkg

cp upt emerge
emerge $pkg

In this way, you can use the syntax of the tool you are most familiar with to manage packages.

Supported tools

| Tool        | Install                     | Uninstall                   | Upgrade                         | Search                | Info                           | Update Index           | Upgrade All              | List Installed                    |
| ----------- | --------------------------- | --------------------------- | ------------------------------- | --------------------- | ------------------------------ | ---------------------- | ------------------------ | --------------------------------- |
| upt         | upt install $pkg            | upt remove/uninstall $pkg   | upt upgrade $pkg                | upt search $pkg       | upt info/show $pkg             | upt update             | upt upgrade              | upt list                          |
| apk         | apk add $pkg                | apk del $pkg                | apk upgrade $pkg                | apk search $pkg       | apk info $pkg                  | apk update             | apk upgrade              | apk list -I/--installed           |
| apt         | apt install $pkg            | apt remove $pkg             | apt install --only-upgrade $pkg | apt search $pkg       | apt show $pkg                  | apt update             | apt upgrade              | apt list -i/--installed           |
| brew        | brew install $pkg           | brew uninstall $pkg         | brew upgrade $pkg               | brew search $pkg      | brew info $pkg                 | brew update            | brew upgrade             | brew list                         |
| cards       | cards install $pkg          | cards remove $pkg           | cards install -u/--upgrade $pkg | cards search $pkg     | cards info $pkg                | cards sync             | cards upgrade            | cards list                        |
| choco       | choco install $pkg          | choco uninstall $pkg        | choco upgrade $pkg              | choco search $pkg     | choco info $pkg                | -                      | choco upgrade all        | choco list                        |
| dnf         | dnf install $pkg            | dnf remove $pkg             | dnf upgrade $pkg                | dnf search $pkg       | dnf info $pkg                  | dnf check-update       | dnf update               | dnf list --installed              |
| emerge      | emerge $pkg                 | emerge --depclean $pkg      | emerge --update $pkg            | emerge --search $pkg  | emerge --info $pkg             | emerge --sync          | emerge -vuDN @world      | qlist -lv                         |
| eopkg       | eopkg install $pkg          | eopkg remove $pkg           | eopkg upgrade $pkg              | eopkg search $pkg     | eopkg info $pkg                | eopkg update-repo      | eopkg upgrade            | eopkg list-installed              |
| flatpak     | flatpak install $pkg        | flatpak uninstall $pkg      | flatpak update $pkg             | flatpak search $pkg   | flatpak info $pkg              | -                      | flatpak update           | flatpak list                      |
| guix        | guix install $pkg           | guix remove $pkg            | guix upgrade $pkg               | guix search $pkg      | guix show $pkg                 | guix refresh           | guix upgrade             | guix package -I/--list-installed  |
| nix-env     | nix-env -i/--install $pkg   | nix-env -e/--uninstall $pkg | nix-env -u/--upgrade $pkg       | nix-env -qaP $pkg     | nix-env -qa --description $pkg | nix-channel --update   | nix-env -u/--upgrade     | nix-env -q/--query --installed    |
| opkg        | opkg install $pkg           | opkg remove $pkg            | opkg upgrade $pkg               | opkg find $pkg        | opkg info $pkg                 | opkg update            | opkg upgrade             | opkg list --installed             |
| pacman      | pacman -S $pkg              | pacman -Rs $pkg             | pacman -S $pkg                  | pacman -Ss $pkg       | pacman -Si $pkg                | pacman -Sy             | pacman -Syu              | pacman -Q                         |
| pkg         | pkg install $pkg            | pkg remove $pkg             | pkg install $pkg                | pkg search $pkg       | pkg info $pkg                  | pkg update             | pkg upgrade              | pkg info -a/--all                 |
| pkg(termux) | pkg install $pkg            | pkg uninstall $pkg          | pkg install $pkg                | pkg search $pkg       | pkg show $pkg                  | pkg update             | pkg upgrade              | pkg list-installed                |
| pkgman      | pkgman install $pkg         | pkgman uninstall $pkg       | pkgman update $pkg              | pkgman search $pkg    | -                              | pkgman refresh         | pkgman update            | pkgman search -i -a               |
| prt-get     | prt-get install $pkg        | prt-get remove $pkg         | prt-get update $pkg             | prt-get search $pkg   | prt-get info $pkg              | ports -u               | prt-get sysup            | prt-get listinst                  |
| scoop       | scoop install $pkg          | scoop uninstall $pkg        | scoop update $pkg               | scoop search $pkg     | scoop info $pkg                | scoop update           | scoop update *           | scoop list                        |
| slackpkg    | slackpkg install $pkg       | slackpkg remove $pkg        | slackpkg upgrade $pkg           | slackpkg search $pkg  | slackpkg info $pkg             | slackpkg update        | slackpkg upgrade-all     | ls -1 /var/log/packages           |
| snap        | snap install --classic $pkg | snap remove $pkg            | snap refresh $pkg               | snap find $pkg        | snap info $pkg                 | -                      | snap refresh             | snap list                         |
| urpm        | urpmi $pkg                  | urpme $pkg                  | urpmi $pkg                      | urpmq -y/--fuzzy $pkg | urpmq -i $pkg                  | urpmi.update -a        | urpmi --auto-update      | rpm -q/--query --all              |
| winget      | winget install $pkg         | winget uninstall $pkg       | winget upgrade $pkg             | winget search $pkg    | winget show $pkg               | -                      | winget upgrade --all     | winget list                       |
| xbps        | xbps-install $pkg           | xbps-remove $pkg            | xbps-install -u/--update $pkg   | xbps-query -Rs $pkg   | xbps-query -RS $pkg            | xbps-install -S/--sync | xbps-install -u/--update | xbps-query -l/--list-pkgs         |
| yum         | yum install $pkg            | yum remove $pkg             | yum upgrade $pkg                | yum search $pkg       | yum info $pkg                  | yum check-update       | yum update               | yum list --installed              |
| zypper      | zypper install $pkg         | zypper remove $pkg          | zypper update $pkg              | zypper search $pkg    | zypper info $pkg               | zypper refresh         | zypper update            | zypper search -i/--installed-only |

OS Tools

+------------------------------------------------------+----------------------+
| OS                                                   | Tools                |
+------------------------------------------------------+----------------------+
| windows                                              | scoop, choco, winget |
+------------------------------------------------------+----------------------+
| macos                                                | brew, port           |
+------------------------------------------------------+----------------------+
| ubuntu, debian, linuxmint, pop, deepin, elementray   | apt                  |
| kali, raspbian, aosc, zorin, antix, devuan, bodhi    |                      |
| lxle, sparky                                         |                      |
+------------------------------------------------------+----------------------+
| fedora, redhat, rhel, amzn, ol, almalinux, rocky     | dnf, yum             |
| oubes, centos, qubes, eurolinux                      |                      |
+------------------------------------------------------+----------------------+
| arch, manjaro, endeavouros, arcolinux, garuda        | pacman               |
| antergos, kaos                                       |                      |
+------------------------------------------------------+----------------------+
| alpine, postmarket                                   | apk                  |
+------------------------------------------------------+----------------------+
| opensuse, opensuse-leap, opensuse-tumbleweed         | zypper               |
+------------------------------------------------------+----------------------+
| nixos                                                | nix-env              |
+------------------------------------------------------+----------------------+
| gentoo, funtoo                                       | emerge               |
+------------------------------------------------------+----------------------+
| void                                                 | xbps                 |
+------------------------------------------------------+----------------------+
| mageia                                               | urpm                 |
+------------------------------------------------------+----------------------+
| slackware                                            | slackpkg             |
+------------------------------------------------------+----------------------+
| solus                                                | eopkg                |
+------------------------------------------------------+----------------------+
| openwrt                                              | opkg                 |
+------------------------------------------------------+----------------------+
| nutyx                                                | cards                |
+------------------------------------------------------+----------------------+
| crux                                                 | prt-get              |
+------------------------------------------------------+----------------------+
| freebsd, ghostbsd                                    | pkg                  |
+------------------------------------------------------+----------------------+
| android                                              | pkg(termux)          |
+------------------------------------------------------+----------------------+
| haiku                                                | pkgman               |
+------------------------------------------------------+----------------------+
| *                                                    | apt, dnf, pacman     |
+------------------------------------------------------+----------------------+

Upt will determine which package management tool to use based on the above table.

Some platforms may support multiple package management tools, upt selects one of them in order.

You can specify the package manager that UPT should use by setting the UPT_TOOL environment variable.

UPT_TOOL=brew upt install $pkg            # equal to `brew install $pkg`
UPT_TOOL=nix-env upt install $pkg         # equal to `nix-env -i $pkg`

License

Copyright (c) 2023-∞ upt-developers.

Upt is made available under the terms of either the MIT License or the Apache License 2.0, at your option.

See the LICENSE-APACHE and LICENSE-MIT files for license details.

More Repositories

1

dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Rust
5,158
star
2

aichat

All-in-one AI CLI tool that integrates 20+ AI platforms, including OpenAI, Azure-OpenAI, Gemini, Claude, Mistral, Cohere, VertexAI, Bedrock, Ollama, Ernie, Qianwen, Deepseek...
Rust
3,111
star
3

argc

A Bash CLI framework, also a Bash-based command runner.
Rust
665
star
4

window-switcher

Easily switch between windows of the same app with Alt+` (Backtick), also switch between apps with Alt+Tab.
Rust
415
star
5

proxyfor

A lightweight proxy for capturing HTTP(S) and WS(S) traffic.
Rust
258
star
6

argc-completions

{bash,zsh,fish,powershell,nushell}-completions for 1000+ commands.
Shell
188
star
7

netease-music-crx

浏览器插件版网易云音乐
JavaScript
156
star
8

wechatpay

微信支付 SDK,支持刷卡支付、公众号支付、扫码支付、APP支付、H5支付,以及优惠券,红包,企业付款,微信代扣
TypeScript
113
star
9

apitest

Apitest is declarative api testing tool with JSON-like DSL.
TypeScript
110
star
10

projclean

Project dependencies & build artifacts cleanup tool.
Rust
92
star
11

htte

Document Driven API Test Framework
JavaScript
73
star
12

clii

Easily build a cli app.
TypeScript
40
star
13

dynimgen

A dynamic image generator.
Rust
30
star
14

opscan

A open port scanner.
Rust
30
star
15

chrome-extensions-manager

A snapshot based chrome extensions manager
JavaScript
27
star
16

wechat-devtools

使用 Linux, Docker 运行微信 web 开发者工具
Shell
21
star
17

llm-functions

Extend LLM with functions written in bash/js/python.
Shell
17
star
18

runme

[Deprecatd] A shell-script based task runner.
Rust
13
star
19

tomato-timer

A terminal tomato timer with notification
Rust
11
star
20

vmprotect-keygen

vmprotect keygen for nodejs
TypeScript
9
star
21

wasm-pkg-build

Effortlessly create npm packages from Rust wasm crates.
TypeScript
8
star
22

webhook

webhook-cli is a lightweight configurable tool written in NodeJS, that allows you to easily create HTTP endpoints (hooks) on your server, which you can use to execute configured commands
JavaScript
6
star
23

a-captcha

A Lightweight Pure JavaScript Captcha for Node.js
TypeScript
5
star
24

subexpo

Block explorer for Substrate based chain
JavaScript
4
star
25

xf

File-aware dynamic command runner.
Rust
3
star
26

node-fisheye

A opencv fisheye camera model bindings for Node.js.
C++
3
star
27

chatgpt-wechat-browser-extension

ChatGPT For Wechat FileHelper
JavaScript
2
star
28

glob-convert-encoding

Convert encoding of files that match glob
JavaScript
2
star
29

sequelize-modelgen

Generate sequelize models from sql
JavaScript
2
star
30

node-imagediff

Diff image to check whether objects have changed.
C++
2
star
31

gatsby-plugin-baidu-tongji

添加百度统计到 Gatsby 站点
JavaScript
2
star
32

deepin-wine-baidupan-arch

在Archlinux及衍生发行版上运行百度盘
Shell
2
star
33

conditions-lang

Boolean language for conditional builds, stages, jobs
TypeScript
2
star
34

fakepty

Run a command in a fake pty.
Rust
2
star
35

mynotes

My persional notebook.
2
star
36

orgdo

Command-line tool to manage the Todo lists
TypeScript
1
star
37

iredismodule

Create redis module with rust
Rust
1
star
38

trisue

Trisue是一款 REST API 调试及异常报告工具
JavaScript
1
star
39

dee

document-driven web framework, powered by express and openapi
TypeScript
1
star
40

use-services-packages

TypeScript
1
star
41

solid-color-page

Solid color page
HTML
1
star
42

fswebcam

wrap linux tool fswebcam to manipulate cameras
JavaScript
1
star
43

wasm-toml-js

TOML format for Node.js
Rust
1
star
44

alipay

蚂蚁金服开放平台 node sdk
TypeScript
1
star
45

myblog

Shell
1
star
46

toy-ipfs

Rust
1
star
47

change-case

Transform a string between camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others.
Rust
1
star
48

mycrypt

Encrypt/decrypt your file
Rust
1
star
49

terminal-fonts

Big fonts for terminal display. Each character is a block formed by many dots.
Rust
1
star
50

calc-rs

A simple arithmetic calculator written in rust
Rust
1
star
51

install-gh-release

A website to automatically generate bash script to install binary published on github releases.
HTML
1
star
52

fp-course

Functional Programming Course
Haskell
1
star
53

dee-swaggerize

swagger document driven route builder for dee framework
JavaScript
1
star
54

install-binary

GitHub Action to install a binary from a GitHub Release
TypeScript
1
star