import { findUpSync } from 'find-up'; import dotenv from 'dotenv'; import path from 'node:path'; const foundenv = findUpSync('.env', { cwd: path.dirname(process.argv[1]) }); dotenv.config({ path: foundenv, quiet: true });