lapt installs Debian/Ubuntu packages under $LAPT_HOME — no sudo, no writes
to the system package database — for when you're on a shared or managed
machine without root but still want a real .deb package instead of building
from source. Under the hood it's a thin wrapper around apt-get download +
dpkg -x.
- Each package in its own private tree, easy to remove - no shared
/usr, no apt dependency-hell: removing one package can't break another, because none of them share files. - Vendor libraries for building - prints an env script pointing at
already-installed packages' own
opt/<pkg>trees, so you can build something against them without installing a-devpackage system-wide. - Respects packages the system already has - before bundling a
dependency, lapt checks if
dpkgalready provides it and reuses that instead of duplicating it. This keeps installs small and avoids two copies of the same library drifting apart. If the system copy later gets removed, reinstalling (lapt remove <pkg> && lapt install <pkg>) bundles a replacement. - Patches up compiled-in absolute paths - a few packages (
git,file,bison) hardcode default paths like/usr/lib/git-corethat break once relocated intoopt/<pkg>/.pkgenv/<pkg>declares the env vars each one needs, exported automatically in its wrapper.
- Debian or Ubuntu (or a derivative) with
apt/dpkgavailable - bash 4.3+
- No sudo/root required
Clone the repo and symlink bin/lapt into $HOME/.local/bin (already on
PATH for most setups):
git clone <this-repo> lapt
ln -s "$PWD/lapt/bin/lapt" "$HOME/.local/bin/lapt"
Or, without the full repo (no tests/docs/git history), download a release tarball from the Releases page, extract it anywhere, and symlink the same way:
tar xzf lapt-<version>.tar.gz
ln -s "$PWD/lapt/bin/lapt" "$HOME/.local/bin/lapt"
Then run lapt init once and add the printed line to your ~/.bashrc, so
installed packages' binaries and man pages are reachable:
$ lapt init
lapt: wrote /home/you/.lapt/env -- add this line to your ~/.bashrc:
. "$HOME/.lapt/env"
Everything lapt owns — installed packages, cache, env — lives under
$LAPT_HOME ($HOME/.lapt).
$ lapt install curl
$ curl -V
curl 8.4.0
lapt install <pkg...>— bundle a package and its dependency closure intoopt/<pkg>, generating a wrapper and exposing its own binaries as needed. Best-effort across multiple packages: failures are collected and reported together, and don't stop the rest from installing.lapt remove <pkg...>— unlink a package's exposed files and delete itsopt/<pkg>tree. Best-effort across multiple packages, same asinstall.lapt list [pkg...]— list installed packages. With no arguments, lists all of them; with names given, lists only those (silently skipping any that aren't installed).lapt vendor <pkg...>— print an env script (PATH,LD_LIBRARY_PATH,PKG_CONFIG_PATH) pointing at already-installed packages' ownopt/<pkg>trees, for linking an external build against them.lapt rewrap <pkg>— refresh an installed package's wrapper in place (e.g. after adding or editing itspkgenv/<pkg>entry), without reinstalling.lapt prune— reclaim cache entries no longer referenced by any installed or vendored package.lapt expose <pkg>— (re-)symlink an installed package's own binaries/man pages into$LAPT_HOME.lapt init— write (or regenerate)$LAPT_HOME/env, which puts$LAPT_HOME/binonPATHand$LAPT_HOME/share/manonMANPATH.
See CONTEXT.md for the full domain model (closures, exposure,
vendoring, etc.) and docs/adr/ for the design decisions behind
them.
MIT — see LICENSE.