@opennous/cli 0.5.0 → 0.6.0
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.
- package/package.json +1 -1
- package/src/index.js +25 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -383,9 +383,20 @@ program
|
|
|
383
383
|
if (key) {
|
|
384
384
|
console.log(`Logged in\nAPI URL: ${url}\nKey: ${key.slice(0, 8)}...`);
|
|
385
385
|
} else {
|
|
386
|
-
console.log("Not logged in. Run:
|
|
386
|
+
console.log("Not logged in. Run: npx @opennous/cli login");
|
|
387
387
|
}
|
|
388
388
|
})
|
|
389
|
+
)
|
|
390
|
+
.addCommand(
|
|
391
|
+
new Command("logout")
|
|
392
|
+
.description("Sign out — remove the saved API key")
|
|
393
|
+
.action(() => {
|
|
394
|
+
const cfg = readConfig();
|
|
395
|
+
if (!cfg.apiKey) { console.log("Not signed in."); return; }
|
|
396
|
+
delete cfg.apiKey;
|
|
397
|
+
writeConfig(cfg);
|
|
398
|
+
console.log("✓ Signed out — removed the saved API key from ~/.nous/config.json");
|
|
399
|
+
})
|
|
389
400
|
);
|
|
390
401
|
|
|
391
402
|
// ---------------------------------------------------------------------------
|
|
@@ -736,5 +747,17 @@ program
|
|
|
736
747
|
console.log("\nDocs: https://docs.opennous.cloud/mcp/introduction");
|
|
737
748
|
});
|
|
738
749
|
|
|
750
|
+
// nous logout — top-level alias of `auth logout`. Removes the saved API key.
|
|
751
|
+
program
|
|
752
|
+
.command("logout")
|
|
753
|
+
.description("Sign out — remove the saved API key")
|
|
754
|
+
.action(() => {
|
|
755
|
+
const cfg = readConfig();
|
|
756
|
+
if (!cfg.apiKey) { console.log("Not signed in."); return; }
|
|
757
|
+
delete cfg.apiKey;
|
|
758
|
+
writeConfig(cfg);
|
|
759
|
+
console.log("✓ Signed out — removed the saved API key from ~/.nous/config.json");
|
|
760
|
+
});
|
|
761
|
+
|
|
739
762
|
// ---------------------------------------------------------------------------
|
|
740
|
-
program.name("nous").version("0.
|
|
763
|
+
program.name("nous").version("0.6.0").parse();
|