# Install templ with Homebrew, apk, Nix

Language for writing HTML user interfaces in Go. Version 0.3.1020 via Homebrew; verified 2026-05-10.

## 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
- **Package manager page:** <https://formulae.brew.sh/formula/templ>
- **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>
- **Upstream docs:** <https://templ.guide/>
- **License:** MIT
- **Source archive:** <https://github.com/a-h/templ/archive/refs/tags/v0.3.1020.tar.gz>
- **Last updated:** 2026-05-10T09:31:27Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- templ (cli)
- templ (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.3.1020
- Package-manager updated: 2026-05-10
- Local data: ok
- Upstream repository: https://github.com/a-h/templ
- Upstream latest detected: v0.3.1020 (current)
## 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.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** templ
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 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-r6: 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/


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [angular-cli](https://www.automicvault.com/pkg/brew/angular-cli/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [css-crush](https://www.automicvault.com/pkg/brew/css-crush/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [gatsby-cli](https://www.automicvault.com/pkg/brew/gatsby-cli/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [gwt](https://www.automicvault.com/pkg/brew/gwt/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [js-beautify](https://www.automicvault.com/pkg/brew/js-beautify/) - Shares av.db curated category or tags: cli, developer-tools, html, web-development.
- [livereload](https://www.automicvault.com/pkg/brew/livereload/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [minify](https://www.automicvault.com/pkg/brew/minify/) - Shares av.db curated category or tags: cli, developer-tools, html, web-development.
- [nuxi](https://www.automicvault.com/pkg/brew/nuxi/) - Shares av.db curated category or tags: cli, developer-tools, web-development.
- [serve](https://www.automicvault.com/pkg/brew/serve/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, development, go.

## Combined YAML source

View the package source record on GitHub. [combined/templ.yml](https://github.com/automic-vault/db/blob/main/combined/templ.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
