I’ve been interested in a lot of the Zig-built executables people are creating, especially ones that are fresh or experimental and won’t be in a package manager yet. I wanted an easy way to speed up the workflow of clone, zig-build, and put on PATH. So… I wrote crozbi and put it up publicly to share.
(For anyone with deja vu, the first draft was called czbi)
As an example if I have the right version of zig on PATH (today this would be “master”) and I want to install habu I’d just write:
crozbi schmee/habu
And then it gets cloned, built, and binary symlinks are created in $HOME/.local/bin (With the big assumption that people will have this location on PATH usually)
It’s implemented in bash and I’m using a Suckless-inspired approach for the project: aim to be minimal and hackable, and favor edit/patch/fork/etc for customization. (Instead of like, a config file or something)
Super cool! I’ve been playing with the idea of making “cargo install” but for zig as it think it would make getting tools much easier. An interesting addition might be supporting single file tools inside other repositories copyhound comes to mind. tigerbeetle/src/copyhound.zig at main · tigerbeetle/tigerbeetle · GitHub
Will zon the dependency system include something similar to this or is that out of scope?
I was going down the same rabbit hole recently, and tried writing something similar in pure zig (with the understanding that it’s probably better suited as a bash script )
It only works on master, and there isn’t much cleanup done for older versions, but it was fun to work with the builtin HttpClient and learn quite a bit of zig along the way. Seems like a few of us have the same idea around finding an easy way to keep in sync with a nightly local install.