All Projects â†’ sigoden â†’ Upt

sigoden / Upt

Licence: mit
Universal Package-management Tool for Windows, macOS and Linux.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Upt

Express React Boilerplate
🚀🚀🚀 This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.
Stars: ✭ 32 (-28.89%)
Mutual labels:  universal
Mabipack
Mabinogi Package File Management Tool. Multi-language support in Chinese, English, Japanese and Korean.
Stars: ✭ 36 (-20%)
Mutual labels:  package-management
Coreutils
Cross-platform Rust rewrite of the GNU coreutils
Stars: ✭ 9,603 (+21240%)
Mutual labels:  command-line-tool
Pubx
The missing pub commands
Stars: ✭ 34 (-24.44%)
Mutual labels:  package-management
Cryptoanalysis
CogniCrypt_SAST: CrySL-to-Static Analysis Compiler
Stars: ✭ 36 (-20%)
Mutual labels:  command-line-tool
Samay
Command line Time tracking and reporting. Built using Go(programming language) and protocol buffers.
Stars: ✭ 37 (-17.78%)
Mutual labels:  command-line-tool
Stdrename
'stdrename' is a small command line utility to rename all files in a folder according to a specified naming convention (camelCase, snake_case, kebab-case, etc.).
Stars: ✭ 28 (-37.78%)
Mutual labels:  command-line-tool
Ed
A modern UNIX ed (line editor) clone written in Go
Stars: ✭ 44 (-2.22%)
Mutual labels:  command-line-tool
Football Cli
âš½ Command line interface for Hackers who love football
Stars: ✭ 984 (+2086.67%)
Mutual labels:  command-line-tool
Kube Aliases
Kubernetes Aliases and Bash Functions
Stars: ✭ 40 (-11.11%)
Mutual labels:  command-line-tool
Google Images Download
Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code!
Stars: ✭ 7,815 (+17266.67%)
Mutual labels:  command-line-tool
Wsay
Windows "say"
Stars: ✭ 36 (-20%)
Mutual labels:  command-line-tool
Webpack Isomorphic Dev Middleware
The webpack-dev-middleware, but for isomorphic applications
Stars: ✭ 38 (-15.56%)
Mutual labels:  universal
Env Cmd
Setting environment variables from a file
Stars: ✭ 969 (+2053.33%)
Mutual labels:  command-line-tool
Apployees Nx
A collection of builders and extensions for the https://nx.dev monorepo tooling.
Stars: ✭ 43 (-4.44%)
Mutual labels:  universal
Suicrux
🚀 Ultimate universal starter with lazy-loading, SSR and i18n. [not maintained]
Stars: ✭ 958 (+2028.89%)
Mutual labels:  universal
Sqlite Global Tool
SQLite .NET Core CLI tool that allows the user to manually enter and execute SQL statements with or without showing query result.
Stars: ✭ 37 (-17.78%)
Mutual labels:  command-line-tool
Catage
Node package and CLI tool to convert code into an image with syntax highlighting
Stars: ✭ 44 (-2.22%)
Mutual labels:  command-line-tool
Push Starter
React Redux Starter with SSR 🤖
Stars: ✭ 43 (-4.44%)
Mutual labels:  universal
Autovpn
THIS PROJECT IS UNMAINTAINED.
Stars: ✭ 997 (+2115.56%)
Mutual labels:  command-line-tool

Upt — Universal Package-management Tool.

Build status Crates.io

English | 简体中文

Features

Unified Command

Each OS has its own package management tool. To complete the same operation, you need to enter different commands.

For example, we need to get an updatable package, We have to execute the following command:

apt list --upgradable       # Ubuntu, Debian, Linux Mint...
yum list updates          # Centos, Redhat...
brew outdated             # MacOS Homebrew
apk list --upgrades       # Alpine
pacman -Qu                # Arch, Manjaro...
choco outdated            # Windows Chocolatey
dnf list --upgrades       # Fedora

This brings us a lot of inconvenience in switching and experiencing the new OS. After all, package management is a essential and common operation.

upt can solve this problem. It can run on various platforms and even in various distributions, provided Unified Command to execute the package management operations.

upt list -u # All in one command

UPT only provides a unified interface, and the package management function is implemented by calling the system's native tools.

Command Replacement

Everyone has their familiar operating system and package management tool.

People who use MacOS may be familiar with the brew command, People who use Windows may be familiar with the choco command, People who use Ubuntu may be familiar with the apt command。

In order to use upt, you have to learn upt command, which is not easy. Fortunately, upt supports command replacement. You do not need to learn a new command.

If you are a person familiar with brew, when you have to manage the package in Ubuntu, you can download the upt command. By rename upt to brew. You can use brew-style for package management in Ubuntu.

cp upt brew
brew install wget # upt will work like brew

Many supported package management tools

  • [x] apk
  • [x] apt
  • [x] brew
  • [x] choco
  • [x] scoop
  • [x] dnf
  • [x] pacman
  • [x] yum

Install

Download Binary

Binary are available for download Releases . Make sure to put the path to the binary into your PATH.

mv upt /usr/local/bin # Linux, MacOS
:: Windows, Run as administrator
move upt C:\Windows\System32

Use Cargo

upt is written in the rust language and posted to crates. So you can install it using cargo.

# curl https://sh.rustup.rs -sSf | sh # 安装 cargo
cargo install upt

Usage

  • Install packages
upt install vim                 # install a single package
upt install vim ripgrep         # install multiple packages
upt install -y vim              # assume yes when installing
  • Remove packages
upt remove vim                  # remove a single package
upt remove vim ripgrep          # remove multiple packages
upt remove -y vim               # assume yes when removing
  • Upgrade packages
upt upgrade vim                 # upgrade a single package
upt upgrade vim ripgrep         # upgrade multiple packages
upt upgrade -y vim              # assume yes when upgrading
  • Search for package
upt search vim
  • Show package details
upt show vim
  • Update indexes of packages
upt update
  • Upgrade all packages
upt upgrade
upt upgrade -y                  # assume yes when upgrading
  • List all upgradable packages
upt list -i
  • List all installed packages
upt list -u

If you feel upt should support a package management operation, feel free to create issue to discuss it.

Command Replacement Table

The upt executable file is small, but it needs to be universal across the platform. It is impossible to embed package management function.

upt implements package management functions by calling the system's native tools. So upt is essentially an interpreter.

When you run upt in Ubuntu:

  • Input upt list -u
  • After parsing, upt find that you are going to execute task: `list all updatable packages'.
  • upt detects the apt package management tool used by your system.
  • upt interpret the task list all updatable packages to apt command.
  • Run apt list --upgradable.

If you rename upt to brew, upt will use the brew syntax to resolve the task. Command Replacement is implemented this way.

The following table is the input and output mapping:

| task                         | upt              | apt                   | brew                | choco                | yum                | dnf                  | pacman          | apk                  |
| :--------------------------- | :--------------- | :-------------------- | :------------------ | :------------------- | :----------------- | :------------------- | :-------------- | :------------------- |
| Install packages             | upt install $pkg | apt install $pkg      | brew install $pkg   | choco install $pkg   | yum install $pkg   | dnf install $pkg     | pacman -S $pkg  | apk add $pkg         |
| Remove packages              | upt remove $pkg  | apt remove $pkg       | brew uninstall $pkg | choco uninstall $pkg | yum remove $pkg    | dnf remove $pkg      | pacman -Rs $pkg | apk del $pkg         |
| Upgrade packages             | upt upgrade $pkg | apt install $pkg      | brew upgrade $pkg   | choco upgrade $pkg   | yum update $pkg    | dnf upgrade $pkg     | pacman -S $pkg  | apk upgrade $pkg     |
| Search for package           | upt search $pkg  | apt search $pkg       | brew search $pkg    | choco search $pkg    | yum search $pkg    | dnf search $pkg      | pacman -Ss $pkg | apk search $pkg      |
| Show package details         | upt show $pkg    | apt show $pkg         | brew info $pkg      | choco info $pkg      | yum info $pkg      | dnf info $pkg        | pacman -Si $pkg | apk info $pkg        |
| Update indexes of packages   | upt update       | apt update            | brew update         | choco upgrade --noop | yum check-update   | dnf check-update     | pacman -Syy     | apk update           |
| Upgrade all packages         | upt upgrade      | apt upgrade           | brew upgrade        | choco upgrade all    | yum update         | dnf upgrade          | pacman -Syu     | apk upgrade          |
| List all upgradable packages | upt list -u      | apt list --upgradable | brew outdated       | choco outdated       | yum list updates   | dnf list --upgrades  | pacman -Qu      | apk list --upgrades  |
| List all installed packages  | upt list -i      | apt list --installed  | brew list           | choco list -lai      | yum list installed | dnf list --installed | pacman -Qe      | apk list --installed |

The table also lists:

  • commands that can be replaced
  • Supported package management tools
  • Syntax for inter-command conversion

If you find errors or want to add other package management tools, please issue.

License

Copyright (c) 2019 sigoden

Licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].