Description
Managing a Magento 2 local development environment involves juggling several tools at once — Docker Compose to control containers, bin/magento for application commands, and manual file copying to keep environment templates in sync. Anvil was built to collapse those separate workflows into a single, consistent CLI.
Anvil is written in Go and ships as a self-contained binary, meaning it requires no runtime installation beyond the binary itself. It targets Magento 2 developers who work across multiple projects and need a reliable, scriptable way to manage their local Docker setup without remembering project-specific commands.
Key features
Container management — start, stop and restart the Docker containers that make up the local Magento 2 stack. Anvil wraps the underlying Docker Compose calls so you never need to navigate to the correct compose file manually.
Template synchronisation — keeps your local environment configuration files in step with the project’s source templates. When upstream templates change, Anvil detects and applies the difference, preventing configuration drift between developers on the same project.
Magento command runner — run bin/magento commands through Anvil without needing to exec into the container yourself. Useful for cache flushes, reindexing and setup upgrades as part of a repeatable local workflow.
Why Go
Go was chosen for its single-binary output and cross-platform support. The resulting binary runs on Linux, macOS and Windows without requiring a language runtime, making it straightforward to distribute and include in onboarding documentation for new developers joining a project.