@vibetasks/cli 0.4.0 → 0.4.3

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.
@@ -1798,7 +1798,82 @@ function getErrorHtml(message) {
1798
1798
  </body>
1799
1799
  </html>`;
1800
1800
  }
1801
- var setupCommand = new Command12("setup").description("Interactive setup wizard for VibeTasks").option("--skip-auth", "Skip authentication step").option("--skip-claude", "Skip Claude Code configuration").option("--skip-project", "Skip project initialization").option("--skip-verify", "Skip verification step").action(async (options) => {
1801
+ async function runNonInteractiveSetup() {
1802
+ console.log(chalk13.bold.magenta("\n\u2501\u2501\u2501 VibeTasks Auto Setup \u2501\u2501\u2501\n"));
1803
+ console.log(chalk13.gray("Checking authentication..."));
1804
+ const existing = await checkExistingAuth();
1805
+ let authResult;
1806
+ if (existing.authenticated) {
1807
+ console.log(chalk13.green("\u2713") + ` Already authenticated as ${chalk13.cyan(existing.email)}`);
1808
+ authResult = { success: true, email: existing.email, skipped: true };
1809
+ } else {
1810
+ console.log(chalk13.yellow("\u26A0") + " Not authenticated");
1811
+ console.log(chalk13.gray(" Run: vibetasks login"));
1812
+ authResult = { success: false };
1813
+ }
1814
+ console.log(chalk13.gray("\nConfiguring Claude Code MCP server..."));
1815
+ const configPath = getClaudeConfigPath();
1816
+ const configDir = path2.dirname(configPath);
1817
+ try {
1818
+ await fs2.mkdir(configDir, { recursive: true });
1819
+ let config = {};
1820
+ try {
1821
+ const existingConfig = await fs2.readFile(configPath, "utf-8");
1822
+ config = JSON.parse(existingConfig);
1823
+ } catch {
1824
+ }
1825
+ if (!config.mcpServers) config.mcpServers = {};
1826
+ let mcpCommand = "vibetasks-mcp";
1827
+ let mcpArgs = [];
1828
+ try {
1829
+ if (process.platform === "win32") {
1830
+ await execAsync2("where vibetasks-mcp");
1831
+ } else {
1832
+ await execAsync2("which vibetasks-mcp");
1833
+ }
1834
+ } catch {
1835
+ mcpCommand = "npx";
1836
+ mcpArgs = ["@vibetasks/mcp-server"];
1837
+ }
1838
+ config.mcpServers.vibetasks = {
1839
+ command: mcpCommand,
1840
+ ...mcpArgs.length > 0 && { args: mcpArgs }
1841
+ };
1842
+ await fs2.writeFile(configPath, JSON.stringify(config, null, 2), "utf-8");
1843
+ console.log(chalk13.green("\u2713") + " MCP server configured");
1844
+ console.log(chalk13.gray(` Config: ${configPath}`));
1845
+ } catch (error) {
1846
+ console.log(chalk13.red("\u2717") + ` Failed to configure: ${error.message}`);
1847
+ }
1848
+ if (authResult.success) {
1849
+ console.log(chalk13.gray("\nVerifying connection..."));
1850
+ try {
1851
+ const authManager = new AuthManager12();
1852
+ const taskOps = await TaskOperations8.fromAuthManager(authManager);
1853
+ const tasks = await taskOps.getTasks("all");
1854
+ console.log(chalk13.green("\u2713") + ` Connected (${tasks.length} tasks)`);
1855
+ } catch (error) {
1856
+ console.log(chalk13.yellow("\u26A0") + ` Connection test failed: ${error.message}`);
1857
+ }
1858
+ }
1859
+ console.log(chalk13.bold.green("\n\u2501\u2501\u2501 Setup Complete \u2501\u2501\u2501\n"));
1860
+ if (!authResult.success) {
1861
+ console.log(chalk13.yellow('Next step: Run "vibetasks login" to authenticate\n'));
1862
+ } else {
1863
+ console.log(chalk13.yellow("\u26A1 Restart Claude Code to activate MCP server\n"));
1864
+ }
1865
+ console.log(chalk13.gray("Available commands:"));
1866
+ console.log(chalk13.cyan(' vibetasks add "task title"') + chalk13.gray(" - Create a task"));
1867
+ console.log(chalk13.cyan(" vibetasks list") + chalk13.gray(" - Show tasks"));
1868
+ console.log(chalk13.cyan(" vibetasks login") + chalk13.gray(" - Authenticate"));
1869
+ console.log("");
1870
+ }
1871
+ var setupCommand = new Command12("setup").description("Interactive setup wizard for VibeTasks").option("--skip-auth", "Skip authentication step").option("--skip-claude", "Skip Claude Code configuration").option("--skip-project", "Skip project initialization").option("--skip-verify", "Skip verification step").option("--auto", "Non-interactive mode (for CI/automation)").option("--non-interactive", "Alias for --auto").action(async (options) => {
1872
+ const isNonInteractive = options.auto || options.nonInteractive || !process.stdin.isTTY;
1873
+ if (isNonInteractive) {
1874
+ await runNonInteractiveSetup();
1875
+ process.exit(0);
1876
+ }
1802
1877
  showWelcome();
1803
1878
  const { proceed } = await inquirer5.prompt([{
1804
1879
  type: "confirm",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibetasks/cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.3",
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",
@@ -44,8 +44,8 @@
44
44
  "typecheck": "tsc --noEmit"
45
45
  },
46
46
  "dependencies": {
47
- "@vibetasks/core": "^0.4.0",
48
- "@vibetasks/shared": "^1.1.1",
47
+ "@vibetasks/core": "^0.4.2",
48
+ "@vibetasks/shared": "^1.1.3",
49
49
  "commander": "^11.1.0",
50
50
  "chalk": "^5.3.0",
51
51
  "ora": "^8.0.1",