# Wrapping a CLI tool into a julia package

**URL:** https://discourse.julialang.org/t/wrapping-a-cli-tool-into-a-julia-package/137440
**Category:** General Usage
**Created:** [June 3, 2026, 8:47pm UTC](https://discourse.julialang.org/t/wrapping-a-cli-tool-into-a-julia-package/137440 "2026-06-03T20:47:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)
#### Post date: [June 3, 2026, 8:47pm UTC](https://discourse.julialang.org/t/wrapping-a-cli-tool-into-a-julia-package/137440/1 "2026-06-03T20:47:15Z")

</div>

I have been thinking about XML schema validation in julia for a little while now. I just had an idea that I would like some feedback on:

Is it possible to take a CLI tool (I am thinking of the rust-based [GitHub - FranklinChen/validate-xml-rust: Validate XML files against their referenced XML Schemas concurrently and fast · GitHub](https://github.com/FranklinChen/validate-xml-rust)), get the binaries built using binary-builder and yggdrasil, and then in a sensible manner use the `run` function along with capturing of output streams to implement this as a Julia package?

Now I know that it would in all likelyhood be easier to wrap an existing python package, but I would rather depend on a small binary than e.g. PythonCall. Also, the rust package seemed more performant and well implemented than any of the python tools I have seen.

So comments on my concrete case of how to implement XML schema validation in julia are welcome, but I also also interested in thought on the concept of wrapping a CLI tool into a julia package.

---

<div class="post-metadata">

### Author: ![anowacki](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/anowacki/32/17375_2.png) [@anowacki](https://discourse.julialang.org/u/anowacki)
#### Post date: [June 3, 2026, 8:54pm UTC](https://discourse.julialang.org/t/wrapping-a-cli-tool-into-a-julia-package/137440/2 "2026-06-03T20:54:32Z")

</div>

The package Mineos.jl wraps command line programs, which are supplied via the Mineos\_jll.jl package, which in turn is created as an [Yggradsil recipe](https://github.com/JuliaPackaging/Yggdrasil/blob/master/M/Mineos/build_tarballs.jl), just as you are proposing. Hopefully this may be of some help.

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [June 3, 2026, 10:19pm UTC](https://discourse.julialang.org/t/wrapping-a-cli-tool-into-a-julia-package/137440/3 "2026-06-03T22:19:45Z")

</div>

Although it’s generally nicer to wrap a library rather than a binary, the latter is also done. One example is Typstry.jl, which wraps the Typst binary in Typst\_jll, which is built on Yggdrasil from Rust sources.
