@trading-boy/cli 1.2.12 → 1.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,10 +222,17 @@ export function registerConfigCommand(program) {
222
222
  .description('Display current configuration (sensitive values redacted)')
223
223
  .addOption(new Option('--format <format>', 'Output format').choices(['text', 'json']).default('text'))
224
224
  .action((options) => {
225
+ let config = null;
225
226
  try {
226
- const config = getConfig();
227
+ config = getConfig();
228
+ }
229
+ catch {
230
+ // Config validation failed (e.g. missing DB passwords in CLI-only mode)
231
+ // Fall back to showing raw env vars
232
+ config = null;
233
+ }
234
+ if (config) {
227
235
  if (options.format === 'json') {
228
- // Build a redacted config object for JSON output
229
236
  const configRecord = config;
230
237
  const redacted = {};
231
238
  for (const key of VALID_KEYS) {
@@ -238,11 +245,22 @@ export function registerConfigCommand(program) {
238
245
  console.log(formatConfigOutput(config));
239
246
  }
240
247
  }
241
- catch (error) {
242
- const message = error instanceof Error ? error.message : String(error);
243
- logger.error({ error: message }, 'Failed to load config');
244
- console.error(chalk.red(`Error: ${message}`));
245
- process.exitCode = 1;
248
+ else {
249
+ // Graceful fallback: show available env vars without full validation
250
+ console.log(chalk.yellow(' Note: Full config validation unavailable (server env vars not set)\n'));
251
+ const redacted = {};
252
+ for (const key of VALID_KEYS) {
253
+ const value = process.env[key];
254
+ redacted[key] = value !== undefined ? redactValue(key, value) : chalk.dim('(not set)');
255
+ }
256
+ if (options.format === 'json') {
257
+ console.log(JSON.stringify(redacted, null, 2));
258
+ }
259
+ else {
260
+ for (const [key, value] of Object.entries(redacted)) {
261
+ console.log(` ${chalk.cyan(key.padEnd(30))} ${value}`);
262
+ }
263
+ }
246
264
  }
247
265
  });
248
266
  // ─── config set ───
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trading-boy/cli",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "Trading Boy CLI — crypto context intelligence for traders and AI agents. Query real-time prices, funding rates, whale activity, and DeFi risk for 100+ Solana tokens and 229 Hyperliquid perpetuals.",
5
5
  "homepage": "https://cabal.ventures",
6
6
  "repository": {