A tiny shell script that uses direnv to pin Pulumi backend + stack selection per directory, eliminating surprises from global state.
Pulumi's pulumi stack select is global — it changes which stack every terminal window targets. If you have multiple terminals open, or switch between projects, it's easy to accidentally deploy to the wrong stack. Similarly, pulumi login switches your backend globally, which is problematic when you work with multiple Pulumi service instances or need different credentials for different orgs.