Skip to content

Suggestion: Introduce a CLI to allow synchronization and easy maintenance of project binaries #21

Open
@brian-dlee

Description

@brian-dlee

I found your project and thought it was a nice solution for managing standalone tools for golang projects. One case we have in our project is compiling SQL to Go using sqlc. This binary requires pinning. If one developer has a different version than another then building the project could cause unnecessary or unintended changes to project files.

Currently we install sqlc inside a Justfile using go install .... We also use air and golangci-lint. What'd I'd like to do is make an easy way to manage these external dependencies. I currently use direnv to construct an ignored directory .bin in the project. Your tool fit right into this as I can just use curl to install the binaries into the .bin directory and update the PATH accordingly. The only problem I have is automatically installing updates when we bump the version.

I figured there was a solution to this with some scripting. I put together a little CLI script to download binaries via Goblin and keep track of what's installed with a .goblin and .goblin.lock files. I wrote it in python so I can slap it together relatively quickly to test out the idea. I'm happy to port it over to Go or some other language. I figured I'd drop by here, let you know my use case, and see if this project is interested in expanding its footprint by including something like this. I can surely maintain this separately on my own, so please feel free to tell me this doesn't belong here.

It's a bit hacky at the moment as it extracts the resolved version from the shell script returned by goblin.run. Should this be something more official or relied on, I'd probably want to add an API endpoint to return this information to improve stability. Here's the a brief setup for a project with this configured.

I dropped my tool into a GitHub repository here: https://github.com/brian-dlee/goblin-cli.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions