skip to content
Alvin Lucillo

Live reloading with air

/ 1 min read

Live reloading saves time by running your go commands when files changes are detected with air-verse/air package.

Let’s say we have this simple Go program:

package main

import "fmt"

func main() {
	fmt.Println("Hello, World!")
}

Install air: go install github.com/air-verse/air@latest Initialize: air init — this will generate .air.coml Run air:

airverse air

  __    _   ___
 / /\  | | | |_)
/_/--\ |_| |_| \_ v1.61.7, built with Go go1.23.8

watching .
!exclude tmp
building...
running...
Hello, World!
Process Exit with Code 0

After making some changes:

main.go has changed
building...
running...
Ola, Mundo!