pm-user-repository
Appearance
< Projects
The pm user repository is a community registry of
package definitions for pm. Its ur
module lets pm install packages from Lua definitions hosted in the
repository: you write a short config, ur downloads and runs
the definition, and pm uses the returned table to fetch, build and
install the binary.
How it works
- You download
ur.luainto your pm config directory. - Your
init.luarequires it and callsur.Fetch { ... }for each package. ur.Fetchdownloads the Lua file from the repository over HTTPS, loads it in text-only mode (which blocks bytecode injection) andpcalls it to get the table.- pm consumes the table to handle download, build and install.
The ur.Github helper covers the common case: fetch a
tarball from a GitHub repository, extract it, run make (or
a custom build command) and return the artifact path. It can use
gh auth token for authenticated API requests (5000 requests
per hour instead of 60).
Usage
Download the module:
$ mkdir -p ~/.config/pm && curl -o ~/.config/pm/ur.lua https://raw.githubusercontent.com/hugoocoto/pm-user-repository/refs/heads/main/ur.lua
Then use it from init.lua:
local ur = require("ur")
Packages = {
ur.Fetch { user = "hugoocoto", file = "nvim-nightly/nvim.lua" },
ur.Fetch { user = "hugoocoto", file = "helium/helium.lua" },
}
Available packages
| File | Package |
|---|---|
b/b.lua |
b web browser |
dv/dv.lua |
dv directory viewer |
eqnx/eqnx.lua |
eqnx (archived) |
fetch/fetch.lua |
fetch system info fetcher |
helium/helium.lua |
Helium AppImage |
infinipaint/infinipaint.lua |
InfiniPaint painting application |
isf/isf.lua |
isf two-way folder sync over ssh |
mybar/mybar.lua |
mybar Wayland status bar |
nvim-nightly/nvim.lua |
Neovim nightly AppImage |
pdfjoin/pdfjoin.lua |
pdfjoin PDF merger |
send2kodi/send2kodi.lua |
send2kodi links and local media to Kodi |
st/st.lua |
st simple terminal |
tetris/tetris.lua |
tetris terminal game |
todo/todo.lua |
todo task manager |
tui-do/tui-do.lua |
tui-do task list |
vicel/vicel.lua |
vicel spreadsheet editor |
wallpaper/wallpaper.lua |
wallpaper for Wayland |
wl2kodi/wl2kodi.lua |
wl2kodi screen mirroring to Kodi |
yaci/yaci.lua |
yaci calculator REPL |
zrun/zrun.lua |
zrun fuzzy launcher |
All of them are under the hugoocoto user directory.
Package format
Each .lua file returns a table:
| Field | Required | Description |
|---|---|---|
url |
Yes | Download URL for a source archive or binary |
build |
Yes | Shell commands that produce the executable |
name |
No | File name for the download (inferred from the URL if absent) |
artifact |
Yes, unless name is set |
Executable produced by build |
last_modified_cmd |
No | Command to check the remote Last-Modified date |
return {
url = "https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.appimage",
name = "nvim",
build = "chmod +x nvim",
}
Contributing
- Fork the repository.
- Create a directory named after your GitHub username.
- Add your
.luafiles inside it (subdirectories are fine, likeusername/tool/tool.lua). AREADME.mdnext to it renders on the docs page. - Open a pull request. CI validates the Lua syntax and the root structure.
Warning Do not include tokens, passwords or private keys. Only
ur.lua lives at the root.See also
Categories:
- Tools and applications
- Package management