# Install templ with Homebrew, apk, Nix

Language for writing HTML user interfaces in Go. Version 0.3.1020 via Homebrew; verified 2026-07-26. Also installable with nix: nix profile install nixpkgs#templ.

## Install

```sh
sudo av install brew:templ
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install templ
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add templ
```

  Evidence: Alpine Linux edge package indexes: templ from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#templ
```

  Evidence: nixpkgs package indexes: pkgs/by-name/te/templ/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:templ
- **Package manager:** Homebrew
- **Version:** 0.3.1020
- **Source summary:** Language for writing HTML user interfaces in Go
- **Homepage:** <https://templ.guide>
- **Repository:** <https://github.com/a-h/templ>
- **Last updated:** 2026-07-26T00:50:34+02:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- templ (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.3.1020
## Project history and usage

templ is a Go-focused HTML component language and code generator. Its documentation describes it as a way to build HTML with Go by creating components that render fragments of HTML and compose them into screens, pages, documents, or apps.

### Project history

The public repository was created in April 2021, and early GitHub releases appeared in May 2021. The README positions the project as an HTML templating language for Go with strong developer tooling, including generated Go code and editor/LSP support.

### Adoption history

templ's adoption grew with the renewed interest in server-rendered Go web applications, htmx-style partial updates, and type-checked component composition. Package-manager coverage in Homebrew, Nix, and Alpine reflects its use as a build-time CLI installed alongside Go toolchains.

### How it is used

The official docs say most users run `templ generate` to generate Go code from `*.templ` files. The CLI also provides formatting, an LSP server, environment information, and version reporting; watch/proxy modes support live reload during web development.

### Why package nerds care

For package nerds, templ is notable because the package is primarily a generator executable: projects often commit generated `*_templ.go` files or wire generation into CI, so the tool affects reproducible builds, editor setup, and source packaging.

### Timeline

- 2021: GitHub repository created.
- 2021: Early v0.0.x releases published.
- 2023: Official docs include GopherCon UK 2023 material for templ's language-server tooling.

### Related projects

- templ is commonly used with Go's `net/http` package and web frameworks such as Chi, Echo, Gin, and Fiber.
- The docs explicitly discuss htmx integration and React interoperability for cases where server-rendered Go components need client-side interactivity.

### Sources

- <https://api.github.com/repos/a-h/templ>
- <https://api.github.com/repos/a-h/templ/releases>
- <https://github.com/a-h/templ#readme>
- <https://templ.guide/>
- <https://templ.guide/core-concepts/template-generation/>
- <https://templ.guide/developer-tools/cli/>
- source_facts.package-manager


## Security Notes

No matching local secret-handling manifest was found for templ. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Other Package-Manager Records

- Nix - templ: normalized package name match | nixpkgs package indexes: pkgs/by-name/te/templ/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - templ - 0.3.960-r7: normalized package name match | Alpine Linux edge package indexes: templ from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Language for writing HTML user interface in Go | https://templ.guide/


## Combined YAML source

View the package source record on GitHub. [combined/templ.yml](https://github.com/mxcl/pkgdb/blob/main/combined/templ.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
