A future version of Pkg will allow for a [sources] section in the Project.toml to handle this: Support a `[sources]` section in Project.toml for specifying paths and repo locations for dependencies by KristofferC · Pull Request #3783 · JuliaLang/Pkg.jl · GitHub
I’m not quite sure when this will be released, 1.11 or 1.12. You should be able to try it out now with nightly