- Zig 99.8%
- Vim Script 0.1%
| .forgejo | release: v0.10.1 | |
| contrib/vim | Move Vim syntax files to contrib/vim | |
| docs/design | service: use child nodes for type, essential, and log | |
| src | Fix package staging and service activation | |
| test/testdata | Initial import of code | |
| .gitignore | Initial import of code | |
| build.zig | fix: build and test on non-Mere hosts (Arch Linux, etc.) | |
| build.zig.zon | release: v0.12.2 | |
| LICENSE | Add LICENSE file | |
| README.md | release: v0.12.2 | |
mere
mere is the package manager and system-management tool for
Mere Linux, a lightweight Linux distribution built on
musl libc.
It takes the properties that make Nix compelling — an immutable package store, atomic upgrades, build isolation, safe rollbacks — and keeps them close to traditional Unix instead of fighting it. The system is designed to be legible: everything lives on disk in a form you can read, inspect, and understand.
How It Works
Packages are stored as immutable objects in a content-addressed store at
/mere/store. Each object is identified by a BLAKE3 hash of its contents, so
identity is unambiguous and multiple versions coexist safely.
Profiles are symlink trees that reference store objects. A system profile defines which packages are visible; activating a new configuration creates a new generation and swaps a single symlink. Rollback is the same operation in reverse.
On a native Mere system, the root directories (/bin, /lib, /usr/bin, ...)
are themselves symlinks into the active profile, so switching generations
changes the entire system view atomically.
Design Principles
- Immutable store — package payloads live in a content-addressed store; changing contents produces a new object
- Generation-based profiles — every generation is a fully realized tree of selected store objects
- Atomic switching — activation is one pointer swap after the target generation is built
- Isolated builds — packages are built in a synthetic root via mount namespaces and chroot
- Explicit trust — repos and packages are accepted only when Ed25519 signatures verify against trusted keys
- Filesystem as truth — store objects, profiles, manifests, and repository databases are all inspectable on disk
Try It
mere is a statically linked binary that runs on any Linux system. You can
try it alongside your existing distribution — everything lives under /mere
and won't interfere with your host system.
1. Download
Grab the latest release for your architecture:
# x86_64
curl -Lo mere https://codeberg.org/merelinux/mere/releases/download/v0.12.2/mere-0.12.2-linux-x86_64
# aarch64
curl -Lo mere https://codeberg.org/merelinux/mere/releases/download/v0.12.2/mere-0.12.2-linux-aarch64
sudo install -m 755 mere /usr/local/bin/
2. Initialize
Preview what mere store init will create, then apply it:
sudo mere store init --dry-run
sudo mere store init
Add a basic config for the official repository and its public key:
sudo curl -so /mere/config.kdl https://pkgs.merelinux.org/config.kdl
sudo curl -so /mere/keys/mere.pub https://pkgs.merelinux.org/mere.pub
3. Create a profile and install packages
mere profile create test
mere install -p test python
This fetches Python and its dependencies from the Mere repository, verifies
signatures, places everything in the content-addressed store at /mere/store,
and realizes the profile.
4. Try it out
mere shell -p test
python3 --version
mere shell drops you into an interactive shell with the profile's packages
available. Type exit to return to your host environment.
5. Explore
# search for packages
mere search python
# install more packages
mere install -p test busybox curl git
# see what's in your profile
mere profile list
# inspect the store
ls /mere/store/
# store maintenance
mere store clean --dry-run
mere store verify
Service Management
On a native Mere system using s6-rc, mere provides integrated service
management as top-level commands:
mere status # show all services with status
mere status nginx # detailed view for a service
mere enable nginx # add to boot set
mere start nginx # bring up now
mere stop nginx # bring down now
mere restart nginx # stop and start
mere reload nginx # signal config reload
mere disable nginx # remove from boot set
mere logs nginx # view service logs
Service definitions are generated at build time from recipe metadata and
installed as s6-rc source directories. mere enable assembles definitions,
syncs the repository, and updates the boot prescription. mere start/stop
operate on live state only — the two concerns are cleanly separated.
Building from Source
Requires Zig 0.16. The build system automatically fetches and builds all C library dependencies (libsodium, zstd, libarchive, libcurl, sqlite3). Host prerequisites: musl, LLVM, busybox (for sha256sum), curl, and cmake.
zig build
zig build test
Status
Pre-release. The core package manager is functional and manages a real Mere Linux system, but the CLI surface and some subsystems are still stabilizing.
Documentation
- Specification Details — full system specification
- Recipe Specification — guide to writing build recipes
- Service Management — service architecture and s6-rc integration