dotenvx get KEY -f directory --convention=nextjs

Return an environment variable using the Next.js convention from a directory. This is useful with monorepos.

The directory becomes the base for every file in the convention:

$ cd apps/web

dotenvx get HELLO -f ../.. --convention=nextjs
development local