AptLynx

Command-line tool

goimports

brew/goimports

Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev

Go formatter that additionally inserts import statements

At a glance

Type
Command-line tool
Install on
macOS, Linux
Last checked
25 Oct 2026, 21:09 UTC

Install it

macOS

brew install goimports

Linux

brew install goimports

Display the completed import source file

goimports path/to/file.go

Write the result back to the source file instead of `stdout`

goimports -w path/to/file.go

Display diffs and write the result back to the source file

goimports -w -d path/to/file.go

Related command-line tools

Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents