# Creating a package extension using Pkg (rather than manually modifying Project.toml file)

**URL:** https://discourse.julialang.org/t/creating-a-package-extension-using-pkg-rather-than-manually-modifying-project-toml-file/104032
**Category:** General Usage
**Tags:** pkg, package-extensions
**Created:** [September 19, 2023, 4:16pm UTC](https://discourse.julialang.org/t/creating-a-package-extension-using-pkg-rather-than-manually-modifying-project-toml-file/104032 "2023-09-19T16:16:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)
#### Post date: [September 19, 2023, 4:16pm UTC](https://discourse.julialang.org/t/creating-a-package-extension-using-pkg-rather-than-manually-modifying-project-toml-file/104032/1 "2023-09-19T16:16:36Z")

</div>

I am developing a package (MyPackage) and have activated its environment with Pkg. I want to add an extension for when it is used together with someone else’s package (SomeoneElsesPackage). If I understand right, I could just manually modify the Project.toml file by adding:

```julia
[weakdeps]
SomeoneElsesPackage = "xxxxxxxxxxxxxxxxxxxxxxxxx"

[extensions]
SomeoneElsesPackageExtension = "SomeoneElsesPackage"

```

Is there some more “official” way of doing this? E.g. could I run `]extension ...` or something?
