An interactive setup wizard that scaffolds a code-pushup.config.ts file in your repository.
npm init @code-pushup/cliThe wizard will prompt you to select plugins and configure their options, then generate a code-pushup.config.ts file.
| Option | Type | Default | Description |
|---|---|---|---|
--plugins |
string[] |
Comma-separated plugin slugs to enable | |
--config-format |
'ts' | 'js' | 'mjs' |
auto-detected | Config file format |
--mode |
'standalone' | 'monorepo' |
auto-detected | Setup mode |
--ci |
'github' | 'gitlab' | 'none' |
CI/CD integration | |
--dry-run |
boolean |
false |
Preview changes without writing files |
--yes, -y |
boolean |
false |
Skip prompts and use defaults |
Each plugin exposes its own configuration keys that can be passed as CLI arguments to skip the corresponding prompts.
| Option | Type | Default | Description |
|---|---|---|---|
--eslint.eslintrc |
string |
auto-detected | Path to ESLint config |
--eslint.patterns |
string |
src or . |
File patterns to lint |
--eslint.categories |
boolean |
true |
Add recommended categories |
| Option | Type | Default | Description |
|---|---|---|---|
--coverage.framework |
'jest' | 'vitest' | 'other' |
auto-detected | Test framework |
--coverage.configFile |
string |
auto-detected | Path to test config file |
--coverage.reportPath |
string |
coverage/lcov.info |
Path to LCOV report file |
--coverage.testCommand |
string |
auto-detected | Command to run tests |
--coverage.types |
('function' | 'branch' | 'line')[] |
all | Coverage types to measure |
--coverage.continueOnFail |
boolean |
true |
Continue if test command fails |
--coverage.categories |
boolean |
true |
Add code coverage category |
Run interactively (default):
npm init @code-pushup/cliSkip prompts and enable specific plugins:
npm init @code-pushup/cli -y --plugins=eslint,coverageSet up a monorepo with GitHub CI integration:
npm init @code-pushup/cli --mode=monorepo --ci=githubPreview the generated config without writing:
npm init @code-pushup/cli -y --dry-run