# \[ANN\] ArtifactUtils.jl – Artifacts for the People!

**URL:** https://discourse.julialang.org/t/ann-artifactutils-jl-artifacts-for-the-people/48524
**Category:** Package Announcements
**Tags:** packages, artifacts
**Created:** [October 16, 2020, 10:15pm UTC](https://discourse.julialang.org/t/ann-artifactutils-jl-artifacts-for-the-people/48524 "2020-10-16T22:15:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)
#### Post date: [October 16, 2020, 10:15pm UTC](https://discourse.julialang.org/t/ann-artifactutils-jl-artifacts-for-the-people/48524/1 "2020-10-16T22:15:13Z")

</div>

Many may not know this, but the Artifacts system is actually really useful outside of [BinaryBuilder.jl](https://juliapackaging.github.io/BinaryBuilder.jl/latest/) as well, for shipping tarballs in Julia projects in a straightforward way. The only hurdle currently, is that it’s quite awkward to create an `Artifacts.toml` file for use in a package or project, if you already have an existing tarball. That is why it can be quite tempting to use BinaryBuilder infrastructure for this, which is really overkill here and unnecessarily adds the hassle of having to go through Yggdrasil for any new releases.  
That is why I am happy to announce [ArtifactUtils.jl](https://github.com/simeonschaub/ArtifactUtils.jl), which exports a function `add_artifact!`, that makes creating an `Artifacts.toml` file for providing tarballs in Julia projects a breeze. You only need a `.tar.gz` file, that’s hosted somewhere. (You can use GitHub releases for this, for example. Here, we use the JuliaMono font as an example, which has tarballs already hosted on GitHub.) From the README:

```julia
julia> using ArtifactUtils, Pkg.Artifacts # Pkg.Artifacts provides the artifact string macro

julia> add_artifact!(
           "Artifacts.toml",
           "JuliaMono",
           "https://github.com/cormullion/juliamono/releases/download/v0.021/JuliaMono.tar.gz",
           force=true,
       )
SHA1("888cda53d12753313f13b607a2655448bfc11be5")

julia> artifact"JuliaMono"
Downloading artifact: JuliaMono
curl: (22) The requested URL returned error: 404 Not Found
Downloading artifact: JuliaMono
######################################################################## 100.0%#=#=#
"/home/simeon/.julia/artifacts/888cda53d12753313f13b607a2655448bfc11be5"

julia> run(`ls $ans`);
JuliaMono-Black.ttf	JuliaMono-Bold.ttf JuliaMono-Light.ttf	JuliaMono-RegularLatin.ttf LICENSE
JuliaMono-BoldLatin.ttf JuliaMono-ExtraBold.ttf JuliaMono-Medium.ttf	JuliaMono-Regular.ttf

```

Just add this `Artifacts.toml` to your Julia project and use `artifact"JuliaMono"` anywhere in your code, to get access to its containing files. The directory the tarball gets extracted to is supposed to be immutable, so this is not meant for modifying the downloaded files, it is possible to provide overrides for developing artifacts though.  
Be sure to check out [the docs](https://simeonschaub.github.io/ArtifactUtils.jl/dev/) as well! Currently, this package only contains a single function `add_artifact!`, but feel free to let me know, if there is some other Artifacts functionality, you feel is missing from the current `Pkg.Artifacts` API.  
Pretty much all of the credit here goes to the Pkg developers though, who did amazing work in implementing the Artifacts system! This really just provides a small convenience function over that. For reference, this package evolved out of [this Pkg PR](https://github.com/JuliaLang/Pkg.jl/pull/1951).

---

<div class="post-metadata">

### Author: ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)
#### Post date: [October 23, 2020, 1:38am UTC](https://discourse.julialang.org/t/ann-artifactutils-jl-artifacts-for-the-people/48524/2 "2020-10-23T01:38:28Z")

</div>

Thank you! This was enough to get me over the artifact hump and allowed me to get rid of the data within my repository for my package. Feels good!

![image](https://global.discourse-cdn.com/julialang/original/3X/a/a/aa840cc3b2beaa7a3c4c918a2979e6efe0786ea9.png)

---

<div class="post-metadata">

### Author: ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)
#### Post date: [September 14, 2022, 8:44am UTC](https://discourse.julialang.org/t/ann-artifactutils-jl-artifacts-for-the-people/48524/3 "2022-09-14T08:44:24Z")

</div>

Thanks for this package @simeonschaub, I just tried to use it for downloading a tarball with executables in it form a NAS server, but that fails entirely.I am on a windows machine with the NAS mounted as a network drive. I replaced the github address in jour example with the network address of the tarball.

Would you say it should work out of the box, or is it simply not the right tool for that ?
