Registry / devops / parcel-config-cli

parcel-config-cli

JSON →
library1.0.0jsnpmunverified

CLI tool for generating and managing Parcel bundler configurations version 1.0.0. Parcel-config-cli provides a command-line interface to initialize, validate, view, modify, and compare Parcel configuration files. It includes template-based scaffolding (minimal, standard, advanced), built-in validation to catch errors before deployment, environment-aware management for dev/staging/production, and diff support. Unlike manual config editing, it offers zero runtime dependencies (only commander and chalk), making it lightweight and easy to integrate into CI/CD pipelines. The project is currently stable and actively maintained on GitHub.

npm install parcel-config-cli
INSTALL
IMPORT
SIG · PARCEL-CONFIG-CLI
P
parcel-config-cli
devopsjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parcel-config
npx parcel-config init
parcel-config init
The CLI is meant to be run from the terminal, not imported as a module. Use npx for one-off usage without global install.
init
import { init } from 'parcel-config-cli'
const init = require('parcel-config-cli')
While parcel-config-cli is primarily a CLI tool, it also exports functions for programmatic use. ESM import is preferred.
validate
import { validate } from 'parcel-config-cli'
validate is a named export, not default.

Demonstrates CLI usage for initialization, validation, property setting, and viewing config; plus programmatic use with TypeScript imports.

// Install globally or use npx // Initialize a standard Parcel configuration parcel-config init --template standard // Validate the generated config parcel-config validate // Set a property parcel-config set settings.debug true // View config as JSON for production parcel-config show --env production --json // Or programmatically: import { init, validate } from 'parcel-config-cli'; import { writeFileSync } from 'fs'; const config = await init({ template: 'minimal', output: undefined }); const isValid = await validate({ config }); writeFileSync('.parcelrc', JSON.stringify(config, null, 2)); console.log('Config valid:', isValid);
parcel-config-cli --version
Debug
Known issues
gotchaThe generated config files use the .parcelrc naming convention; if you rename them, the CLI commands may not detect them automatically.
fix
Ensure the config file is named .parcelrc or explicitly pass the path to commands: parcel-config validate path/to/config.json
affects: >=1.0
breakingVersion 1.0.0 changed the default template from 'minimal' to 'standard'. Existing projects upgrading may need to adjust their config.
fix
Run parcel-config init --template minimal to revert to the old default if needed.
affects: 1.0
deprecatedThe --format flag in the show command is deprecated; use --json instead.
fix
Replace --format json with --json in your scripts.
affects: >=1.0
gotchaThe set command only supports string values; boolean and number values must be provided as strings (e.g., 'true' or '123').
fix
Wrap values in quotes when using the CLI: parcel-config set settings.debug 'true'
affects: >=1.0
Errors
Common errors & fixes
Error: Cannot find module 'parcel-config-cli'
The package is not installed or not found in node_modules.
fix
Install globally: npm install -g parcel-config-cli, or use npx: npx parcel-config-cli init
parcel-config: command not found
Global installation is missing or PATH is not set correctly.
fix
Install globally: npm install -g parcel-config-cli, or run via npx: npx parcel-config init
Unrecognized option: --format
The --format flag has been replaced by --json.
fix
Use --json instead: parcel-config show --json
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
commanderrequiredused for CLI argument parsing
chalkrequiredused for colorful terminal output
Agent activity
2 hits · last 30 days
node
2
Resources
parcel-config-cli — npm install parcel-config-cli · libregistry