openkitt 0.3.5 → 0.3.6

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 +71 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -265426,6 +265426,70 @@ async function runFullLogin(context) {
265426
265426
  console.log(import_picocolors8.default.yellow("• LLM: not configured"));
265427
265427
  }
265428
265428
  }
265429
+ async function runLoginStatus() {
265430
+ const [railway, llmConfigured, llmConfig] = await Promise.all([
265431
+ checkRailwayAuth(),
265432
+ isLlmConfigured(),
265433
+ getLlmConfig()
265434
+ ]);
265435
+ const W3 = 54;
265436
+ const dim = (s) => import_picocolors8.default.dim(s);
265437
+ const divider = (label) => {
265438
+ const pad = W3 - 2 - label.length;
265439
+ console.log(` ${dim("┌─")} ${import_picocolors8.default.bold(import_picocolors8.default.white(label))} ${dim("─".repeat(Math.max(0, pad)) + "┐")}`);
265440
+ };
265441
+ const sectionEnd = () => console.log(` ${dim("└" + "─".repeat(W3))}`);
265442
+ const row = (icon, label, value, color = import_picocolors8.default.white) => console.log(` ${dim("│")} ${icon} ${dim(label.padEnd(12))} ${color(value)}`);
265443
+ const hint = (text) => console.log(` ${dim("│")} ${dim(text)}`);
265444
+ console.log("");
265445
+ divider("Railway");
265446
+ if (railway.authenticated) {
265447
+ const user = railway.username ?? "authenticated";
265448
+ row("✓", "status", user, import_picocolors8.default.green);
265449
+ } else if (railway.error === "Railway CLI not installed") {
265450
+ row("✗", "status", "CLI not installed", import_picocolors8.default.yellow);
265451
+ hint("Install: https://docs.railway.com/cli");
265452
+ } else {
265453
+ row("✗", "status", "not authenticated", import_picocolors8.default.yellow);
265454
+ hint("Run /login railway to authenticate");
265455
+ }
265456
+ sectionEnd();
265457
+ console.log("");
265458
+ divider("LLM");
265459
+ if (llmConfigured && llmConfig) {
265460
+ const label = providerLabel(llmConfig);
265461
+ row("✓", "provider", label, import_picocolors8.default.green);
265462
+ row(" ", "model", llmConfig.model, import_picocolors8.default.cyan);
265463
+ if (llmConfig.authType === "github-copilot") {
265464
+ row(" ", "auth", "GitHub Copilot subscription", import_picocolors8.default.dim);
265465
+ } else {
265466
+ row(" ", "auth", "API key", import_picocolors8.default.dim);
265467
+ }
265468
+ if (llmConfig.validatedAt) {
265469
+ const d3 = new Date(llmConfig.validatedAt);
265470
+ const ago = formatTimeAgo(d3);
265471
+ row(" ", "configured", ago, import_picocolors8.default.dim);
265472
+ }
265473
+ } else {
265474
+ row("✗", "status", "not configured", import_picocolors8.default.yellow);
265475
+ hint("Run /login llm to configure");
265476
+ }
265477
+ sectionEnd();
265478
+ console.log("");
265479
+ }
265480
+ function formatTimeAgo(date) {
265481
+ const diffMs = Date.now() - date.getTime();
265482
+ const diffMins = Math.floor(diffMs / 60000);
265483
+ if (diffMins < 1)
265484
+ return "just now";
265485
+ if (diffMins < 60)
265486
+ return `${diffMins}m ago`;
265487
+ const diffHours = Math.floor(diffMins / 60);
265488
+ if (diffHours < 24)
265489
+ return `${diffHours}h ago`;
265490
+ const diffDays = Math.floor(diffHours / 24);
265491
+ return `${diffDays}d ago`;
265492
+ }
265429
265493
  async function runLogout(context) {
265430
265494
  if (!context.yes) {
265431
265495
  const shouldLogout = await ye({
@@ -265471,8 +265535,12 @@ async function loginCommand(context, args, commandKey = "login") {
265471
265535
  await runModelSwitch();
265472
265536
  return;
265473
265537
  }
265538
+ if (subcommand === "status") {
265539
+ await runLoginStatus();
265540
+ return;
265541
+ }
265474
265542
  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"));
265543
+ console.log(import_picocolors8.default.dim("Available: /login, /login status, /login railway, /login llm, /login model"));
265476
265544
  }
265477
265545
 
265478
265546
  // src/commands/versions.ts
@@ -265889,6 +265957,7 @@ function renderHelp() {
265889
265957
  cmd("/login railway", "", "Authenticate with Railway");
265890
265958
  cmd("/login llm", "", "Configure LLM provider and API key");
265891
265959
  cmd("/login model", "", "Switch active model without re-entering key");
265960
+ cmd("/login status", "", "Show current auth status for Railway and LLM");
265892
265961
  cmd("/logout", "", "Remove all stored credentials");
265893
265962
  sectionEnd();
265894
265963
  divider("Workspace");
@@ -265954,7 +266023,7 @@ async function helpCommand(_context, _args) {
265954
266023
  // package.json
265955
266024
  var package_default = {
265956
266025
  name: "openkitt",
265957
- version: "0.3.5",
266026
+ version: "0.3.6",
265958
266027
  description: "AI-powered monorepo scaffolding CLI",
265959
266028
  keywords: [
265960
266029
  "cli",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openkitt",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "AI-powered monorepo scaffolding CLI",
5
5
  "keywords": [
6
6
  "cli",