Here are some use cases that hopefully will have the following properties:
- provide a better idea of what clk is capable of than a simple description,
- show some common pattern that emerged when using clk,
- give examples of real life uses of clk, giving hints about when it might be useful,
If you simply want to create bash commands, take a look at this one. This other one provides more insights about how to define options. When those will get bigger, take a look at how to split your code. In particular, you might want to start small with simple alias and then move to bash commands. Also, clk provides some useful “batteries” to help you create a nice and friendly command.
Sometimes, you might want to have some control about how the arguments of the command lines are evaluated, take a look at this use case to know more about them.
Also, to create powerful, dynamic command line tools that provide the best completion possible, see this pattern for writing your commands. In case you have some issues, you might want to look at the advanced use cases.
To cache some computation to disk, see the web scrapping use case.
If at some point you need to deal with a project, you might want to read this.
But, eventually, you might want to use python commands to have a full control over the user experience. Then, you might want a quick look at the available helpers.
At some point, you will definitely want to try the use case about a 3D printing flow.
If you don’t want to use the clk command line tool, you can roll your own.
Some commands might need to use secret, here is how we implement that.
This example of an ethereum local environment dev tool shows how to plug clk commands as parameters in other commands. ipfs name publish shows how to use clk bash commands to create the completion for other commands.