PacKageManager - Simple apt-style yay wrapper
pkm is simple AUR helper intended to be used alongside with yay. It is not trying to be full replacement, but tries to improve and streamline installation/discovery sprocess.
All pkm commands are simply yay commands, wrapped in apt/pamac ux, which are displayed as is except search. Search in pkm is tweaked to have minimal interface and provide better results sorting.
1. Install yay and follow yay first use
Compilation of this repository requires dlang.
- Clone this repo and build it with
dub build -b release
- Copy created binary
./bin/pkm
to somewhere in your path, for example~/.local/bin/
- Or build project with
dub build pkm -b release -c install
to automatically move compiled binary into/usr/bin
- Go to releases and download binary.
- Copy downloaded binary
pkm
to somewhere in your path, for example~/.local/bin/
- Install with any package manager of your choice. Assuming you have
yay
install withyay -Syu pkm
- Fetch package with
dub fetch pkm
- Build and install into
/usr/bin
withdub build pkm -b release -c install
pkm commands follow pamac/apt syntax. Installing pkm install package
, removing pkm remove package
, etc..
If you want to perform any of following command only on AUR then add --aur
or -a
flag to your command.
Command | Description | yay command |
---|---|---|
search | Search for package. | yay -Ss [terms...] |
list | List installed packages. | yay -Q |
info | Print info about package. | yay -Qi [packages...] |
install | Install package. | yay -S [packages...] |
remove | Remove package. | yay -R [packages...] |
checkupdates | Checks for available updates. | yay -Qu |
update | Update repositories. | yay -Sy [packages...] |
upgrade | Upgrade installed packages. | yay -Su [packages...] |
clean | Clean unneeded dependencies. | yay -Yc |
pkm can be configured with config file located at ~/.config/pkm/conf.yaml
, ~/.config/pkm/pkm.yaml
or ~/.pkm.yaml
, one at ~
takes prority.
Name | Type | Description | Default |
---|---|---|---|
yaypath | string | Custom path to yay binary. | Guessed with which |
yaysearch | bool | Disable custom pkm search. | false |
color | bool | Sets if search will be printed with colors. Will not work if yaysearch is true . |
true |
separate | bool | Separates search results with separator. Will not work if yaysearch is true . |
false |
separator | string | Sets separator for separate option. If it's unicode escape sequence then it must be wrapped in " |
"\u2500" |
separator-color | string | Sets formatting for separate option. Must be set with \e as escape symbol |
\e[90m |
auronly | bool | Should yay search only AUR. | false |
managers | string[] | Defines custom managers. | [ ] |
custom | string[] | Custom commands. | [ ] |
You can set custom main package manager with yaypath.
If you're using pacman/yay-compatible package manager then you can use it as is while only setting yaysearch to true.
yaypath: /usr/bin/pacman
yaysearch: yes
In case of package managers with flags/commands not compatible with pacman/yay you can override default commands with custom commands.
yaypath: /usr/bin/pamac
yaysearch: yes
custom:
# Overrides default search with pamac search and disables aur
search: search --no-aur
Allows usage of custom managers such as pacman, pamac and other package managers and aur helpers.
Custom managers can be used only with custom commands.
managers:
# name: path
pacman: /usr/bin/pacman
pamac: /usr/bin/pamac
aura: /usr/bin/aura
custom:
# If you want to use custom package manager with custom command simply supply it
# as first argument
sysupdate: pacman -Syu
Allows to create custom commands and overriding default commands.
If first argument will match any custom defined managers then this manager will be used.
If you want to override any command make sure that there's no duplicate keys in current KeyMap (i.e. custom:
) since yaml does not allow for them.
Also args must be split by space, so avoid spaces inside one argument, votecool: -Wv "my thing"
will be split as ['-Wv', '"my', 'thing"']
.
managers:
aura: /usr/bin/aura
pamac: /usr/bin/pamac
custom:
# command: [args...]
# Args must exclude yay as pkm will auto-supply it
updupg: -Syu
vote: -Wv
unvote: -Wu
gendb: -Y --gendb
# Uses custom package manager (in that case aura)
updateaur: aura -Au
# Overrides default serach
search: pamac search
Aliases can be either a command or custom command.
alias:
# alias: name
i: install
s: search
find: search
# Pointing to custom command shown in previous example
u: unvote
Example config:
# conf.yaml
yaypath: ~/.local/bin/yay
yaysearch: yes
auronly: yes
custom:
updupg: -Syu
vote: -Wv
unvote: -Wu
alias:
i: install
s: search
r: remove
All available pkm
commands are calling yay
with corresponding flags. This is true for search, but pkm also performs special operations to customise and improve yay's search.
Search always follows this schema:
package-name [a] [o] [i] version/installed-version package-size/votes install-size/popularity [repo]
description
Here's small table to assist you in reading it:
Field | Meaning | Special notes |
---|---|---|
package-name | Name of package. | |
[a] | Is package orphaned. | Highlighted in red when true. If color is disabled displayed as [ ]. "A" stands for abandoned. |
[o] | Is package outdated. | Highlighted in red when true. If color is disabled displayed as [ ]. |
[i] | Is package installed. | Highlighted in green when true. If color is disabled displayed as [ ]. |
version | Version of package. | If installed version is different from current verison then field shows installed version hightlighed in light magenta. If color is disabled version diff shown with @ at start. |
package-size/votes | See notes. | If package from AUR: Package votes. If package not from AUR: Package size. |
package-size/votes | See notes. | If package from AUR: Package popularity. If package not from AUR: Installation size. |
[repo] | Repository of package. | Repository name is cropped to 3 symbols. |
description | Description. |
If package is from AUR then it's displaying votes/popularity instead of size and votes/popularity are highlighted in this way:
-
See yay faq
# ~/.config/pkm/conf.yaml
managers:
pacman: /usr/bin/pacman
custom:
updupg: -Syu
stats: -Ps
pkgbuild: -Gp
vote: -Wv
unvote: -Wu
sysupdate: pacman -Syu
find: -Qs
alias:
i: install
s: search
r: remove
b: pkgbuild
u: updupg
I: info
f: find
separate: yes
separator: "\u2500"
separator-color: "\e[38;5;237m"