Mise env vars management is much better. If you really need a script to generate env vars (like what you can do with direnv, there is a clean mechanism for that).
If you need to do something when you enter the directory of a project, there is also a mechanism for that.
Mise is really nice.