Discuss variant (the “Universal CLI”) https://github.com/mumoshu/variant
the next idea: https://github.com/mumoshu/variant/issues/86
As an ordinary engineer I often write documentation for my one-off scripts in GitHub Flavored Markdown. But it tends to get outdated quickly due to various reasons, including I just forget updating…
@Maycon Santos has joined the channel
@rohit I think about it like this: makefile is good for the wrapping bash scripts (and other executables), and variant is better than makefile to do it
Here’s a quick intro to variant I recorded for one of our developers: https://zoom.us/recording/play/4tqm82NFwAwrKQKyDPrLRiKnpoQQ3QVP0vgQzqs6ReXioWAU5msjIn9t4jfn8Fe6?continueMode=true
I just came to know about
i am not sure what advantage does variant have over regular bash scripts
proper arg validatin
most bash scripts have very poor argument handling
yep, and it provides a “upgrade path” to a golang app
you can use
variant build and some scripts to produce a single executable that runs without
and even add extra commands written in golang to your cmd written in yaml
so if you feel outgrown from
bash, variant allows you to gradually/fully migrate to
it is currently flying over my head, i will have to check it out
i guess i will start with @Erik Osterman intro video
so potentially we could replace https://github.com/cloudposse/geodesic/blob/master/rootfs/usr/local/bin/s3 with variant ?
Geodesic is a cloud automation shell. It's the fastest way to get up and running with a rock solid, production grade cloud platform built on top of strictly Open Source tools. ★ this repo! h…
Everything new we do is in variant
@Erik Osterman For variant (and also helmfile potentially) I got to think that we eventually need a tool like this:
Wow, yes, I think you are on to something
Sec developing/forming opinion
Consider adding semver
But that is more for GitHub tags/release
thx for sharing!
probably we need to explore more sources other than github tags/releases as well, like
curl from any http sources as your
probably what need for
versadep would look something like a declarative
fetch + additional sources?
oh, and i wanted
versadep to setup
PATH for us, like
rbenv does for
Aha so you can vendor everything
Btw have you ever explored terraform vendoring? Not easy
not at all. i’d love to know your experience!
For modules.. that nest modules. Only bringing it up because it’s something we’ve been tasked with solving at some point
can you nest terraform modules? i wonder how it works when multiple modules refer to/nest different versions of the module
yep, we do extreme nesting
sometimes 3-4 levels deep. maybe more.
terraform clones every reference of a module to
each one checked out to the version referenced
it uses some hashed folder which is presumably the github url with version info
Extracted from our official slack channel: have you considered a "default" command? e.g. if none of the args match, pass $* to some command (edited) e.g. terraformctl would intercept any …
yea, not for this stage
no deps of deps
i think a “package” system would be better then; perhaps why you chose
@mumoshu have you considered a “default” command? e.g. if none of the args match, pass
$* to some command
terraformctl would intercept any task defined, but if not defined, it would pass to
Haven’t tested it with deeply nested commands, but I’ve added the initial support for default commands.
script is run when if is defined and no sub-task that matches the provided arguments found.
Wrap up your bash scripts into a modern CLI today. Graduate to a full-blown golang app tomorrow. - mumoshu/variant
its available since v0.29
wow, that’s clever. I like how you kept it consistent with the rest of variant. hadn’t thought to implement it that way, but i like it.
variant to overload commands
@Erik Osterman sounds like a great addition to variant!
@Erik Osterman I believe your approach does work and simpler, which is nice!
Your assumption would be that you don’t need transitive dependencies to be handled, right?
what Add a command to install/uninstall remote dependencies defined by any source url why Mimic the terraform init -from-module=… pattern for anything as a way to initialize a project from rem…
this is like your
anydeps but uses
variant without overloading
helm as package manager.
but will be also used to fetch binaries
though I confess i wrote this without looking at
anydep and now that I do see a bunch of things I can do better
yep, we shouldn’t be tied to helm-s3 nor s3.
anydep can be enhanced to leverage any helm plugin.
so perhaps we can add another backend (http, github, etc) to anydep and serve both use-cases of mine and your
what If config-file option is set then environment specific config files can't be loaded. why We want to be able to set the config file through the option and still be able to use environment s…