# How to add non-Hex depencencies to Gleam projects?

**URL:** <https://erlangforums.com/t/how-to-add-non-hex-depencencies-to-gleam-projects/1947>\
**Category:** Gleam Forum\
**Tags:** gleam-questions\
**Created:** [October 16, 2022, 2:18pm UTC](https://erlangforums.com/t/how-to-add-non-hex-depencencies-to-gleam-projects/1947 "2022-10-16T14:18:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![afa](https://erlangforums.com/user_avatar/erlangforums.com/afa/32/298_2.png) [@afa](https://erlangforums.com/u/afa)\
**Post date:** [October 16, 2022, 2:18pm UTC](https://erlangforums.com/t/how-to-add-non-hex-depencencies-to-gleam-projects/1947/1 "2022-10-16T14:18:15Z")

</div>

Is there a way to add a non-Hex dependency to a Gleam project, let’s say from a Github repo directly?

I’ve only seen Hex examples in `gleam.toml`, like this:

```erlang
[dependencies]
gleam_stdlib = "~> 0.23"

```

Thanks!

---

<div class="post-metadata">

**Author:** ![lpil](https://erlangforums.com/user_avatar/erlangforums.com/lpil/32/222_2.png) [@lpil](https://erlangforums.com/u/lpil)\
**Post date:** [October 16, 2022, 5:29pm UTC](https://erlangforums.com/t/how-to-add-non-hex-depencencies-to-gleam-projects/1947/2 "2022-10-16T17:29:12Z")

</div>

Not yet. Here are issues you can follow for this feature:

> <https://github.com/gleam-lang/gleam/issues/1409>
>
> Build tool feature request: Allow specifying a local project as a build dependen…cy.
> 
> For example, I've previously used the following with rebar3 to specify a local project \`local\_project\` as a dependency:
> 
> \`\`\`
> {deps, \[
> {local\_project, {path, "local\_project"}},
> \]}. 
> \`\`\`
> 
> It would be cool if the new Gleam build tool supported this kind of build pattern as well.
> 
> I hope I am not creating a duplicate issue :-)

> <https://github.com/gleam-lang/gleam/issues/1338>
>
> Gleam only, no need for rebar3 currently
> 
> https://github.com/elixir-lang/elixi…r/blob/79cd891eb86ecb7654a7acdb63769cfdd950a5c0/lib/mix/lib/mix/scm/git.ex
> 
> \- \[\] Update gleam.toml to include git deps. Will require a fancy serde deserializer.
> \- \[\] Download top level git deps
> \- \[\] Parse gleam.toml for them
> \- \[\] Add info to manifest
> \- \[\] Integrate into the version resolver
> \- \[\] Assert there are no git deps when publishing
> 
> Anything else? Can't think of anything.
> 
> \## Config
> 
> \`\`\`toml
> \[deps\]
> short\_hex\_package = "~\> 1.0"
> long\_hex\_package = { version = "~\> 1.0" }
> git\_package = { git = "git@github.com:gleam-lang/stdlib.git", ref = "284b9f0" }
> 
> \# We could have this shortcut too
> github\_package = { github = "gleam-lang/stdlib", ref = "284b9f0" }
> \`\`\`

If it’s something you have a been for we can prioritise this work.

---

<div class="post-metadata">

**Author:** ![afa](https://erlangforums.com/user_avatar/erlangforums.com/afa/32/298_2.png) [@afa](https://erlangforums.com/u/afa)\
**Post date:** [October 16, 2022, 8:43pm UTC](https://erlangforums.com/t/how-to-add-non-hex-depencencies-to-gleam-projects/1947/3 "2022-10-16T20:43:04Z")

</div>

Thank you for the details. No urgent need for it on my side but this is certainly going to be a nice & useful feature.
