Go library and CLI
depman
A Go library and CLI that checks, installs and verifies the system-level tools your application needs, from one YAML file.
What it is
Depman manages the things your code needs that no package manager covers: Node.js, Python, a database server. You list them once in a YAML file, with the version you require and how to install and verify each one on Windows, Linux and macOS. Depman then checks what's on the machine, installs what's missing, and confirms it worked.
I built it at work as internal tooling, then open-sourced it.
Why I built it
A service that depends on a runtime fails in confusing ways when that runtime is missing or the wrong version. I wanted the application to find out at start-up, say so clearly, and fix it when it could.
- 3operating systems: Windows, Linux, macOS
- 13Go files, about 2,200 lines
- check, ensurethe two commands you actually use
Use it
version: "1.0"
name: "My Application"
dependencies:
- name: "nodejs"
version:
required: "16.15.1"
constraint: "^16.0.0"
manager, err := depman.NewManager("")
results, err := manager.EnsureDependencies()
Versions use semantic-version constraints, installers and commands are configured per platform, and each dependency can set environment variables.
How it's built
A public pkg/depman package holds the API and config loading. Internal packages handle downloading, environment variables and the manager. The command line is built with Cobra, and the unit tests cover config discovery, platform selection and version compatibility.
What I'd change
The test suite is thin where it touches real installers, because those need a clean machine. I'd run the install paths in throwaway containers in CI.
Need someone who owns a feature from the first call to the last deploy?
I'm open to senior software, full-stack and forward deployed roles, in India or abroad. A 15-minute call is the quickest way to see if we fit.