Azure / simdem

Tool for Simulating Demo's, delivering Tutorials and using documentation as tests.
MIT License
34 stars 17 forks source link

PROPOSAL: Simdem CLI execution syntax "simdem <action>" #108

Open lastcoolnameleft opened 6 years ago

lastcoolnameleft commented 6 years ago

Currently SimDem runs via: simdem <file>

What if we were to change to: simdem <action>

This would change the result to: simdem demo <file> simdem test <file> simdem dump simdem version`

This is aligned with more modern CLI's where the first word is the action to be taken. It also makes the CLI a bit more explicit.

The con is that there is no longer a "default mode" for SimDem and would force a requirement of another word.

lastcoolnameleft commented 6 years ago

This would impact the VERSION implementation for https://github.com/Azure/simdem/issues/104 CC: @rgardler

SorraTheOrc commented 6 years ago

+1

As for the no default, there can still be a default simdem all of the following could be equivalent...

simdem tutorial README.md simdem tutorial simdem README.md (extension would need to be required)

We could also have the following as equivalents:

simdem demo simdem demo README.md

Ideally we would make the default mode configurable in a .simdem/config file - but that can come later if anyone decides to implement it.

lastcoolnameleft commented 6 years ago

I'm aligned on what you proposed (default values for README.md), except for: simdem README.md. By this same means, we would allow just running simdem, which may surprise new people to have it start running commands without specifying anything.

Another reason is that it breaks the pattern I've seen in most modern CLI's of <executable> <command>. e.g. kubectl get pods

SorraTheOrc commented 6 years ago

I'm a big fan of simplicity, but it's personal preference and I can always make an alias. For the record I disagree with the "modern CLI's" statement - I guess it depends on which "modern CLIs" one uses.

Happy to drop the simdem part.

lastcoolnameleft commented 6 years ago

Fair enough, the "modern CLI" is a pretty subjective statement. I see mostly in Go CLI's which are sprouting up all over the place.

To be clear, are you ok if we drop the simdem README.md part too?

SorraTheOrc commented 6 years ago

Yes