--- id: mbake version: "1.4.6" license: MIT license_treatment: permissive maintenance: active --- # mbake — A Python-based Makefile formatter and linter License: permissive · Maintenance: active · Downloads: 79.0K/mo ## What it is and what it does mbake is a Python-based formatter and linter for Makefiles that enforces consistent style—converting spaces to tabs in recipes, normalizing spacing around assignments and colons, and cleaning up line continuations. It includes intelligent .PHONY detection that analyzes recipe commands to identify targets that don't produce files, and can optionally insert .PHONY declarations automatically. The tool validates Makefile syntax before and after formatting, supports CI/CD workflows with a check mode that reports whether formatting is needed without modifying files, and allows customization through a TOML configuration file. The package is designed for developers and build systems that need to maintain consistent Makefile style across projects. It integrates with VSCode through an extension and provides command-line commands for formatting, validation, and configuration management. Dependencies are minimal—rich for terminal output, tomli for TOML parsing, and typer for CLI argument handling—making it lightweight to add to existing build pipelines. Use it for: - Enforce consistent Makefile formatting in CI/CD pipelines using --check mode to validate style compliance before merge - Auto-format Makefiles in a repository to fix inconsistent spacing, tabs, and line continuations across multiple projects - Validate Makefile syntax as part of a build validation step to catch errors before deployment - Automatically insert and manage .PHONY declarations based on recipe analysis to prevent false file-target conflicts - Integrate with VSCode to format Makefiles on save or on-demand using the mbake extension ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. mbake formats and lints Makefiles, enforcing consistent spacing, tab usage in recipes, and valid syntax while optionally auto-detecting and managing .PHONY declarations. Yes. mbake fills a genuine gap in Makefile tooling with low install friction, active maintenance, permissive licensing, and no known vulnerabilities. It is well-suited for teams that need consistent Makefile style enforcement or CI/CD validation. ## Install pip install mbake uv add mbake poetry add mbake ## Installing mbake Before you install: Low install friction with three lightweight runtime dependencies (rich, tomli, typer). Active maintenance with recent release and steady repository activity. License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations. Quickstart: pip install mbake mbake format --check Makefile Verify before relying: - Whether GNU make must be installed on the system for validation features to work - Scope of Makefile syntax validation coverage across different make dialects - Performance characteristics when formatting very large Makefiles ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 79.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags makefile formatter, makefile linter, make syntax checker, build file formatter, makefile style tool, makefile validation, makefile cleanup, makefile-tools, ci-cd-ready, code-formatter [View on SkillFed](https://skillfed.io/packages/mbake) · [View on PyPI](https://pypi.org/project/mbake/)