# Tooling for Julia command-line scripts

**URL:** <https://discourse.julialang.org/t/tooling-for-julia-command-line-scripts/73915>\
**Category:** Package Management\
**Tags:** cli\
**Created:** [January 2, 2022, 5:41am UTC](https://discourse.julialang.org/t/tooling-for-julia-command-line-scripts/73915 "2022-01-02T05:41:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [January 2, 2022, 7:41pm UTC](https://discourse.julialang.org/t/tooling-for-julia-command-line-scripts/73915/5 "2022-01-02T19:41:59Z")

</div>

IonCLI is the real world experimental example for building CLI applications (and I think there are a few other CLIs made by others on GitHub too), but it’s currently a bit out of date due to recent changes in Comonicon and I haven’t got time to update it. But this repo should give you a more concrete example of setting up CI for system image and applications (for PC.jl v1 at the moment since I haven’t updated it yet)

> [@\[ANN\] IonCLI: your package manager and more in terminal](https://discourse.julialang.org/t/ann-ioncli-your-package-manager-and-more-in-terminal/44946):
>
> Although I still have a lot feature want to add to it, I think it’s time to announce this and let people try it since I have been making whoever I know to try it in past few weeks. Thus I’m announcing a new CLI package [IonCLI.jl](https://github.com/Roger-luo/IonCLI.jl). It’s still at an early stage, even I have tested it myself in daily usage for a few weeks, I still expect it to have some glitches, and please file an issue to help improve it if you hit any. IonCLI is a CLI command made for managing Julia packages: most of its command…

there are also simpler examples in the example folder, e.g a fake Pkg CLI interface you can run the `FakePkg.comonicon_install` with `-h` in terminal to see the help msg about what it does.

> <https://github.com/comonicon/Comonicon.jl/tree/main/example/FakePkg>
>
> //github.com/comonicon/Comonicon.jl/tree/main/example/FakePkg

I think recently this CLI app is also using it for binaries: [GitHub - KwatMDPhD/Clean.jl: Command-line program for cleaning 🛀](https://github.com/KwatMDPhD/Clean.jl)

> [@simonbyrne](#):
>
> However I do think that an application could be made up of multiple CLI commands (similar to how `git` is made up of `git-xxx` commands).

Yes this is possible with the new PackageCompiler v2 I think if multiple entries are defined. And this is related to a feature that I hope to have in the future about CLI plugins, which is a nice thing rust-clap supports.

However I think a big difference from conventional CLI apps built with C/rust/ is when you build your CLI with a system image or applications Julia has a much larger runtime and the runtime actually overlaps between binary applications how to share the runtime is not clear to me yet. Or it would be nice to revive StaticCompiler.jl or whatever is equivalent to get smaller binaries so that copying the runtime libraries is more acceptable. And large runtime also hits latency, I think currently even with system image the startup time of a CLI app is still much slower than rust or C or even go, and similar or slower than python

---

_[View the full topic](https://discourse.julialang.org/t/tooling-for-julia-command-line-scripts/73915)._
