https://github.com/bufbuild/bufisk
Bazelisk, but for Buf. A user-friendly launcher for Buf.
https://github.com/bufbuild/bufisk
buf-cli buf-schema-registry grpc protobuf protoc protocol-buffers
Last synced: 8 months ago
JSON representation
Bazelisk, but for Buf. A user-friendly launcher for Buf.
- Host: GitHub
- URL: https://github.com/bufbuild/bufisk
- Owner: bufbuild
- License: apache-2.0
- Created: 2023-11-30T20:41:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T19:57:17.000Z (9 months ago)
- Last Synced: 2025-04-27T02:58:09.574Z (8 months ago)
- Topics: buf-cli, buf-schema-registry, grpc, protobuf, protoc, protocol-buffers
- Language: Go
- Homepage: https://buf.build
- Size: 44.9 KB
- Stars: 8
- Watchers: 8
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Bufisk
Download and run `buf` based on configuration from your environment.
Inspired by [Bazelisk](https://github.com/bazelbuild/bazelisk).
Bufisk will use (in order);
- A version specified in the environment variable `${BUF_VERSION}`.
- A version specified in a file named `.bufversion` in your current directory,
or recursively in any parent directory.
The specified version must be a valid Buf release version from
[github.com/bufbuild/buf/releases](https://github.com/bufbuild/buf/releases).
Bufisk will also download the released `sha256.txt` and `sha256.txt.minisig`,
and do all verification.
All arguments passed to `bufisk` are transparently passed through to `buf`.
```
export BUF_VERSION=1.28.1
bufisk lint
echo 1.28.1 > .bufversion
bufisk lint
```
Bufisk downloads releases to a cache directory. In most Unix-like cases, this will be `~/.cache/bufisk`.
The full logic:
The cache directory specified by `${BUF_CACHE_DIR}`. If `${BUF_CACHE_DIR}` is not set
(as it usually is not), the cache directory defaults to:
- Linux, Darwin: `${XDG_CACHE_HOME}/bufisk`, and if `${XDG_CACHE_HOME}` is not set, `${HOME}/.cache/bufisk`.
- Windows: `%LocalAppData%\bufisk`.
## Status: Alpha
Not yet stable.
Needs some hardening, better error messages, graceful handling
of common error cases, a release process, etc.
We may also want to add support for non-release tags, passing through to
`go install github.com/bufbuild/buf/cmd/buf@${BUF_VERSION}`, and potentially having
special support for a `latest`-type tag for releases. In the `go install case`,
we may also want to bootstrap `go` itself.
This has not yet been tested on Windows.
## Legal
Offered under the [Apache 2 license][license].
[license]: https://github.com/bufbuild/bufisk/blob/main/LICENSE