@vibetasks/cli 0.4.3 → 0.4.5

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.
@@ -12,6 +12,7 @@ import {
12
12
 
13
13
  // bin/vibetasks.ts
14
14
  import { Command as Command16 } from "commander";
15
+ import { createRequire } from "module";
15
16
 
16
17
  // src/commands/login.ts
17
18
  import { Command } from "commander";
@@ -351,33 +352,46 @@ async function getAvailablePort(startPort = 3737) {
351
352
  }
352
353
 
353
354
  // src/commands/login.ts
354
- var loginCommand = new Command("login").description("Authenticate with TaskFlow").option("-b, --browser", "Login via browser (recommended)").action(async (options) => {
355
+ var loginCommand = new Command("login").description("Authenticate with TaskFlow").option("-b, --browser", "Login via browser (recommended)").option("-e, --email <email>", "Email for non-interactive login").option("-p, --password <password>", "Password for non-interactive login").action(async (options) => {
355
356
  if (options.browser) {
356
357
  await loginWithBrowser();
357
358
  return;
358
359
  }
359
- console.log(chalk2.blue.bold("\n\u{1F510} TaskFlow Login\n"));
360
- const answers = await inquirer.prompt([
361
- {
362
- type: "input",
363
- name: "email",
364
- message: "Email:",
365
- validate: (input) => {
366
- if (!input.includes("@")) return "Please enter a valid email address";
367
- return true;
368
- }
369
- },
370
- {
371
- type: "password",
372
- name: "password",
373
- message: "Password:",
374
- mask: "*",
375
- validate: (input) => {
376
- if (input.length < 6) return "Password must be at least 6 characters";
377
- return true;
360
+ let email = options.email;
361
+ let password = options.password;
362
+ if (email && password) {
363
+ console.log(chalk2.blue.bold("\nVibeTasks Login\n"));
364
+ } else if (!process.stdin.isTTY) {
365
+ console.log(chalk2.red("Error: Non-interactive environment requires --email and --password flags"));
366
+ console.log(chalk2.gray("\nUsage: vibetasks login --email you@example.com --password yourpassword"));
367
+ console.log(chalk2.gray(" Or: vibetasks login --browser (opens browser for OAuth)"));
368
+ process.exit(1);
369
+ } else {
370
+ console.log(chalk2.blue.bold("\nVibeTasks Login\n"));
371
+ const answers = await inquirer.prompt([
372
+ {
373
+ type: "input",
374
+ name: "email",
375
+ message: "Email:",
376
+ validate: (input) => {
377
+ if (!input.includes("@")) return "Please enter a valid email address";
378
+ return true;
379
+ }
380
+ },
381
+ {
382
+ type: "password",
383
+ name: "password",
384
+ message: "Password:",
385
+ mask: "*",
386
+ validate: (input) => {
387
+ if (input.length < 6) return "Password must be at least 6 characters";
388
+ return true;
389
+ }
378
390
  }
379
- }
380
- ]);
391
+ ]);
392
+ email = answers.email;
393
+ password = answers.password;
394
+ }
381
395
  const spinner = ora2("Authenticating...").start();
382
396
  try {
383
397
  const authManager = new AuthManager2();
@@ -390,8 +404,8 @@ var loginCommand = new Command("login").description("Authenticate with TaskFlow"
390
404
  supabaseKey
391
405
  });
392
406
  const { data, error } = await supabase.auth.signInWithPassword({
393
- email: answers.email,
394
- password: answers.password
407
+ email,
408
+ password
395
409
  });
396
410
  if (error) throw error;
397
411
  if (!data.session) {
@@ -2708,8 +2722,10 @@ function getTagColor2(category) {
2708
2722
  }
2709
2723
 
2710
2724
  // bin/vibetasks.ts
2725
+ var require2 = createRequire(import.meta.url);
2726
+ var pkg = require2("../package.json");
2711
2727
  var program = new Command16();
2712
- program.name("vibetasks").description("VibeTasks CLI - Fast task management for vibers").version("0.2.0");
2728
+ program.name("vibetasks").description("VibeTasks CLI - Fast task management for vibers").version(pkg.version);
2713
2729
  program.addCommand(setupCommand);
2714
2730
  program.addCommand(loginCommand);
2715
2731
  program.addCommand(addCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibetasks/cli",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "VibeTasks CLI - Lightning-fast task management from your terminal. Works with Claude Code, Cursor, and all AI coding tools.",
5
5
  "author": "Vyas",
6
6
  "license": "MIT",