# Deployr Cross-platform application deployment and patching from a single binary. Deployr replaces Ninite for endpoint software: one catalog of applications, one command line, and the same behaviour on **Windows, macOS and Linux**. It prefers the machine's native package manager and falls back to the vendor's own installer when that route is missing or unreliable. There is no server and no agent. Deployr is a single static executable you drop on a machine — by hand, or through your RMM's script runner — and it exits with a status code your automation can branch on. ``` deployr install chrome 7zip vlc deployr install @standard --json deployr update --all deployr status ``` ## Why not just call winget / brew / apt directly? Because the interesting part is everything around the package manager: - **winget does not exist under SYSTEM.** The `winget` on PATH is an app execution alias that only resolves inside a user session — exactly what an RMM script does not have. Deployr finds the real payload under `WindowsApps`. - **Homebrew refuses to run as root**, which is the context an MDM or RMM gives you. Deployr drops to the account that owns the Homebrew prefix. - **Package managers lie with exit codes.** "Already installed" and "no applicable upgrade" are failures to winget and successes to you. - **Not every app is in every repo.** A source list per platform means Chrome comes from winget on Windows, a cask on macOS and Google's own `.deb` on Debian, and it is one catalog entry. - **Unattended means unattended.** Every command runs with stdin closed, silent flags applied and a timeout, so nothing ever waits on a prompt nobody will see. ## Install Download the binary for the machine from `dist/` (see [Building](#building)) and put it somewhere on PATH. ```powershell # Windows (elevated) Copy-Item deployr_windows_amd64.exe C:\ProgramData\Deployr\deployr.exe ``` ```sh # macOS / Linux sudo install -m 0755 deployr_linux_amd64 /usr/local/bin/deployr ``` Verify the machine is ready: ``` deployr doctor ``` ## Usage | Command | What it does | | --- | --- | | `deployr install ` | Install applications that are not already present | | `deployr update ` | Update installed applications (`--all` for everything present) | | `deployr uninstall ` | Remove applications | | `deployr list` | Show the catalog, filtered to this platform | | `deployr status` | Report what is installed and at which version | | `deployr info ` | Show one app's install recipe and current state | | `deployr profiles` | List the bundles defined in the catalog | | `deployr doctor` | Platform, privileges, directories and available providers | | `deployr catalog validate` | Check a catalog overlay before you ship it | Anything prefixed with `@` is a profile — a named bundle of apps: ``` deployr install @standard @security ``` ### Useful flags ``` --json machine-readable summary on stdout (progress goes to stderr) --dry-run plan the run without touching the machine --verbose log every command that gets executed --force act even when the app is already in the desired state --strict fail instead of falling through to the next source --provider winget restrict every app to a single provider --catalog PATH load an extra catalog file or directory (repeatable) --timeout 45m per-installer timeout (default 30m) --require-checksum refuse vendor downloads with no sha256 pinned in the catalog ``` ### Exit codes | Code | Meaning | | --- | --- | | `0` | Everything ended in the requested state | | `1` | At least one app failed | | `2` | Usage or catalog error | | `3` | Insufficient privileges — nothing was attempted | ## Deploying through an RMM Deployr is designed to be the payload of a script policy. See [docs/RMM.md](docs/RMM.md) for ready-made Level.io and NinjaOne snippets. The short version: ```powershell # Windows script policy & "C:\ProgramData\Deployr\deployr.exe" install @standard --json exit $LASTEXITCODE ``` ```sh # macOS / Linux script policy /usr/local/bin/deployr install @standard --json ``` Progress lines go to stderr and the JSON summary to stdout, so an RMM that captures both gets a readable transcript *and* a parseable result: ```json { "action": "install", "host": "WS-014", "os": "windows", "arch": "amd64", "total": 6, "changed": 2, "skipped": 4, "failed": 0, "reboot_required": false, "results": [ { "app": "chrome", "status": "skip", "version": "129.0.6668.90", "message": "already installed" }, { "app": "vlc", "status": "ok", "provider": "winget", "version": "3.0.21" } ] } ``` ## The catalog The catalog is compiled into the binary, so a bare executable on a fresh machine already knows how to install ~45 common applications. Every entry lists its sources in preference order: ```yaml - id: chrome name: Google Chrome categories: [browser] windows: sources: - provider: winget id: Google.Chrome - provider: choco id: googlechrome - provider: direct url: https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi kind: msi detect: registry: ["Google Chrome"] ``` Add your own apps without rebuilding by dropping a YAML file in the overlay directory (`C:\ProgramData\Deployr\catalog.d` or `/etc/deployr/catalog.d`), or by passing `--catalog`. Overlays can also override a shipped entry — same `id` replaces it wholesale. Full format reference and worked examples: [docs/CATALOG.md](docs/CATALOG.md). ### Providers | Provider | Platform | Notes | | --- | --- | --- | | `winget` | Windows | Resolved under SYSTEM; prefers machine scope, falls back to user scope | | `choco` | Windows | Chocolatey 1.x and 2.x | | `brew` | macOS, Linux | Formulae; drops from root to the Homebrew owner | | `cask` | macOS | Casks; `--greedy` on upgrade so self-updating apps still get patched | | `apt` | Linux | Refreshes the index once per run; `noninteractive` throughout | | `dnf` | Linux | Also drives `dnf5` and `yum` | | `zypper` | Linux | | | `pacman` | Linux | | | `flatpak` | Linux | System-wide as root, per-user otherwise | | `snap` | Linux | | | `direct` | all | Vendor download: msi, exe, msu, dmg, pkg, deb, rpm, zip, tar.gz, AppImage | ## Building Requires Go 1.24 or newer. No cgo, no external build tools. ```sh make build # host binary make dist VERSION=0.1.0 # all six platforms into dist/ make check # vet on every platform + tests + gofmt ``` ```powershell .\scripts\build.ps1 -Version 0.1.0 ``` Output is one static binary per platform (~7 MB), with SHA256SUMS alongside. ## Layout ``` cmd/deployr entry point internal/catalog catalog types, embedded data, overlay merging internal/provider winget, choco, brew/cask, apt, dnf, zypper, pacman, flatpak, snap, direct internal/engine decides what needs doing and walks the source list internal/detect is it already installed (registry, paths, commands) internal/download vendor downloads with retries and checksum pinning internal/platform OS, arch, elevation, well-known directories internal/run non-interactive command execution with timeouts internal/cli command line parsing and output rendering ``` ## Status Working: catalog, all providers, install/update/uninstall/status/list/info/ doctor, JSON output, overlays, RMM exit codes. Not built yet: a central dashboard (deliberately — this is the standalone CLI), scheduled self-updates, and per-app version pinning.