# Comonicon: Pre-1.0 Announcement

**URL:** https://discourse.julialang.org/t/comonicon-pre-1-0-announcement/77657
**Category:** Package Announcements
**Tags:** package, announcement
**Created:** [March 9, 2022, 11:54pm UTC](https://discourse.julialang.org/t/comonicon-pre-1-0-announcement/77657 "2022-03-09T23:54:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)
#### Post date: [March 9, 2022, 11:54pm UTC](https://discourse.julialang.org/t/comonicon-pre-1-0-announcement/77657/1 "2022-03-09T23:54:36Z")

</div>

The CLI generator [Comonicon](https://github.com/comonicon/Comonicon.jl) has been announced for a while and has been tagged 0.12.10 version recently. The interface has been stabilized for a while, thus I’m thinking to release its first 1.0 version. I’d like to see if there is any more feedback in terms of the APIs before I do so.

> [@Comonicon.jl - Fast, Simple and Light weight CLI generator](https://discourse.julialang.org/t/comonicon-jl-fast-simple-and-light-weight-cli-generator/43744):
>
> I’m pleased to announce a new package [GitHub - comonicon/Comonicon.jl: Your best CLI generator in JuliaLang](https://github.com/Roger-luo/Comonicon.jl) for making CLI (Command Line Interface) in Julia. Comonicon is now on beta, I’ll be happy to see some feedbacks and potential collaborations from the community. Comonicon features Colorful and Neat Help Info You can see an example created by Comonicon below at [IonCLI](https://github.com/Roger-luo/IonCLI.jl) Comonicon will parse your markdown docstring and reformat it as your terminal help message. Fast Start-Up The …

## A brief review of what’s changed since the last post

### More shell autocompletion support

Bash auto-completion has been added recently.

now supports autocompeting types, such as `Path`, `DirName`, `FileName` etc. or customize the autocomplete codegen by overloading the corresponding API for your own type, e.g `Base.tryparse`,  
`BashCompletions.emit_compgen`, `ZSHCompletions.emit_action`

### Dash separator support

`--` can be used to separate the arguments if it’s turned on.

### Script compile cache is removed

The old Comonicon version uses a cache file to store the CLI compile results  
to accelerate the startup time. We removed this feature/workaround in later versions  
because this is more a Julia compiler issue and it only works when the application  
is mainly CLI code, so there is no apparent speedup for practical cases. One should  
always consider using a proper project module to let Julia compiler itself cache the result.

### Better Error Handling

now Comonicon support custom CLI error exception handling, via `CommandException`, `CommandExit`, `CommandError` exception types, and shorthand function `cmd_error`, `cmd_exit`  
to help users hide Julia stacktrace and print out help info when error. Or handling exit and exit code  
without actually exit the entire process. This makes it possible to reuse the CLI code directly in other packages without worrying about unexpected `exit` in the CLI.

### More explicit docstring format

Previously we treat the first sentence of the markdown paragraph as the brief description,  
we now making this more explicit by requiring one to use an `Intro`/`Introduction` section to  
explicitly describe the long description, e.g

```julia-auto
"""
    command <args>

description of the command.

# Intro

asdmwds dasklsam xasdklqm dasdm, qwdjiolkasjdsa
dasklmdas weqwlkjmdas kljnsadlksad qwlkdnasd
dasklmdlqwoi, dasdasklmd qw,asd. dasdjklnmldqw.

# Args

- `arg1`: argument 1.
- `arg2`: argument 2.
- `arg3`: argument 3.
- `arg4`: argument 4.
"""

```

### PackageCompiler 2.0

Comonicon has reworked it is built on top of the PackageCompiler 2.0 now, and will use Scratch space to manage each CLI’s environment TOML file and their system images. This will help the installed CLI get managed and correctly garbage collected by Julia’s `Pkg` manager.

### CLI plugins

except forwarding `CASTED_COMMANDS` constant to create plugin package of a CLI application. We now support the dash convention of plugins, e.g `git-remote` will be the plugin of `git`, this can be turned on via

```toml
[command]
plugin=true

```
