A CLI tool to help developers quickly configure oxlint, oxfmt, husky, lint-staged, and commitlint for their projects.
- 🚀 One-command setup - Configure all tools with a single command
- 🔍 Smart detection - Automatically detects already installed packages
- 🧹 Legacy cleanup - Optionally removes old prettier/eslint/stylelint configs
- 📝 Editor support - Generates VSCode and Zed editor configurations
- 🔒 Version validation - Ensures Node.js compatibility with Vite 8 and OXC
- 📦 Package manager aware - Auto-detects npm, yarn, or pnpm
- Node.js >= 20.12.0
- A project with
package.json
# Using pnpm (recommended)
pnpm add oxnorm -g
# Using npm
npm install oxnorm -g# Run in your project directory
ox initThis will:
- Check your Node.js version
- Ask which editors to configure (VSCode/Zed)
- Ask about removing legacy config files
- Install and configure all tools
ox init --skip-version-check- Installs
oxfmtas dev dependency - Adds
formatscript to package.json
- Installs
oxlintas dev dependency - Creates
.oxlintrc.jsonconfiguration - Adds
lintscript to package.json
- Installs
huskyas dev dependency - Creates
.husky/pre-commithook - Creates
.husky/commit-msghook
- Installs
lint-stagedas dev dependency - Configures lint-staged in package.json
- Installs
@commitlint/cliand@commitlint/config-conventional - Creates
commitlint.config.jswith custom rules
VSCode (.vscode/settings.json):
{
"oxc.fmt.configPath": ".oxfmtrc.json",
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true
}Zed (.zed/settings.json):
{
"tab_size": 4,
"format_on_save": "on",
"formatter": "language_server",
"languages": {
"TypeScript": { "formatter": { "language_server": { "name": "oxfmt" } } },
"JavaScript": { "formatter": { "language_server": { "name": "oxfmt" } } }
// ...
}
}This tool configures commitlint with the following commit types:
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation changes |
style |
Code style changes (formatting, etc.) |
refactor |
Code refactoring |
perf |
Performance improvements |
test |
Adding or updating tests |
build |
Build system changes |
ci |
CI/CD configuration |
chore |
Maintenance tasks |
revert |
Revert a previous commit |
release |
Release version |
Example: feat: add user authentication
# Install dependencies
pnpm install
# Build
pnpm build
# Run tests
pnpm test
# Run tests with coverage
pnpm test:coverage
# Lint
pnpm lint
# Format
pnpm formatMIT