# buf.build
## Install buf CLI
From sources:
```console
$ go install github.com/bufbuild/buf/cmd/buf@latest
```
```console
$ buf --version
1.70.0
```
## Usage
In your source directory:
```console
$ buf config init
```
Would create a file `buf.yaml`, like:
:::{literalinclude} /_files/macos/workspace/go/buf.yaml.orig
:::
Modify it to add a dependency (necessary for Connect):
:::{literalinclude} /_files/macos/workspace/go/buf.yaml
:diff: /_files/macos/workspace/go/buf.yaml.orig
:::
Then a `buf.gen.yaml` is needed. See for an example. Then the codes can be generated by:
```console
$ buf dep update
$ buf lint
$ buf generate
```