From ac93e9b5ad254db12dd6d3a35a46e4378dcfe181 Mon Sep 17 00:00:00 2001 From: Scott Motte Date: Wed, 1 Apr 2026 12:32:18 -0700 Subject: [PATCH 1/3] bring log ux closer to `dotenvx`'s --- lib/main.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/main.js b/lib/main.js index 967107c9..e874a08c 100644 --- a/lib/main.js +++ b/lib/main.js @@ -128,15 +128,15 @@ function _parseVault (options) { } function _warn (message) { - console.error(`[dotenv@${version}][WARN] ${message}`) + console.error(`⚠ ${message} · dotenv@${version}`) } function _debug (message) { - console.log(`[dotenv@${version}][DEBUG] ${message}`) + console.log(`┆ ${message} · dotenv@${version}`) } function _log (message) { - console.log(`[dotenv@${version}] ${message}`) + console.log(`◇ ${message} · dotenv@${version}`) } function _dotenvKey (options) { @@ -230,7 +230,7 @@ function _configVault (options) { const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || (options && options.quiet)) if (debug || !quiet) { - _log('Loading env from encrypted .env.vault') + _log('loading env from encrypted .env.vault') } const parsed = DotenvModule._parseVault(options) @@ -259,7 +259,7 @@ function configDotenv (options) { encoding = options.encoding } else { if (debug) { - _debug('No encoding is specified. UTF-8 is used by default') + _debug('no encoding is specified (UTF-8 is used by default)') } } @@ -287,7 +287,7 @@ function configDotenv (options) { DotenvModule.populate(parsedAll, parsed, options) } catch (e) { if (debug) { - _debug(`Failed to load ${path} ${e.message}`) + _debug(`failed to load ${path} ${e.message}`) } lastError = e } @@ -308,7 +308,7 @@ function configDotenv (options) { shortPaths.push(relative) } catch (e) { if (debug) { - _debug(`Failed to load ${filePath} ${e.message}`) + _debug(`failed to load ${filePath} ${e.message}`) } lastError = e } @@ -335,7 +335,7 @@ function config (options) { // dotenvKey exists but .env.vault file does not exist if (!vaultPath) { - _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`) + _warn(`you set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}`) return DotenvModule.configDotenv(options) } From 1bb439d55c55ae63a64266ea576ed540614e7fbf Mon Sep 17 00:00:00 2001 From: Scott Motte Date: Wed, 1 Apr 2026 12:42:06 -0700 Subject: [PATCH 2/3] tighten tips --- lib/main.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/lib/main.js b/lib/main.js index e874a08c..529411ca 100644 --- a/lib/main.js +++ b/lib/main.js @@ -8,19 +8,14 @@ const version = packageJson.version // Array of tips to display randomly const TIPS = [ - '🔐 encrypt with Dotenvx: https://dotenvx.com', - '🔐 prevent committing .env to code: https://dotenvx.com/precommit', - '🔐 prevent building .env in docker: https://dotenvx.com/prebuild', - '🤖 agentic secret storage: https://dotenvx.com/as2', - '⚡️ secrets for agents: https://dotenvx.com/as2', - '🛡️ auth for agents: https://vestauth.com', - '🛠️ run anywhere with `dotenvx run -- yourcommand`', - '⚙️ specify custom .env file path with { path: \'/custom/path/.env\' }', - '⚙️ enable debug logging with { debug: true }', - '⚙️ override existing env vars with { override: true }', - '⚙️ suppress all logs with { quiet: true }', - '⚙️ write to custom object with { processEnv: myObject }', - '⚙️ load multiple .env files with { path: [\'.env.local\', \'.env\'] }' + '◈ encrypted .env [www.dotenvx.com]', + '◈ secrets for agents [www.dotenvx.com]', + '⌁ auth for agents [www.vestauth.com]', + '⌘ custom filepath { path: \'/custom/path/.env\' }', + '⌘ enable debugging { debug: true }', + '⌘ override existing { override: true }', + '⌘ suppress logs { quiet: true }', + '⌘ multiple files { path: [\'.env.local\', \'.env\'] }' ] // Get a random tip from the tips array @@ -314,7 +309,7 @@ function configDotenv (options) { } } - _log(`injecting env (${keysCount}) from ${shortPaths.join(',')} ${dim(`-- tip: ${_getRandomTip()}`)}`) + _log(`injecting env (${keysCount}) from ${shortPaths.join(',')} ${dim(`// tip: ${_getRandomTip()}`)}`) } if (lastError) { From c1f682a0eb3e4d4175effb0ab9c6ef7890bb382b Mon Sep 17 00:00:00 2001 From: Scott Motte Date: Wed, 1 Apr 2026 12:47:56 -0700 Subject: [PATCH 3/3] adjust tests --- tests/test-config.js | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/tests/test-config.js b/tests/test-config.js index 3213962f..8b83cd64 100644 --- a/tests/test-config.js +++ b/tests/test-config.js @@ -329,19 +329,14 @@ t.test('displays random tips from the tips array', ct => { // Test that the tip contains one of our expected tip messages let foundExpectedTip = false const expectedTips = [ - '🔐 encrypt with Dotenvx: https://dotenvx.com', - '🔐 prevent committing .env to code: https://dotenvx.com/precommit', - '🔐 prevent building .env in docker: https://dotenvx.com/prebuild', - '🤖 agentic secret storage: https://dotenvx.com/as2', - '⚡️ secrets for agents: https://dotenvx.com/as2', - '🛡️ auth for agents: https://vestauth.com', - '🛠️ run anywhere with `dotenvx run -- yourcommand`', - '⚙️ specify custom .env file path with { path: \'/custom/path/.env\' }', - '⚙️ enable debug logging with { debug: true }', - '⚙️ override existing env vars with { override: true }', - '⚙️ suppress all logs with { quiet: true }', - '⚙️ write to custom object with { processEnv: myObject }', - '⚙️ load multiple .env files with { path: [\'.env.local\', \'.env\'] }' + '◈ encrypted .env [www.dotenvx.com]', + '◈ secrets for agents [www.dotenvx.com]', + '⌁ auth for agents [www.vestauth.com]', + '⌘ custom filepath { path: \'/custom/path/.env\' }', + '⌘ enable debugging { debug: true }', + '⌘ override existing { override: true }', + '⌘ suppress logs { quiet: true }', + '⌘ multiple files { path: [\'.env.local\', \'.env\'] }' ] for (const call of logStub.getCalls()) { @@ -390,19 +385,14 @@ t.test('displays random tips from the tips array with fallback for isTTY false', // Test that the tip contains one of our expected tip messages let foundExpectedTip = false const expectedTips = [ - '🔐 encrypt with Dotenvx: https://dotenvx.com', - '🔐 prevent committing .env to code: https://dotenvx.com/precommit', - '🔐 prevent building .env in docker: https://dotenvx.com/prebuild', - '🤖 agentic secret storage: https://dotenvx.com/as2', - '⚡️ secrets for agents: https://dotenvx.com/as2', - '🛡️ auth for agents: https://vestauth.com', - '🛠️ run anywhere with `dotenvx run -- yourcommand`', - '⚙️ specify custom .env file path with { path: \'/custom/path/.env\' }', - '⚙️ enable debug logging with { debug: true }', - '⚙️ override existing env vars with { override: true }', - '⚙️ suppress all logs with { quiet: true }', - '⚙️ write to custom object with { processEnv: myObject }', - '⚙️ load multiple .env files with { path: [\'.env.local\', \'.env\'] }' + '◈ encrypted .env [www.dotenvx.com]', + '◈ secrets for agents [www.dotenvx.com]', + '⌁ auth for agents [www.vestauth.com]', + '⌘ custom filepath { path: \'/custom/path/.env\' }', + '⌘ enable debugging { debug: true }', + '⌘ override existing { override: true }', + '⌘ suppress logs { quiet: true }', + '⌘ multiple files { path: [\'.env.local\', \'.env\'] }' ] for (const call of logStub.getCalls()) {