`path` subcommand
- Dominant language
- Go
- Stars
- 57
- Forks
- 10
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 7
Description
A significantly improved user experience could be unlocked by adding a `binny path ` subcommand. This subcommand should operate on a single binary to verify it is available and return the full path to the binary.
This feature would unlock a much nicer usage pattern, where as long as you have binny, you can efficiently and reliably run commands across all systems and environments.
When coupled with these features:
* https://github.com/anchore/binny/issues/178
* https://github.com/anchore/binny/issues/28
* https://github.com/anchore/binny/issues/29
... it would unlock a simpler model, where usages become references to `binny path` instead of a user needing to understand the `.tool` directory or binaries picked up from the environment, especially in a `Taskfile` which normalizes some scripting such as pipes from commands, could work reliably cross-platform. Take this command as example:
```Makefile
UNIT_TESTS = $(shell $(GO) list ./... | grep -v /test/)
unit:
go test $(UNIT_TESTS)
```
... this summarily fails on Windows due to grep not being available, but almost every other platform has what we need. Maybe something like this would work across platforms:
```Makefile
GO = $(shell binny path go)
GREP = $(shell binny path grep)
UNIT_TESTS = $(shell $(GO) list ./... | $(GREP) -v /test/)
unit:
$(GO) test $(UNIT_TESTS)
```
... and especially in a Taskfile, since the shell is made more consistent:
```Taskfile
unit:
cmds:
- cmd: "$(binny path go) test $($(binny path go) list ./... | $(binny path grep) -v /test/)"
```
... additionally, and maybe more importantly, since the `path` subcommand is only concerned with a single binary, things like [`bouncer`](https://github.com/wagoodman/go-bouncer), which has no Windows version wouldn't fail to be downloaded when a user runs `make test`, both making the execution faster and more robust.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the CLI entry point for `binny path` and the existing binary availability and download behavior. Review issues 178, 28, and 29 for related dependencies and constraints. Done means the command handles one binary, verifies availability, and returns its full path reliably across supported platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100