Skip to content

Latest commit

 

History

History
109 lines (79 loc) · 3.81 KB

SETUP.md

File metadata and controls

109 lines (79 loc) · 3.81 KB

Setup

portlist is one Python program with no dependencies on macOS, Linux or BSD. Pick whichever route below matches how you like to install things; they all end with portlist on your PATH.

Homebrew (macOS, Linux)

brew tap Mr-hunt-007/portlist https://github.com/Mr-hunt-007/homebrew-portlist
brew trust mr-hunt-007/portlist      # Homebrew asks this of every third-party tap
brew install portlist

The brew trust line is not optional: Homebrew refuses to load a formula from a tap it has not been told to trust, and says so rather than installing anything.

Puts the program in Homebrew's prefix with its own Python. brew upgrade portlist updates it, brew uninstall portlist removes it, and nothing is left behind except ~/.portlist, which is yours to delete.

winget (Windows)

There is no winget package, and there will not be one. The manifests in packaging/winget/ are correct and were submitted; winget rejected them, and would reject any version of them:

[Error] InvalidPortableFiletype: The file type of the referenced file is
not allowed. (RelativeFilePath)

A portable winget package may point at exactly one kind of file, .exe, and what ships for Windows is the source plus a portlist.cmd shim. Shipping a compiled launcher instead would buy the winget listing and nothing else, since it would still need Python on PATH, so the manifests stay in the tree as a record and winget install Mr-hunt-007.portlist finds nothing. Use pipx below, which is the better route on Windows anyway.

Windows needs one thing macOS and Linux do not: CPython ships there without curses, and portlist is a curses program. The winget package installs the source and a shim, so you also need pip install windows-curses. If that is a sentence you would rather not think about, use pipx below, which handles it.

pipx (anywhere)

pipx install portlist-tui
pip  install portlist-tui

The simplest route on Windows, because windows-curses is declared as a dependency there and pipx installs it into the same isolated environment.

The distribution is portlist-tui, not portlist: that name on PyPI belongs to an unrelated package, and shipping under it would mean pip install portlist quietly fetching somebody else's code. The command it installs is portlist either way. To install a commit that is not released yet, use pipx install git+https://github.com/Mr-hunt-007/portlist.

Remove with pipx uninstall portlist-tui.

One line

curl -fsSL https://mr-hunt-007.github.io/portlist/install.sh | sh

Installs to ~/.local/lib/portlist with a shim at ~/.local/bin/portlist. No root, nothing system-wide, no package manager involved. Set PORTLIST_PREFIX to put it somewhere else.

Piping a script into a shell is a thing worth being suspicious of, so read it first: it is short, it fetches one tarball, and it writes to two directories.

To remove: rm -rf ~/.local/lib/portlist ~/.local/bin/portlist.

From source

git clone https://github.com/Mr-hunt-007/portlist
cd portlist
python3 portlist.py

No build step. python3 -m plcore works too, and pip install . gives you the portlist command.

Requirements

  • Python 3.9 or newer, with curses (standard everywhere except Windows).
  • macOS, Linux, BSD or Windows.
  • No third-party packages, except windows-curses on Windows.

Where it keeps things

~/.portlist/ holds the launch ledger, the use history and the recipe book. Override with --data-dir or the PORTLIST_DATA environment variable. Delete the directory and portlist starts over knowing nothing; the only thing lost is history it observed itself.

Checking an install

portlist --version
portlist --keys

Both print and exit without touching the terminal, which makes them safe in a script or a container.