gotailwind

command module
v4.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 4 Imported by: 0

README

GoTailwind latest version

A go tool plugin for the excellent TailwindCSS cli.

About

I created this tool to make it easier to use TailwindCSS within go projects such as with those using the go templ template engine or html/template etc.

It downloads the TailwindCSS cli standalone binary automatically on first use. Subsequent invocations will use the cached copy. Nodejs is not required.

Prerequisites

Go 1.24+. You must upgrade to go 1.24 or newer before using this tool.

Please verify with go version that the version you have is at least 1.24 or it won't work.

Usage

To install the latest version of TailwindCSS v4 into an existing go project:

go get -tool github.com/hookenz/gotailwind/v4@latest

Or a specific version of TailwindCSS:

go get -tool github.com/hookenz/gotailwind/v4@v4.3.2

To run it:

go tool gotailwind

Demo

demo

How does it work?

GoTailwind is a thin go wrapper around the standalone TailwindCSS cli. It's just a go program that calls the appropriate TailwindCSS binary that is downloaded and cached into a local cache folder.

The GoTailwind version matches the TailwindCSS cli version.

It works wherever go and tailwindcss can run.

In linux the TailwindCSS cli binary is placed into a versioned directory beneath:

~/.cache/gotailwind/

i.e.

~/.cache/gotailwind/v4.1.7/tailwindcss-linux-x64

Which means you can have different projects targetting different versions of TailwindCSS.

Contributing

Suggestions or improvements are more than welcome.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL