← XeFM English | 日本語 · crftwr/xefm on GitHub · craftware

Extra Python Libraries: ~/.xefm/requirements.txt

English | 日本語

Some things you can do in config.py need a Python library XeFM doesn’t ship: a Pillow plugin such as pillow-heif, rawpy for camera RAW in an IMAGE_DECODERS entry, or anything your own actions import. List them in ~/.xefm/requirements.txt, next to config.py, and sync:

# ~/.xefm/requirements.txt
pillow-heif
rawpy
xefm deps sync

Or, inside XeFM: Tools → Advanced → Sync Python Packages (also in the command palette as sync_python_packages). The sync runs in the background, pip’s output goes to the log pane, and the configuration reloads when it finishes.

This works the same for every install: the macOS app (DMG or Homebrew cask), the Windows app (zip or Microsoft Store), the Homebrew formula, and pipx / uv / pip. The libraries live in ~/.xefm/site-packages/, not in XeFM’s own install, so upgrading XeFM keeps them.

How it behaves

Extensions that need libraries

An extension package can list the libraries it needs in its manifest (requires.python_packages). The same sync installs them alongside your requirements.txt, all resolved together. Installing such an extension offers to sync right away. Until a sync has run, the extension isn’t loaded and the log says why. Removing or disabling the extension leaves its libraries in place until the next sync.

Commands

Command What it does
xefm deps sync Make ~/.xefm/site-packages match requirements.txt. Needs the network.
xefm deps status Say whether a sync is needed. Offline. Exits 1 when it is.

requirements.txt is a normal pip requirements file: version specifiers, --index-url, and paths relative to ~/.xefm all work. If the file pulls in another one with -r, editing that other file isn’t noticed by the startup check, so run the sync yourself.

Don’t edit ~/.xefm/site-packages/ by hand; each sync replaces it. If you keep ~/.xefm in a dotfiles repository, commit requirements.txt and leave site-packages/ out: each machine syncs its own.