{"id":28157,"library":"rspack-config-cli","title":"Rspack Config CLI","description":"rspack-config-cli v1.0.0 is a CLI tool to generate, validate, and manage Rspack bundler configurations. It provides template-based generation (minimal, standard, advanced), validation, environment-aware settings, diff comparisons, and configuration modification via CLI commands. Designed as a lightweight alternative to manual configuration with zero runtime dependencies beyond commander and chalk. Released with active maintenance.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/okirmio-create/cli-forge","tags":["javascript","rspack","webpack","bundler","config","cli","generator"],"install":[{"cmd":"npm install rspack-config-cli","lang":"bash","label":"npm"},{"cmd":"yarn add rspack-config-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add rspack-config-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides CLI command parsing and routing","package":"commander","optional":false},{"reason":"Used for terminal output styling","package":"chalk","optional":false}],"imports":[{"note":"Package is intended to be run via npx or global install, not imported programmatically.","wrong":"node node_modules/.bin/rspack-config-cli init","symbol":"CLI entry","correct":"npx rspack-config init"},{"note":"Package is CommonJS-only at v1.0.0; ES modules are not supported.","wrong":"import { initConfig } from 'rspack-config-cli';","symbol":"Programmatic usage","correct":"const { initConfig, validateConfig, showConfig, setConfig, diffConfig, listTemplates } = require('rspack-config-cli');"},{"note":"Package does not ship TypeScript definitions; types must be declared manually.","wrong":"import { ConfigOptions } from 'rspack-config-cli';","symbol":"Types (TypeScript)","correct":"// No exported types; use inline JSDoc or custom typings"}],"quickstart":{"code":"// Install globally\nnpm install -g rspack-config-cli\n\n# Initialize a standard config\nrspack-config init --template standard --output rspack.config.js\n\n# Validate the generated config\nrspack-config validate rspack.config.js\n\n# Set a production mode\nrspack-config set mode production\n\n# Show config as JSON\nrspack-config show --json --env production\n\n# Compare dev vs prod configs\nrspack-config diff rspack.config.dev.js rspack.config.prod.js\n\n# List available templates\nrspack-config templates\n","lang":"javascript","description":"Global install and typical CLI workflow: init, validate, set, show, diff, and list templates."},"warnings":[{"fix":"Pin to exact version and review changelog before upgrading.","message":"v1.0.0 is initial stable release; breaking changes may occur before v2.","severity":"breaking","affected_versions":">=1.0.0 <2.0.0"},{"fix":"Use npx rspack-config init instead of npm install -g rspack-config-cli && rspack-config init.","message":"Global install with -g may require sudo on macOS/Linux; prefer npx.","severity":"gotcha","affected_versions":"*"},{"fix":"Always use --output to specify a unique path, especially when experimenting.","message":"Config file path defaults to rspack.config.js in current directory; may overwrite existing files.","severity":"gotcha","affected_versions":"*"},{"fix":"Use --template standard instead of minimal.","message":"The 'minimal' template is considered deprecated in favor of 'standard' from v1.1.0 onward.","severity":"deprecated","affected_versions":">=1.1.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with dependencies: npm install rspack-config-cli --save-dev","cause":"Local install without dependencies (e.g., npm install --production skips peer dependencies).","error":"Error: Cannot find module 'commander'"},{"fix":"Upgrade to v1.1.0 or later, or use --template standard instead.","cause":"Using --template advanced v1.0.0 which only supports minimal and standard.","error":"Error: The template 'advanced' is not supported in this version."},{"fix":"Use correct JSON syntax: rspack-config set settings.debug true (no quotes for boolean) or rspack-config set settings.logLevel \"warn\" (escape quotes or use single-quoted strings in shell).","cause":"Passing invalid JSON value to 'set' command (e.g., unquoted string).","error":"TypeError: Cannot read properties of undefined (reading 'split')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}