Backends
Backends are how declarch talks to package managers.
Think of it like this:
- declarch is the coordinator,
- backends do the real package operations.
Default + adopt model
declarch initcreates default backend definitions.declarch init --backend <name>adopts extra backends from registry.- Local backend files are editable.
Common backend groups
- System:
aur,pacman,flatpak,apt,nala,dnf,snap,nix,brew - Language/dev:
npm,pnpm,yarn,bun,cargo,pip,gem,go - Other:
soar
Planned Windows backends: winget, choco, scoop.
Add backend definitions
declarch init --backend npm
declarch init --backend pnpm,yarn
declarch init --backend pnpm yarn
Use backends in package config
pkg {
pacman { firefox }
flatpak { org.mozilla.firefox }
npm { typescript }
nix { nil }
}
Fallback concept
A backend can fallback when binary is missing. Examples:
nala -> aptaur -> pacman(when no AUR helper is available)paru -> pacmanyay -> pacman
Beginner tips
- Start small.
- Add one backend at a time.
- Keep backend files versioned in git.
- Sharing one config across laptop/VPS is okay.
- If a backend is not for your current OS, declarch will skip it and continue.