# 使用 Homebrew, Nix 安装 tygo

查看 tygo 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tygo
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

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

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

## 软件包事实

- **软件包键:** brew:tygo
- **软件包管理器:** Homebrew
- **版本:** 0.2.21
- **来源摘要:** Generate Typescript types from Golang source code
- **主页:** <https://github.com/gzuidhof/tygo>
- **仓库:** <https://github.com/gzuidhof/tygo>
- **最后更新:** 2026-07-26T03:12:24+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- tygo (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.2.21
## 项目历史与用法

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

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 为什么软件包爱好者会关心

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

### 时间线

- 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.

### 来源

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


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- 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
## 其他软件包管理器记录

- 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)


## 来源

- 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
