Open-source project
purpleidea/mgmt avatar
purpleidea/mgmt

mgmt runs configuration as a continuous Go program, not a scheduled playbook

Next generation distributed, event-driven, parallel config management!

4,347 stars357 forksGoGPL-3.0

At a glance

What is it?
mgmt replaces the run-once-and-exit model of Ansible and Salt with a long-lived Go engine that reapplies as state changes. That model fits infrastructure that moves under you, and it costs you a language to learn.
Who is it for?
Operators running fleets whose members come and go, and who want policy expressed as an expression graph rather than a YAML playbook, should adopt mgmt and start with the Friday file mode example on a non-production host. Teams that need a stable offline install story, a large module ecosystem, or an audited rollback path should stay on Ansible or Salt instead.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • purpleidea/mgmt4,347 ★ · +22
Star history
Repository2026-09-232026-11-15
purpleidea/mgmt4.3k4.3k

22 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Why mgmt never exits instead of waiting for the next run

Most configuration management tools read a playbook, converge once, and exit. A cron entry or a CI pipeline brings them back later. mgmt takes the opposite stance: the engine starts, subscribes to whatever it needs to know about, and stays resident, so a change it observes is acted on without anybody asking again. The README puts the scope plainly: it is a real-time automation tool that can run continuously, intermittently, or on demand, and in the continuous case it guarantees the system matches the desired state for that instant.

That guarantee is the whole design. In a run-once tool the world can drift between runs and the drift is invisible until the next convergence. In mgmt the desired state is a function of inputs, so a value that changes produces a new desired state immediately, and the diff between current and desired is what the engine acts on. It is written in Go and carries an engine plus a language, the mcl configuration language.

The audience is an infrastructure operator who already owns a fleet of machines whose membership and state change faster than a cron cycle. If your estate is a handful of long-lived servers whose configuration changes on a schedule, the extra moving parts buy you nothing. The project describes itself as over ten years old and used in production by both corporate and individual users, but it is still a small project by the standards of the configuration management space, which matters when you are choosing what your infrastructure depends on.

The Friday file mode is the entire pitch in eleven lines of mcl

The README leads with a snippet that says more about the design than any architecture diagram would. It imports the datetime function, computes whether today is Friday, and binds the mode of /srv/files/ to one of two values depending on the answer.

mcl
import "datetime"
$is_friday = datetime.weekday(datetime.now()) == "friday"
file "/srv/files/" {
	state => $const.res.file.state.exists,
	mode => if $is_friday {
		"0550"
	} else {
		"0770"
	},
}

Read what that does that a run-once tool cannot. The mode alternates between 0550 and 0770 from a function call rather than from a variable you set, so the resource is not a fixed mode with a condition wrapped around it. The comment in the README says the mode updates the instant it changes. Once the loop is running, nothing has to re-trigger the run at midnight on a Friday.

The second detail worth noticing is that state is declared separately from mode. The resource asserts that the path exists and independently asserts a permission value, so the resource expresses two facts about one object instead of a single desired end state.

world.schedule elects two hosts from a pool that keeps changing

The second worked example is about distribution rather than about a single machine, and it is the part that distinguishes mgmt from a locally convergent tool. It imports sys and world, then declares a schedule group with a round-robin strategy, a maximum of two hosts, and a ten unit time to live.

mcl
import "sys"
import "world"

# we'll set a few scheduling options, and request each node be scheduled:
schedule "mygroup42" {
	strategy => "rr",
	max => 2,
	ttl => 10,
}

Every agent in the cluster evaluates that group and reads the result stream it produces.

mcl
$set = world.schedule("mygroup42")

if sys.hostname() in $set {
	# use your imagination to put something more interesting right here...
	print "i got scheduled" {} # this will run on the chosen machines
}

Each node compares its own hostname against the stream and acts only if it was elected. Because the stream is an input to the graph, adding or removing hosts changes the stream, and the election moves without a coordinator handing out a job list. The README notes that these functions are not intrinsic to the core design and that new ones can be easily added.

This is the pattern that has no direct equivalent in a run-once tool. A push-based playbook has to be triggered by something external to decide who runs what. Here every agent already holds the inputs, so the decision needs no trigger.

The README ships no install command, so the build path is Go and the Makefile

There is no package manager recipe in the README, no curl pipe to shell, no version pin to copy. The project points readers at the quick start and introductory guides on mgmtconfig.com and at a resource and function reference there as well. If you want the binary, the repository is a Go module rooted at github.com/purpleidea/mgmt and the Makefile at the top of the tree is the build entry point, with targets for build, crossbuild, format and test. The repository also carries debian/, docker/ and a Vagrantfile, so more than one distribution path exists outside the README text.

That absence is a real decision point for an operator, and go.mod pins the toolchain at go 1.26.8. There is no single line in this project you can paste into a provisioning script and trust to be unchanged next year. You either pin a tag yourself, or you build from a commit.

For a first run, the useful work is not installing but writing the smallest possible policy and running it once in the foreground with debug output. The README directs bug reporters to set the DEBUG constant in main.go to true and to include both the full mcl code used and the exact command used to run it, which tells you the tool is expected to be run interactively by a person reading its output while you write the policy, not hidden behind a quiet daemon from the first hour. Use that mode.

Every resource is an input you must name, and a missing one fails silently in intent

The scheduling example ends with a placeholder comment: use your imagination to put something more interesting right here. That is an honest signal about the shape of the work.

The repository ships an integration/ directory, a test/ directory and examples/ folders covering dhcp_client, longpoll, mockbmc, tftp, tls and yaml, which is the closest thing to a way to exercise a policy before pointing the engine at a production machine.

The go.mod file also shows what a single binary drags in: coredhcp, bmclib, gin, docker, consul client, prometheus client, nftables, systemd, sftp, tftp, aws-sdk-go and hcloud-go among others. That is the cost of one tool covering files, packages, hardware and network state. Nobody maintains that dependency list for you, so a long-lived agent built this way inherits upgrade work that a simpler tool pushes onto its plugin ecosystem.

Licence is GPL-3.0, with an additional permission under GPL section 7 for linking embedded mcl code and modules under other licences. Read that carve-out for what it covers before shipping it inside a closed-source product.

Where mgmt differs from Ansible and Salt: the run happens without a trigger

Ansible runs a playbook against an inventory. You invoke it, it connects over SSH, it applies a diff, it exits, and the next change waits for whoever runs it next, whether that is a scheduler or a human. Salt has a transport layer with a master publishing events to minions, so it is closer to mgmt in shape, but a state.apply still returns and the result is what the caller asked for at that moment.

mgmt differs in what a run is. There is no final apply that completes. Resources sit in the graph continuously and get pushed new values as inputs move, and each agent holds the inputs itself rather than receiving instructions. The Friday mode change is the clearest illustration: no orchestrator schedules anything at midnight, the expression is simply reevaluated when the clock crosses into the next day.

The trade runs the other way as well. Ansible needs no long-lived process on the target, and its inventory model means a new host joins when you add a line. mgmt asks for a resident agent per host, an open network path between them, and mcl as a language your team has to learn. The dependency list in go.mod is the second half of that trade: broader built-in coverage in exchange for a larger surface you must patch.

The docs live on mgmtconfig.com, and the FAQ is a patch target

Documentation is split between mgmtconfig.com and the repository. The quick start, introductory guide and the resource and function references sit on mgmtconfig.com, while the repository's docs/ directory holds a FAQ, general documentation and a language guide marked for everyone, a function guide, a resource guide and a style guide for mgmt developers, a contributing guide, and a service API guide for external developers. Two documents in that tree are worth checking before you commit: docs/faq.md and docs/documentation.md.

There is an unusual maintenance detail in the community table. The mailing list entry reads looking for a new home, suggestions welcome, with a link to a freedesktop issue. The project does not currently have a stable list address listed, which is a small but real signal about how much institutional support sits behind this tool compared with the larger configuration management projects.

Community conversation otherwise runs on Matrix at #mgmtconfig and on Mastodon under the same tag, and bug reports go through GitHub discussions with the DEBUG constant set in main.go turned on. The last push was on 2026-11-02, and the project is not archived.

Editorial conclusion

Operators running fleets whose members come and go, and who want policy expressed as an expression graph rather than a YAML playbook, should adopt mgmt and start with the Friday file mode example on a non-production host. Teams that need a stable offline install story, a large module ecosystem, or an audited rollback path should stay on Ansible or Salt instead. Before anything else, verify two things on a real machine: that your network tolerates agents exchanging information with each other in real time, and that a resource pointed at an input the engine cannot observe stays quiet instead of erroring. If either fails, the closed-loop model is not buying you anything over a periodic run.

Frequently asked questions

What does mgmt actually do that Ansible does not?

mgmt runs continuously rather than exiting after a run, so a resource is reapplied as soon as an input it depends on changes, without an external trigger. In Ansible, applying that same change again means running the playbook.

What is the mcl language in mgmt?

mcl is the configuration language mgmt ships alongside its engine, and resource properties are expressions rather than fixed values. The README's file example computes a mode from a datetime function call, so the value reevaluates instead of being set once.

How do I install mgmt?

The README does not give an install command. It points to the quick start guide at mgmtconfig.com/docs/guide/getting-started/; separately, the Makefile at the top of the repository holds build, crossbuild and packaging targets.

Can mgmt run across many hosts at once?

Yes. It can run as a decentralized cluster of agents that exchange information in real time, and the world.schedule function elects up to a given number of hosts from a changing pool, for example max => 2 with strategy => "rr" and ttl => 10.

What licence is mgmt released under?

The project is licensed under GPL-3.0. The Makefile header adds an additional permission under GPL version 3 section 7 covering linking with embedded mcl code and modules under other licences.

Official sources

  1. License: GPL-3.0
  2. Project website
  3. purpleidea/mgmt on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/purpleidea-mgmt.svg)](https://hysenlabs.com/projects/purpleidea-mgmt)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/purpleidea-mgmt.svg)](https://hysenlabs.com/projects/purpleidea-mgmt)

Was this useful?