@oodarun/cli 0.1.15 → 0.1.16

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 +23 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1325,6 +1325,21 @@ function whoamiCmd(opts) {
1325
1325
  `);
1326
1326
  }
1327
1327
  }
1328
+ function logoutCmd(opts) {
1329
+ const envSession = Boolean(process.env.OODA_ACCESS_TOKEN || process.env.OODA_ORG_ID);
1330
+ clearJwtTokens();
1331
+ clearOrgMode();
1332
+ if (opts.json) {
1333
+ console.log(JSON.stringify({ ok: true, loggedOut: true, envSession }));
1334
+ return;
1335
+ }
1336
+ console.log(`
1337
+ ${c.green}${c.bold}\u2713${c.reset} Logged out${c.gray} (cleared ~/.ooda/auth.json).${c.reset}`);
1338
+ if (envSession) {
1339
+ console.log(` ${c.yellow}!${c.reset} ${c.gray}A session is still set via ${c.bold}OODA_ACCESS_TOKEN${c.reset}${c.gray}/${c.bold}OODA_ORG_ID${c.reset}${c.gray} \u2014 unset those to fully log out.${c.reset}`);
1340
+ }
1341
+ console.log("");
1342
+ }
1328
1343
  async function completeJwtLogin(result) {
1329
1344
  let orgId;
1330
1345
  let orgName;
@@ -5904,6 +5919,7 @@ Usage:
5904
5919
  Commands:
5905
5920
  (no command) Open the interactive project menu
5906
5921
  login Sign in with an email code (password fallback)
5922
+ logout Sign out (clears the saved session)
5907
5923
  whoami Show the current session (exits non-zero if none)
5908
5924
  list, ls List your projects
5909
5925
  connect <project> Connect to a project and run Claude (interactive)
@@ -5959,7 +5975,7 @@ Examples:
5959
5975
  }
5960
5976
 
5961
5977
  // src/cli/index.ts
5962
- var CLI_VERSION = "0.1.15";
5978
+ var CLI_VERSION = "0.1.16";
5963
5979
  function formatMutationError(result) {
5964
5980
  const parts = [];
5965
5981
  if (result.status !== void 0) parts.push(String(result.status));
@@ -6006,6 +6022,7 @@ function parseArgs(argv) {
6006
6022
  else if (first === "publish") command = "publish";
6007
6023
  else if (first === "sites") command = "sites";
6008
6024
  else if (first === "login") command = "login";
6025
+ else if (first === "logout") command = "logout";
6009
6026
  else if (first === "whoami") command = "whoami";
6010
6027
  else if (first === "help") command = "help";
6011
6028
  if (rest.includes("--help") || rest.includes("-h")) command = "help";
@@ -6486,7 +6503,6 @@ async function directConnect(projectName) {
6486
6503
  async function main() {
6487
6504
  const args = parseArgs(process.argv);
6488
6505
  const cwd = process.cwd();
6489
- printLogo(CLI_VERSION);
6490
6506
  if (args.command === "help") {
6491
6507
  console.log(buildHelpText(CLI_VERSION));
6492
6508
  process.exit(0);
@@ -6525,6 +6541,10 @@ async function main() {
6525
6541
  whoamiCmd({ json: args.json });
6526
6542
  process.exit(process.exitCode ?? 0);
6527
6543
  }
6544
+ if (args.command === "logout") {
6545
+ logoutCmd({ json: args.json });
6546
+ process.exit(process.exitCode ?? 0);
6547
+ }
6528
6548
  if (args.command === "connect") {
6529
6549
  if (!args.connectTarget) {
6530
6550
  console.log(` ${c.red}Usage: ooda connect <project-name>${c.reset}`);
@@ -6536,6 +6556,7 @@ async function main() {
6536
6556
  await directConnect(args.connectTarget);
6537
6557
  process.exit(0);
6538
6558
  }
6559
+ printLogo(CLI_VERSION);
6539
6560
  const { port } = await startServer({ port: args.port, cwd });
6540
6561
  const dashboardUrl = process.env.OODA_DASHBOARD_BASE || `http://localhost:${port}`;
6541
6562
  while (true) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oodarun/cli",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Launch Claude Code on cloud dev environments",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",