MCPcopy
hub / github.com/upstash/context7 / registerAuthCommands

Function registerAuthCommands

packages/cli/src/commands/auth.ts:25–47  ·  view source on GitHub ↗
(program: Command)

Source from the content-addressed store, hash-verified

23}
24
25export function registerAuthCommands(program: Command): void {
26 program
27 .command("login")
28 .description("Log in to Context7")
29 .option("--no-browser", "Don't open browser automatically")
30 .action(async (options) => {
31 await loginCommand(options);
32 });
33
34 program
35 .command("logout")
36 .description("Log out of Context7")
37 .action(() => {
38 logoutCommand();
39 });
40
41 program
42 .command("whoami")
43 .description("Show current login status")
44 .action(async () => {
45 await whoamiCommand();
46 });
47}
48
49function renderDeviceCodeBox(
50 userCode: string,

Callers 2

index.tsFile · 0.85
runCommandFunction · 0.85

Calls 3

loginCommandFunction · 0.85
logoutCommandFunction · 0.85
whoamiCommandFunction · 0.85

Tested by 1

runCommandFunction · 0.68