I am very confused by the instructions here https://rogerluo.me/Comonicon.jl/
I thought the Getting started should read
- Put these code into a Julia file.jl
- Run this some other code
- In bash run this other code; see that’s how it works
But after reading getting starts, I still don’t understand how to use it. Can someone please help me? Preferably in an idiot guides way in the steps 1-3 above. I think he page currently has 1 but not 2 and 3.
Create a new package. Then in the root put your options in a file called
name = "my-cli"
using Comonicon, MyPackage
using Comonicon, Pkg.TOML, SimpleContainerGenerator, Logging
@main function my_cli(x::String)
print("Hello from my cli $x")
end # module
How do I call this in the bash?
name in the
Comonicon.toml should be available in bash so in this case
my-cli --help. The first time during development you might have to run
]build to get it to work