stack/packages/stack-cli/src/commands/logout.ts
BilalG1 57149bd84b
Stack CLI (#1227)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

* **New Features**
  * Added Stack CLI with authentication (login/logout) commands.
  * Added project management commands to list and create projects.
  * Added configuration management to pull and push project settings.
  * Added code execution capability to run JavaScript expressions.
  * Added initialization command for Stack Auth setup.

* **Tests**
  * Added comprehensive end-to-end test suite for CLI functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-09 13:24:15 -07:00

13 lines
354 B
TypeScript

import { Command } from "commander";
import { removeConfigValue } from "../lib/config.js";
export function registerLogoutCommand(program: Command) {
program
.command("logout")
.description("Log out of Stack Auth")
.action(() => {
removeConfigValue("STACK_CLI_REFRESH_TOKEN");
console.log("Logged out successfully.");
});
}