index.ts 523 B

12345678910111213141516
  1. import type { Command } from '../../commands.js'
  2. import { getSubscriptionType } from '../../utils/auth.js'
  3. import { isEnvTruthy } from '../../utils/envUtils.js'
  4. const upgrade = {
  5. type: 'local-jsx',
  6. name: 'upgrade',
  7. description: 'Upgrade to Max for higher rate limits and more Opus',
  8. availability: ['claude-ai'],
  9. isEnabled: () =>
  10. !isEnvTruthy(process.env.DISABLE_UPGRADE_COMMAND) &&
  11. getSubscriptionType() !== 'enterprise',
  12. load: () => import('./upgrade.js'),
  13. } satisfies Command
  14. export default upgrade