From e788dc921e9314d9460a08c6b07290425e07e467 Mon Sep 17 00:00:00 2001 From: thatonevikash Date: Fri, 11 Sep 2026 13:37:45 +0530 Subject: [PATCH] feat(cli): simplify nova startup commands --- README.md | 14 ++++++++++---- bin/nova.js | 19 ++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c4cacb3..a57351e 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ npm link --- -## Activate +## Start ```bash -nova --activate +nova ``` On first run, NOVA will ask for your **Anthropic/GenAI API key** and save it to `~/.nova/config.json`. You won't be asked again. @@ -36,7 +36,7 @@ On first run, NOVA will ask for your **Anthropic/GenAI API key** and save it to ## Example session ``` -$ nova --activate +$ nova - > Hello, vikash. I'm 'NOVA' @@ -92,7 +92,13 @@ To reset and re-enter your API key: ```bash rm ~/.nova/config.json -nova --activate +nova +``` + +To launch NOVA's development environment: + +```bash +nova --dev ``` --- diff --git a/bin/nova.js b/bin/nova.js index 0b79258..2914e0f 100644 --- a/bin/nova.js +++ b/bin/nova.js @@ -2,13 +2,18 @@ const args = process.argv.slice(2); -if (args.includes("--activate")) { +const reportError = (err) => { + console.error("\n ✗ " + err.message + "\n"); + process.exitCode = 1; +}; + +if (args.length === 0) { const { activate } = await import("../src/index.js"); - await activate().catch((err) => { - console.error("\n ✗ " + err.message + "\n"); - process.exit(1); - }); + await activate().catch(reportError); +} else if (args.length === 1 && args[0] === "--dev") { + const { devMode } = await import("../.development/index.js"); + await devMode().catch(reportError); } else { - console.log("\n Usage: nova --activate\n"); - process.exit(0); + console.error("\n Usage: nova [--dev]\n"); + process.exitCode = 1; }