A live-reloading command line utility for Go applications that automatically rebuilds and restarts on code changes.
Air is a live-reloading command line utility for Go applications that automatically rebuilds and restarts the application when source code changes are detected. It eliminates the need for manual restarts during development, significantly speeding up the iteration process. The tool focuses on flexibility and simplicity, allowing seamless integration into diverse Go project setups.
Go developers working on web applications, APIs, or any Go project where frequent code changes require rebuilding and restarting the application during development. It is particularly useful for developers using frameworks like Gin who want an enhanced live-reloading experience.
Developers choose Air over alternatives due to its high configurability, including customizable build commands, flexible file watching with include/exclude directories, and support for environment files. Its unique selling points include platform-specific build overrides, Docker integration with an official image, and an optional browser reload proxy for static file changes.
☁️ Live reload for Go apps
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Air allows full control over build commands and runtime arguments via TOML config or CLI flags, enabling integration with complex pipelines, as shown in the examples for custom cmd and entrypoint.
Supports platform-specific overrides for Windows, macOS, and Linux in config files, ensuring consistent behavior across different OSes without separate setups.
Provides an official Docker image and detailed Docker Compose examples, making containerized workflows seamless with volume mounting and port mapping.
Includes an optional proxy that automatically refreshes the browser when static files change, enhancing front-end workflows, though it requires specific HTML structure.
The legacy `build.bin` field is deprecated and will be removed, forcing users to migrate to `entrypoint`, which can cause confusion and breaking changes during updates.
Known issues like character escaping problems in WSL and the need for hacks like setting cmd to '/usr/bin/true' for compile-only mode indicate less polished edge cases.
Configuring the browser reload proxy requires specific HTML tags (a </body> tag) and additional port mapping, which may not be intuitive and adds setup steps.