forked from
oppi.li/claude-code
source dump of claude code
1import type { Command } from '../../commands.js'
2import { hasAnthropicApiKeyAuth } from '../../utils/auth.js'
3import { isEnvTruthy } from '../../utils/envUtils.js'
4
5export default () =>
6 ({
7 type: 'local-jsx',
8 name: 'login',
9 description: hasAnthropicApiKeyAuth()
10 ? 'Switch Anthropic accounts'
11 : 'Sign in with your Anthropic account',
12 isEnabled: () => !isEnvTruthy(process.env.DISABLE_LOGIN_COMMAND),
13 load: () => import('./login.js'),
14 }) satisfies Command