# Install tygo with Homebrew, Nix

Generate Typescript types from Golang source code. Version 0.2.21 via Homebrew; verified 2026-07-26. Also installable with nix: nix profile install nixpkgs#tygo.

## Install

```sh
sudo av install brew:tygo
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install tygo
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#tygo
```

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

## Package facts

- **Package key:** brew:tygo
- **Package manager:** Homebrew
- **Version:** 0.2.21
- **Source summary:** Generate Typescript types from Golang source code
- **Homepage:** <https://github.com/gzuidhof/tygo>
- **Repository:** <https://github.com/gzuidhof/tygo>
- **Last updated:** 2026-07-26T03:12:24+02:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- tygo (alias)

## Install behavior

- Bottle: not available

## Freshness

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

tygo is a Go code generator that produces TypeScript types from Go source packages.

### Project history

The official GitHub repository was created in March 2022. Its README documents generation of TypeScript interfaces, enums or unions, generic types, embedded fields, and YAML-aware typings from Go declarations.

### Adoption history

The official README documents installation with `go install`, while source_facts.package-manager records Homebrew and Nix packages, giving the tool both native Go and system-package distribution paths.

### How it is used

Users create `tygo.yaml` in a project, list Go packages and type mappings, then run `tygo generate`; library users can also construct a Config and invoke the generator from Go code.

### Why package nerds care

tygo bridges Go and TypeScript in mixed-language projects while remaining a single CLI installable through the Go toolchain or system package managers.

### Timeline

- 2022-03-02: Official GitHub repository created.
- Current: Official README documents `go install` and tygo.yaml-driven generation.
- 2026: source_facts.package-manager records Homebrew and Nix packages.

### Related projects

- The Go toolchain supplies source-package loading and the upstream installation route.
- TypeScript is the generated target language.

### Sources

- <https://api.github.com/repos/gzuidhof/tygo>
- <https://github.com/gzuidhof/tygo#readme>
- source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: tygo.yaml
## Other Package-Manager Records

- Nix - tygo: normalized package name match | nixpkgs package indexes: pkgs/by-name/ty/tygo/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

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


## Sources

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