{"id":15715895,"url":"https://github.com/jpikl/pm","last_synced_at":"2025-10-31T03:33:29.166Z","repository":{"id":209372632,"uuid":"723878107","full_name":"jpikl/pm","owner":"jpikl","description":"Package manager wrapper (supports: pacman, paru, yay, apt, dnf, zypper, apk, brew, scoop)","archived":false,"fork":false,"pushed_at":"2024-06-19T14:22:00.000Z","size":278,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-01T03:31:26.233Z","etag":null,"topics":["apk","apt","brew","cli","dnf","fzf","package-management","package-manager","pacman","paru","scoop","wrapper","yay","zypper"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpikl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-27T00:21:47.000Z","updated_at":"2025-03-20T04:05:54.000Z","dependencies_parsed_at":"2023-12-31T00:24:31.091Z","dependency_job_id":"8baeb283-b8d7-49e3-b333-d3db977a48da","html_url":"https://github.com/jpikl/pm","commit_stats":null,"previous_names":["jpikl/pm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpikl%2Fpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpikl%2Fpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpikl%2Fpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpikl%2Fpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpikl","download_url":"https://codeload.github.com/jpikl/pm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253822362,"owners_count":21969830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apk","apt","brew","cli","dnf","fzf","package-management","package-manager","pacman","paru","scoop","wrapper","yay","zypper"],"created_at":"2024-10-03T21:43:23.213Z","updated_at":"2025-10-31T03:33:29.153Z","avatar_url":"https://github.com/jpikl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pm\n\nWrapper around various package managers with unified CLI.\n\n- Supports: [pacman][pacman], [paru][paru], [yay][yay], [apt][apt], [dnf][dnf], [zypper][zypper], [apk][apk], [brew][brew], [scoop][scoop].\n- Interactive package selection using [fzf][fzf] with package info preview.\n- A single self-contained script. Just copy it somewhere on the `$PATH` and you're good to go.\n- POSIX compliant (will run literally everywhere, including [Termux][termux]).\n\n![Demo usage](demo.gif)\n\n## Usage\n\nRun `pm help` for the usage:\n\n```\nPackage manager wrapper (supports: paru yay pacman apt dnf zypper apk brew scoop)\n\nUsage: pm \u003ccommand\u003e\n\nCommands:\n  i,  install          Interactively select packages to install.\n  i,  install \u003cpkg\u003e... Install one or more packages.\n  r,  remove           Interactively select packages to remove.\n  r,  remove \u003cpkg\u003e...  Remove one or more packages.\n  u,  upgrade          Upgrade all installed packages.\n  f,  fetch            Update local package database.\n  n,  info \u003cpkg\u003e       Print package information.\n  la, list all         List all packages.\n  li, list installed   List installed packages.\n  sa  search all       Interactively search between all packages.\n  si  search installed Interactively search between installed packages.\n  w,  which            Print which package manager is being used.\n  h,  help             Print this help.\n```\n\n## Installation\n\nAsuming `~/.local/bin` directory exists and is configured in the `$PATH`:\n\n```sh\ncurl -o ~/.local/bin/pm https://raw.githubusercontent.com/jpikl/pm/refs/heads/master/pm\nchmod +x ~/.local/bin/pm\n```\n\n## Features\n\n### STDIN filter\n\nInteractive commands can read additional filters from standard input.\n\n- Each line is a regular expression (POSIX extended), matching whole package name.\n- Hash sign `#` indicates the start of a comment (which is ignored).\n\n```sh\necho \"bat\" \u003e\u003e favorite_pkgs.txt\necho \"fzf\" \u003e\u003e favorite_pkgs.txt\necho \"ripgrep\" \u003e\u003e favorite_pkgs.txt\n\n# Interactively select favorite packages to install\npm install \u003c favorite_pkgs.txt\n```\n\n### AUR helpers\n\nOn Arch Linux, `pm` allows easy installation of selected AUR helpers.\n\nJust run `pm install \u003caur-helper\u003e` where `\u003caur-helper\u003e` is one of `paru`, `yay` or their binary variant (`paru-bin`, `yay-bin`).\n\nThese AUR helpers will be then used as the prefered package manager over `pacman`.\n\n## Configuration\n\nConfiguration is done through the following environment variables\n\n### PM\n\nEnforces use of a specific package manager.\n\nOptions: `paru`, `yay`, `pacman`, `apt`, `dnf`, `zypper`, `apk`, `brew`, `scoop`.\n\nThe default package manager is auto detected by checking availability of the binaries listed above (in that particular order).\n\n```shell\npm install fzf           # Auto detect package manager\nPM=pacman pm install fzf # Use pacman\nPM=yay pm install fzf    # Use yay\n```\n\n### PM_SUDO\n\nControls which program is used to run operations as root.\n\n```shell\nPM_SUDO=sudo-rs pm install fzf # Use alternative sudo command\nPM_SUDO=doas pm install fzf    # Use alternative sudo command\nPM_SUDO= pm install fzf        # Disable execution as root\n```\n\nThe default value is `sudo`. In case the `sudo` binary is not available, `pm` checks for alternatives like `sudo-rs` or `doas`.\n\nWhen running inside [Termux][termux], the execution as root is disabled by default (unless `PM_SUDO` is explicitly set).\n\n### PM_COLOR\n\nControls color output for non-interactive commands.\n\nOptions: `auto`, `always`, `never`.\n\nThe default value is `auto` which outputs colors only when STDOUT is a TTY.\n\n## FAQ\n\n### How to select multiple packages in interactive mode?\n\nUse the `TAB` key to (un)select multiple packages.\n\nSee [fzf docs](https://github.com/junegunn/fzf#using-the-finder) for more keyboard shortcuts.\n\n### Is this better than my package manager?\n\nProbably not, but it could be more convenient in some cases:\n\n1. If you often switch between distros and you do not want to remember every package manager CLI.\n2. Interactive package selection really helps when you are searching for a package to install and you do not know the exact name.\n\n### Can you support package manager XYZ?\n\nJust create [an issue](https://github.com/jpikl/pm/issues) for the support and I will look into that.\n\n## License\n\n`pm` is licensed under the [MIT license](LICENSE).\n\n[apt]: https://salsa.debian.org/apt-team/apt\n[apk]: https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper\n[brew]: https://brew.sh\n[dnf]: https://github.com/rpm-software-management/dnf\n[fzf]: https://github.com/junegunn/fzf\n[pacman]: https://wiki.archlinux.org/title/Pacman\n[paru]: https://github.com/Morganamilo/paru\n[scoop]: https://scoop.sh\n[termux]: https://termux.dev\n[yay]: https://github.com/Jguer/yay\n[zypper]: https://en.opensuse.org/Portal:Zypper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpikl%2Fpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpikl%2Fpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpikl%2Fpm/lists"}