HeroUI CLI — auth, cache, CDN logic
raw JSON → 1.0.0-beta.4 verified Fri May 01 auth: no javascript
HeroUI CLI (v1.0.0-beta.4) is a beta release providing shared authentication, cache management, and CDN logic for HeroUI ecosystem. Released by JetBridge as a companion CLI tool, it offers unified command-line interfaces for auth token refresh, cache flushing, and CDN asset management. Currently unstable (pre-1.0), with breaking changes likely between betas. Differentiator: integrated CLI for HeroUI's proprietary CDN and auth services.
Common errors
error TypeError: (0 , heroui_pro.login) is not a function ↓
cause Using default import from named export.
fix
Use named import: import { login } from 'heroui-pro'
error Error: Cannot find module 'heroui-pro' ↓
cause Package not installed or wrong import path.
fix
Run: npm install heroui-pro@1.0.0-beta.4
error ERR_REQUIRE_ESM: require() of ES Module not supported ↓
cause Package is ESM-only, but using require().
fix
Use import statement or dynamic import('heroui-pro')
Warnings
breaking API surface is unstable; functions and signatures may change between beta versions. ↓
fix Pin exact version and test thoroughly on each upgrade.
deprecated The 'refreshAuth' export is deprecated in favor of 'login'. ↓
fix Replace import of 'refreshAuth' with 'login'.
gotcha All async functions reject with a proprietary error object, not instances of Error. ↓
fix Use axios interceptor or custom wrapper to normalize errors.
Install
npm install heroui-pro yarn add heroui-pro pnpm add heroui-pro Imports
- login wrong
const { login } = require('heroui-pro')correctimport { login } from 'heroui-pro' - cache wrong
import cache from 'heroui-pro'correctimport { cache } from 'heroui-pro' - cdnupload wrong
import { CDN } from 'heroui-pro'correctimport { cdnupload } from 'heroui-pro'
Quickstart
import { login, cache } from 'heroui-pro';
async function main() {
const token = await login({
username: process.env.HEROU_USER ?? '',
password: process.env.HEROU_PASS ?? '',
});
console.log('Logged in:', token);
await cache.flush('my-key', { region: 'us-east-1' });
console.log('Cache flushed');
}
main().catch(console.error);