openkitt 0.3.5 → 0.3.7

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.
Files changed (2) hide show
  1. package/dist/cli.js +75 -12
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -265121,8 +265121,7 @@ function providerLabel(config) {
265121
265121
  async function runRailwayLogin() {
265122
265122
  const status = await checkRailwayAuth();
265123
265123
  if (status.authenticated) {
265124
- const username = status.username ? `@${status.username}` : "unknown user";
265125
- console.log(import_picocolors8.default.green(`✓ Railway authenticated as ${username}`));
265124
+ console.log(import_picocolors8.default.green("✓ Railway: authenticated"));
265126
265125
  return;
265127
265126
  }
265128
265127
  if (status.error === "Railway CLI not installed") {
@@ -265132,8 +265131,7 @@ async function runRailwayLogin() {
265132
265131
  console.log(import_picocolors8.default.cyan("Opening Railway login in your browser..."));
265133
265132
  const loginStatus = await railwayLogin();
265134
265133
  if (loginStatus.authenticated) {
265135
- const username = loginStatus.username ? `@${loginStatus.username}` : "unknown user";
265136
- console.log(import_picocolors8.default.green(`✓ Railway authenticated as ${username}`));
265134
+ console.log(import_picocolors8.default.green("✓ Railway: authenticated"));
265137
265135
  return;
265138
265136
  }
265139
265137
  console.log(import_picocolors8.default.red(loginStatus.error ?? "Failed to authenticate with Railway."));
@@ -265383,16 +265381,14 @@ async function runModelSwitch() {
265383
265381
  async function runFullLogin(context) {
265384
265382
  const railwayStatus = await checkRailwayAuth();
265385
265383
  if (railwayStatus.authenticated) {
265386
- const username = railwayStatus.username ? `@${railwayStatus.username}` : "unknown user";
265387
- console.log(import_picocolors8.default.green(`✓ Railway authenticated as ${username}`));
265384
+ console.log(import_picocolors8.default.green("✓ Railway: authenticated"));
265388
265385
  } else if (railwayStatus.error === "Railway CLI not installed") {
265389
265386
  console.log(import_picocolors8.default.red("Railway CLI is not installed. Install Railway CLI first to enable Railway authentication."));
265390
265387
  } else {
265391
265388
  console.log(import_picocolors8.default.cyan("Railway authentication required. Opening browser login..."));
265392
265389
  const loginStatus = await railwayLogin();
265393
265390
  if (loginStatus.authenticated) {
265394
- const username = loginStatus.username ? `@${loginStatus.username}` : "unknown user";
265395
- console.log(import_picocolors8.default.green(`✓ Railway authenticated as ${username}`));
265391
+ console.log(import_picocolors8.default.green("✓ Railway: authenticated"));
265396
265392
  } else {
265397
265393
  console.log(import_picocolors8.default.red(loginStatus.error ?? "Failed to authenticate with Railway."));
265398
265394
  }
@@ -265412,8 +265408,7 @@ async function runFullLogin(context) {
265412
265408
  console.log();
265413
265409
  console.log(import_picocolors8.default.bold("Authentication summary"));
265414
265410
  if (finalRailway.authenticated) {
265415
- const username = finalRailway.username ? `@${finalRailway.username}` : "unknown user";
265416
- console.log(import_picocolors8.default.green(`✓ Railway: authenticated as ${username}`));
265411
+ console.log(import_picocolors8.default.green("✓ Railway: authenticated"));
265417
265412
  } else if (finalRailway.error === "Railway CLI not installed") {
265418
265413
  console.log(import_picocolors8.default.yellow("• Railway: unavailable (Railway CLI not installed)"));
265419
265414
  } else {
@@ -265426,6 +265421,69 @@ async function runFullLogin(context) {
265426
265421
  console.log(import_picocolors8.default.yellow("• LLM: not configured"));
265427
265422
  }
265428
265423
  }
265424
+ async function runLoginStatus() {
265425
+ const [railway, llmConfigured, llmConfig] = await Promise.all([
265426
+ checkRailwayAuth(),
265427
+ isLlmConfigured(),
265428
+ getLlmConfig()
265429
+ ]);
265430
+ const W3 = 54;
265431
+ const dim = (s) => import_picocolors8.default.dim(s);
265432
+ const divider = (label) => {
265433
+ const pad = W3 - 2 - label.length;
265434
+ console.log(` ${dim("┌─")} ${import_picocolors8.default.bold(import_picocolors8.default.white(label))} ${dim("─".repeat(Math.max(0, pad)) + "┐")}`);
265435
+ };
265436
+ const sectionEnd = () => console.log(` ${dim("└" + "─".repeat(W3))}`);
265437
+ const row = (icon, label, value, color = import_picocolors8.default.white) => console.log(` ${dim("│")} ${icon} ${dim(label.padEnd(12))} ${color(value)}`);
265438
+ const hint = (text) => console.log(` ${dim("│")} ${dim(text)}`);
265439
+ console.log("");
265440
+ divider("Railway");
265441
+ if (railway.authenticated) {
265442
+ row("✓", "status", "authenticated", import_picocolors8.default.green);
265443
+ } else if (railway.error === "Railway CLI not installed") {
265444
+ row("✗", "status", "CLI not installed", import_picocolors8.default.yellow);
265445
+ hint("Install: https://docs.railway.com/cli");
265446
+ } else {
265447
+ row("✗", "status", "not authenticated", import_picocolors8.default.yellow);
265448
+ hint("Run /login railway to authenticate");
265449
+ }
265450
+ sectionEnd();
265451
+ console.log("");
265452
+ divider("LLM");
265453
+ if (llmConfigured && llmConfig) {
265454
+ const label = providerLabel(llmConfig);
265455
+ row("✓", "provider", label, import_picocolors8.default.green);
265456
+ row(" ", "model", llmConfig.model, import_picocolors8.default.cyan);
265457
+ if (llmConfig.authType === "github-copilot") {
265458
+ row(" ", "auth", "GitHub Copilot subscription", import_picocolors8.default.dim);
265459
+ } else {
265460
+ row(" ", "auth", "API key", import_picocolors8.default.dim);
265461
+ }
265462
+ if (llmConfig.validatedAt) {
265463
+ const d3 = new Date(llmConfig.validatedAt);
265464
+ const ago = formatTimeAgo(d3);
265465
+ row(" ", "configured", ago, import_picocolors8.default.dim);
265466
+ }
265467
+ } else {
265468
+ row("✗", "status", "not configured", import_picocolors8.default.yellow);
265469
+ hint("Run /login llm to configure");
265470
+ }
265471
+ sectionEnd();
265472
+ console.log("");
265473
+ }
265474
+ function formatTimeAgo(date) {
265475
+ const diffMs = Date.now() - date.getTime();
265476
+ const diffMins = Math.floor(diffMs / 60000);
265477
+ if (diffMins < 1)
265478
+ return "just now";
265479
+ if (diffMins < 60)
265480
+ return `${diffMins}m ago`;
265481
+ const diffHours = Math.floor(diffMins / 60);
265482
+ if (diffHours < 24)
265483
+ return `${diffHours}h ago`;
265484
+ const diffDays = Math.floor(diffHours / 24);
265485
+ return `${diffDays}d ago`;
265486
+ }
265429
265487
  async function runLogout(context) {
265430
265488
  if (!context.yes) {
265431
265489
  const shouldLogout = await ye({
@@ -265471,8 +265529,12 @@ async function loginCommand(context, args, commandKey = "login") {
265471
265529
  await runModelSwitch();
265472
265530
  return;
265473
265531
  }
265532
+ if (subcommand === "status") {
265533
+ await runLoginStatus();
265534
+ return;
265535
+ }
265474
265536
  console.log(import_picocolors8.default.red(`Unknown /login subcommand: ${subcommand}`));
265475
- console.log(import_picocolors8.default.dim("Available: /login, /login railway, /login llm, /login model"));
265537
+ console.log(import_picocolors8.default.dim("Available: /login, /login status, /login railway, /login llm, /login model"));
265476
265538
  }
265477
265539
 
265478
265540
  // src/commands/versions.ts
@@ -265889,6 +265951,7 @@ function renderHelp() {
265889
265951
  cmd("/login railway", "", "Authenticate with Railway");
265890
265952
  cmd("/login llm", "", "Configure LLM provider and API key");
265891
265953
  cmd("/login model", "", "Switch active model without re-entering key");
265954
+ cmd("/login status", "", "Show current auth status for Railway and LLM");
265892
265955
  cmd("/logout", "", "Remove all stored credentials");
265893
265956
  sectionEnd();
265894
265957
  divider("Workspace");
@@ -265954,7 +266017,7 @@ async function helpCommand(_context, _args) {
265954
266017
  // package.json
265955
266018
  var package_default = {
265956
266019
  name: "openkitt",
265957
- version: "0.3.5",
266020
+ version: "0.3.7",
265958
266021
  description: "AI-powered monorepo scaffolding CLI",
265959
266022
  keywords: [
265960
266023
  "cli",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openkitt",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "AI-powered monorepo scaffolding CLI",
5
5
  "keywords": [
6
6
  "cli",