Interactive package manager and resource monitor designed for the GNU/Linux.

Overview

Logo

pkgtop is an interactive package manager & resource monitor tool designed for the GNU/Linux.

Release AUR Travis Build Docker Build Codacy Badge Go Report Card Stars License

pkgtop

Package management (install/upgrade/remove etc.) can be a problem if the user is not familiar with the operating system or the required command for that operation. So pkgtop tries to solve this problem with an easy-to-use terminal interface and shortcut keys. Briefly, pkgtop aims to provide a terminal dashboard for managing packages on GNU/Linux systems. Using the terminal dashboard, it's possible to list installed packages by size (or alphabetically with -a argument), show information about the package, install/upgrade/remove packages and search package. Also, there are other handy shortcuts for easing the package management process which mentioned in the usage information.

In addition to the package management features, there's a section at the top of the dashboard that shows disk usages and general system information. For example, this section can be used as a resource monitor and help decide whether the system should be cleaned or not.
Another useful section is the 'executed' or 'confirm to execute' command list which is placed below the installed packages. Thus, the user can see which command executed recently or confirm & execute the selected command. (The commands that need confirmation to execute exist in the list with a prefix like "[y]".) After scrolling the commands list with "c" key for selecting the command to execute, press "y" for executing it. pkgtop will execute the command and restart the terminal dashboard afterwards.

pkgtop uses the advantage of mainly used package managers being installed on most of the preferred GNU/Linux distributions. As an example, it works on a Manjaro based system as it works on Arch Linux systems since both distributions use the Pacman package manager. You can use pkgtop if you have one of the package managers listed below.

  • pacman
  • apt
  • zypp
  • dnf
  • xbps
  • portage
  • nix
  • guix

If you are happy user of Arch-based distributive, you can use pkgtop with pacman wrappers and AUR supporters, such as yay or trizen. Look to this section for details.

If the distribution is not defined in the source but has the required package manager for running the pkgtop, -d argument can be used for specifying a distribution that has the same package manager. Current defined and supported distributions are arch, manjaro, debian, ubuntu, mint, suse, fedora, centos, redhat, void, gentoo, nixos, guix.

Installation

• Dependencies

• AUR (pkgtop-git)

git clone https://aur.archlinux.org/pkgtop-git.git && cd pkgtop-git/
makepkg --install

• Manual Installation

go get ./...
go build src/pkgtop.go
sudo mv pkgtop /usr/local/bin/

Preferably, go install command can be used.

Command-Line Arguments

-h, show help message
-d, select linux distribution
-c, main color of the dashboard (default: blue)
   [red, green, yellow, blue, magenta, cyan, white]
-pacman, pacman backend for arch-based distributions (default: pacman)
-a, sort packages alphabetically
-r, reverse the package list
-v, print version

AUR Support

You can specify which pacman wrapper you should to use by launch pkgtop with -pacman option. For example, for yay support:

$ pkgtop -pacman yay

If you don't want to provide the -pacman option every time on app launch, you can create bash alias on ~/.bashrc file.

~/.bashrc

alias pkgtop='pkgtop -pacman yay'

After that you can simply launch pkgtop command and get full AUR support, provided by yay wrapper.

Usage

Key Action
? help
enter, space, tab show package information
i install package
u/ctrl-u upgrade package/with input
r/ctrl-r remove package/with input
s,/ search package
g go to package (index)
y confirm and execute the selected command
p copy selected package
e copy selected command
c scroll executed commands list
j/k, down/up scroll down/up (packages)
ctrl-j/ctrl-k scroll to bottom/top (packages)
l/h, right/left scroll down/up (disk usage)
backspace go back
q, esc, ctrl-c, ctrl-d exit

List Installed Packages & Show Package Information

List Packages & Show Information

pressed keys: down, enter, backspace

Search, Go-to Package

Search, Go-to Package

pressed keys: s, (type), enter, g, (type), enter

Install, Upgrade, Remove Package

Install, Upgrade, Remove Package

pressed keys:
i, (type), enter, y -> install
ctrl-u, (type), enter, y -> upgrade
ctrl-r, (type), enter, y -> remove

Show Disk Usage Information

Show Disk Usage Information

pressed keys: right, left

Confirm Command to Execute

Confirm Command to Execute

pressed keys: c, y

Show Help

Show Help

pressed key: ?

Docker

Build Docker Image

docker build -f docker/Dockerfile -t pkgtop-docker .

Run the Container

docker run pkgtop-docker

Start a shell in the Container

docker run -it pkgtop-docker /bin/ash

Screenshots

Fedora Screenshot

Manjaro-Mint Screenshot

Debian-Ubuntu Screenshot

Todo(s)

  • Add 'paste' feature

Sponsor

If you would like to support the development of pkgtop and my other open source projects, consider becoming a patron.

License

GNU General Public License (v3)

Copyright

Copyright (c) 2019-2020, orhun

Comments
  • Ubuntu PPA?

    Ubuntu PPA?

    Hi,

    Any chance of getting this on an Ubuntu PPA?

    Not sure what's involved in getting this to happen but would be a nice thing for noobs like me to get this working and maintained on our systems :)

    enhancement 
    opened by domacikolaci 6
  • Any thoughts on supporting Gentoo?

    Any thoughts on supporting Gentoo?

    As the title says, any chance on supporting Gentoo (portage)?

    I've never worked with Go before, so I don't know how much I can help on that front. However I'm currently using Gentoo and I can help you with any commands you might need. (I saw that you call the package managers in the code for various information, which is why I brought it up.)

    enhancement 
    opened by Phate6660 6
  • Don't work on arch

    Don't work on arch

    When I try to do something, it crashes.

    For example, press '?' twice. No help, no navigation, no search, no installation.

    panic: runtime error: index out of range
    
    goroutine 1 [running]:
    github.com/gizak/termui/v3/widgets.(*List).Draw(0xc00011e5a0, 0xc000084360)
    	/home/lol/go/pkg/mod/github.com/gizak/termui/[email protected]/widgets/list.go:47 +0x8f4
    github.com/gizak/termui/v3.(*Grid).Draw(0xc00011c1a0, 0xc000084360)
    	/home/lol/go/pkg/mod/github.com/gizak/termui/[email protected]/grid.go:157 +0x1bb
    github.com/gizak/termui/v3.Render(0xc0000552a0, 0x2, 0x2)
    	/home/lol/go/pkg/mod/github.com/gizak/termui/[email protected]/render.go:25 +0x2a2
    main.start(0x555d6e, 0xc, 0x0)
    	pkgtop.go:560 +0x377c
    main.main()
    	pkgtop.go:648 +0x2bb
    

    Arch linux, including testing repo. Go version: go1.12.9 linux/amd64

    bug 
    opened by Feresey 5
  • Voidlinux (xbps) support?

    Voidlinux (xbps) support?

    I'll be able to help with command outputs.

    xbps-query -> https://wiki.voidlinux.org/XBPS#xbps-query

    manual -> https://man.voidlinux.org/xbps-query.1

    enhancement 
    opened by lugubris 4
  • Support Nix (nixpkgs)

    Support Nix (nixpkgs)

    It's known for its somewhat subpar CLI user experience so it would be especially great to have have Nix integrated with this "universal" interface.

    enhancement 
    opened by Shou 2
  • Fedora package

    Fedora package

    Hi, I'm a Fedora packager. I'm keeping an eye on the project and will try to get it into Fedora once it matures a bit. It requires submitting the termui package and this one, but both seem to be fairly simple.

    opened by gombosg 1
  • Partial upgrades are unsupported in Arch

    Partial upgrades are unsupported in Arch

    https://github.com/keylo99/pkgtop/blob/7710b5e85bafe4cc4fce65781fe5e2630a55881b/src/pkgtop.go#L56

    pacman -Sy is specifically unsupported in Arch and could lead to dependency issues, according to the Arch wiki.

    opened by BrianAllred 1
  • Might need to add a go.mod file to the src directory

    Might need to add a go.mod file to the src directory

    I tried installing pkgtop using the AUR method, but it failed with the following error message:

    go: cannot determine module path for source directory ... (outside GOPATH, no import comments)

    I noticed there wasn't any go.mod file for this project so I added one and after that I was able to install without any issues.

    module github.com/keylo99/pkgtop
    
    go 1.12
    
    require (
      github.com/atotto/clipboard v0.1.2
      github.com/dustin/go-humanize v1.0.0
      github.com/gizak/termui/v3 v3.1.0
    )
    
    enhancement 
    opened by ZahFox 1
  • Out of bounds rendering crash

    Out of bounds rendering crash

    Hi, first of all thanks for the tool! It seems like it can be very useful. I ran into this out of bounds bug, here are the steps to reproduce:

    • run pkgtop
    • press s
    • enter query for package that gives multiple results (without pressing enter)
    • press down arrow couple of times to look at another package
    • press ?

    The program should crash with this stack trace:

    panic: runtime error: index out of range
    
    goroutine 1 [running]:
    panic
            ../../../src/libgo/go/runtime/panic.go:554
    runtime_panicstring
            ../../../src/libgo/runtime/panic.c:38
    github_com_gizak_termui_v3_widgets.List.Draw
            ${HOME}/go/src/github.com/gizak/termui/v3/widgets/list.go:47
    github_com_gizak_termui_v3.Render
            ${HOME}/go/src/github.com/gizak/termui/v3/render.go:25
    main.scrollLists
            ${HOME}/go/src/pkgtop/src/pkgtop.go:249
    main.start
            ${HOME}/go/src/pkgtop/src/pkgtop.go:432
    main.main
            ${HOME}/go/src/pkgtop/src/pkgtop.go:648
    
    
    bug 
    opened by DSsoto 1
  • Unable to locate package pkgtop

    Unable to locate package pkgtop

    Hi there, came from your Reddit post!

    I wanted to install it using apt and Ubuntu in WSL (Windows Subsystem for Linux):

    sudo apt update
    sudo apt install pkgtop
    

    but got:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package pkgtop
    

    Any ideas?

    bug 
    opened by ricardoboss 1
  • Fix: debian package sizes

    Fix: debian package sizes

    5.6.20. Installed-Size

    This field appears in the control files of binary packages, and in the Packages files. It gives an estimate of the total amount of disk space required to install the named package. Actual installed size may vary based on block size, file system properties, or actions taken by package maintainer scripts.

    The disk space is given as the integer value of the estimated installed size in bytes, divided by 1024 and rounded up.

    opened by yunginnanet 0
Releases(2.4.1)
Owner
Orhun Parmaksız
FOSS Developer, Arch Linux Trusted User
Orhun Parmaksız
Go module that allows you to authenticate to Azure with a well known client ID using interactive logon and grab the token

azureimposter Go module that pretends to be any clientID and grabs an authentication token from Azure using interactive login (w/mfa if enabled) and r

Lars Karlslund 22 Dec 14, 2022
Provides AWS STS credentials based on Google Apps SAML SSO auth with interactive GUI support

What's this This command-line tool allows you to acquire AWS temporary (STS) credentials using Google Apps as a federated (Single Sign-On, or SSO) pro

Quan Hoang 34 Sep 29, 2022
🔒 JWT with RS-signing methods, designed for Gin.

GinRS 套用在 gin-gonic/gin 基於 RS256 演算法的 JWT 簽署套件。 非對稱金鑰 透過 openssl 產生一個私鑰。 openssl genrsa -out private.key 2048 再透過這個私鑰產生一個公鑰,這個公鑰可以配發到其他伺服器或是第三方的手中用來驗證

TeaCat 1 Feb 23, 2022
A demo using go and redis to implement a token manager

使用go-redis实现一个令牌管理器 需求描述 假设我们当前的所有服务需要一个第三方的认证,认证形式为:在发送请求的时候带上第三方颁发的令牌,该令牌具有一个时效性 第三方的令牌可以通过某个接口获取,但是该接口做了单位时间内的同一ip的请求频率的限制,因此在并发的场景下,我们需要控制令牌获取接口的频

Yuki Chen 0 Oct 19, 2021
SSH Manager - manage authorized_keys file on remote servers

SSH Manager - manage authorized_key file on remote servers This is a simple tool that I came up after having to on-boarding and off-boarding developer

Sam Ban 40 Dec 6, 2022
Go based HTTP server with 2FA based on OTP (One-Time Password) manager like Google Authenticator

Go based HTTP server with 2FA based on OTP (One-Time Password) manager like Goog

Valentin Kuznetsov 7 Aug 21, 2022
✨ Pretty TOTP manager in your terminal

asunder Asunder, Sweet and Other Distress asunder is a small pretty command-line TOTP manager. Installation Binaries Download a binary from the releas

obscurity 4 Dec 26, 2022
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.

sessions gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends. The key features are: Simple API: us

Gorilla Web Toolkit 2.5k Dec 28, 2022
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values for Go web applications.

securecookie securecookie encodes and decodes authenticated and optionally encrypted cookie values. Secure cookies can't be forged, because their valu

Gorilla Web Toolkit 605 Dec 26, 2022
Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications.

Goth: Multi-Provider Authentication for Go Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applic

Mark Bates 4k Dec 29, 2022
[DEPRECATED] Go package authcookie implements creation and verification of signed authentication cookies.

Package authcookie import "github.com/dchest/authcookie" Package authcookie implements creation and verification of signed authentication cookies. Co

Dmitry Chestnykh 111 Dec 22, 2022
Herbert Fischer 198 Oct 8, 2022
This package provides json web token (jwt) middleware for goLang http servers

jwt-auth jwt auth middleware in goLang. If you're interested in using sessions, checkout my sessions library! README Contents: Quickstart Performance

Adam Hanna 224 Dec 5, 2022
Minimalistic RBAC package for Go applications

RBAC Overview RBAC is a package that makes it easy to implement Role Based Access Control (RBAC) models in Go applications. Download To download this

Zack Patrick 104 Oct 25, 2022
jwt package for gin go applications

gin-jwt jwt package for gin go applications Usage Download using go module: go get github.com/ennaque/gin-jwt Import it in your code: import gwt "gith

Igor Volkov 2 Apr 21, 2022
auth0 is a package helping to authenticate using the Auth0 service.

auth0 auth0 is a package helping to authenticate using the Auth0 service. Installation go get github.com/auth0-community/go-auth0 Client Credentials

Paulus Robin 1 Feb 15, 2022
auth0 is a package helping to authenticate using the Auth0 service.

auth0 auth0 is a package helping to authenticate using the Auth0 service. Instal

GREAT BEYOND 0 Jan 13, 2022
Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.

❗ Cache package has been moved to libcache repository Go-Guardian Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to

Sanad Haj Yahya 426 Dec 23, 2022
simple-jwt-provider - Simple and lightweight provider which exhibits JWTs, supports login, password-reset (via mail) and user management.

Simple and lightweight JWT-Provider written in go (golang). It exhibits JWT for the in postgres persisted user, which can be managed via api. Also, a password-reset flow via mail verification is available. User specific custom-claims also available for jwt-generation and mail rendering.

Max 31 Dec 18, 2022