
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
@heroui/codemod
Advanced tools
HeroUI Codemod provides transformations to help migrate your codebase from NextUI to HeroUI
The CLI provides a comprehensive suite of tools to migrate your codebase from NextUI to HeroUI.
Note: The heroui CLI requires Node.js 18.17.x or later
Note: If running in monorepo, you need to run the command in the root of your monorepo
You can start using @heroui/codemod in one of the following ways:
npx @heroui/codemod@latest
npm install -g @heroui/codemod
Usage: @heroui/codemod [command]
A CLI tool for migrating your codebase to heroui
Arguments:
codemod Specify which codemod to run
Codemods: import-heroui, package-json-package-name, heroui-provider, tailwindcss-heroui, css-variables, npmrc
Options:
-v, --version Output the current version
-d, --debug Enable debug mode
-h, --help Display help for command
-f, --format Format the affected files with Prettier
Commands:
migrate [projectPath] Migrate your codebase to use heroui
Updates all import statements from @nextui-org/* packages to their @heroui/* equivalents.
heroui-codemod import-heroui
Example:
import { Button } from "@nextui-org/button" to import { Button } from "@heroui/button"Updates all package names in package.json from @nextui-org/* to @heroui/*.
heroui-codemod package-json-package-name
Example:
@nextui-org/button: x.xx.xxx to @heroui/button: x.xx.xxxMigrate NextUIProvider to HeroProvider.
heroui-codemod heroui-provider
Example:
import { NextUIProvider } from "@nextui-org/react" to import { HeroProvider } from "@heroui/react"
<NextUIProvider>...</NextUIProvider> to <HeroProvider>...</HeroProvider>
Migrate all the tailwind.config.(j|t)s file to use the @heroui package.
heroui-codemod tailwindcss-heroui
Example:
const {nextui} = require('@nextui-org/theme') to const {heroui} = require('@heroui/theme')
plugins: [nextui({...})] to plugins: [heroui({...})]
content: ['./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'] to content: ['./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}']
var(--nextui-primary-500) to var(--heroui-primary-500)
Migrate all the css variables in the file starting with --nextui- to --heroui-.
heroui-codemod css-variables
Example:
className="text-[var(--nextui-primary-500)]" to className="text-[var(--heroui-primary-500)]"Migrate the .npmrc file to use the @heroui package.
heroui-codemod npmrc
Example:
public-hoist-pattern[]=*@nextui-org/theme* to public-hoist-pattern[]=*@heroui/theme*Migrate your entire codebase from NextUI to heroui. You can choose which codemods to run during the migration process.
heroui-codemod migrate [projectPath] [--format]
Example:
heroui-codemod migrate ./my-nextui-app
Output:
heroui Codemod v0.0.1
┌ Starting to migrate nextui to heroui
│
◇ 1. Migrating "package.json"
│
◇ Do you want to migrate package.json?
│ Yes
│
◇ Migrated package.json
│
◇ 2. Migrating import "nextui" to "heroui"
│
◇ Do you want to migrate import nextui to heroui?
│ Yes
│
◇ Migrated import nextui to heroui
│
◇ 3. Migrating "NextUIProvider" to "HeroUIProvider"
│
◇ Do you want to migrate NextUIProvider to HeroUIProvider?
│ Yes
│
◇ Migrated NextUIProvider to HeroUIProvider
│
◇ 4. Migrating "tailwindcss"
│
◇ Do you want to migrate tailwindcss?
│ Yes
│
◇ Migrated tailwindcss
│
◇ 5. Migrating "css variables"
│
◇ Do you want to migrate css variables?
│ Yes
│
◇ Migrated css variables
│
◇ 6. Migrating "npmrc" (Pnpm only)
│
◇ Do you want to migrate npmrc (Pnpm only) ?
│ Yes
│
◇ Migrated npmrc
│
└ ✅ Migration completed!
We're excited to see the community adopt NextUI CLI, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!
Contributions are always welcome!
See CONTRIBUTING.md for ways to get started.
Please adhere to this project's CODE_OF_CONDUCT.
FAQs
HeroUI Codemod provides transformations to help migrate your codebase from NextUI to HeroUI
The npm package @heroui/codemod receives a total of 220 weekly downloads. As such, @heroui/codemod popularity was classified as not popular.
We found that @heroui/codemod demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.