# How do you use Comonicon.jl?

**URL:** <https://discourse.julialang.org/t/how-do-you-use-comonicon-jl/45024>\
**Category:** New to Julia\
**Created:** [August 16, 2020, 6:01am UTC](https://discourse.julialang.org/t/how-do-you-use-comonicon-jl/45024 "2020-08-16T06:01:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![onetonfoot](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/onetonfoot/32/2697_2.png) [@onetonfoot](https://discourse.julialang.org/u/onetonfoot)\
**Post date:** [August 19, 2020, 9:22am UTC](https://discourse.julialang.org/t/how-do-you-use-comonicon-jl/45024/2 "2020-08-19T09:22:32Z")

</div>

Create a new package. Then in the root put your options in a file called `Comonicon.toml`

```julia
name = "my-cli"

[install]
export_path=true
completion=true
quiet=false
compile="min"
optimize=2

```

In `deps/build.jl` put

```julia
using Comonicon, MyPackage
Comonicon.install(MyPackage)

```

Then in `src/MyPackage.jl`

```julia
module ContainerCLI

using Comonicon, Pkg.TOML, SimpleContainerGenerator, Logging

@main function my_cli(x::String)
   print("Hello from my cli $x")
end

end # module

```

---

_[View the full topic](https://discourse.julialang.org/t/how-do-you-use-comonicon-jl/45024)._
