Getting Started
Installationโ
- npx
- pnpm dlx
- global
npx @rtorcato/js-tooling setup
pnpm --package=@rtorcato/js-tooling dlx setup
npm install -g @rtorcato/js-tooling
js-tooling setup
What it looks likeโ
$ npx @rtorcato/js-tooling setup
๐ ๏ธ Welcome to JS Tooling Setup!
Setting up tooling in: /home/user/my-lib
? ๐ฆ What is your project name? my-lib
? ๐๏ธ What type of project are you building? ๐ Library/Package
? ๐ Do you want to use TypeScript? Yes
? โ๏ธ Which TypeScript configuration? ๐ง Base (General purpose)
? ๐ Which linting/formatting tool? โก Biome (Fast, all-in-one)
? ๐งช Which testing framework? โก Vitest (Fast, Vite-powered)
? ๐ช Set up Git hooks (Husky + lint-staged)? Yes
? ๐ Set up conventional commit linting? Yes
? ๐ Set up semantic release for automated versioning? Yes
? ๐ก๏ธ Include security automation (Dependabot + CodeQL)? Yes
? ๐ฆ Which bundler/build tool? ๐ฆ tsup (TypeScript packages)
๐ Generating configuration files...
โ
Setup completed successfully!
๐ Next Steps:
1. ๐ง Customize your tsconfig.json as needed
2. ๐ Run linting with: pnpm biome check .
3. ๐งช Run tests with: pnpm vitest
4. ๐ช Commit your changes to test the git hooks
5. ๐ Check the generated README.md for more details
Setup wizardโ
Running setup (or its alias init) launches an interactive wizard:
| Prompt | Options |
|---|---|
| Project name | defaults to directory name |
| Project type | library, web-app, node-api, nextjs-app, react-app |
| TypeScript? | yes/no |
| TS config variant | base, react, next, node, express (context-filtered) |
| Linting/formatting tool | biome (recommended), eslint, both, none |
| ESLint config (if ESLint) | base or nextjs |
| Testing framework | vitest (recommended), jest, playwright, none |
| Test environment (if Jest) | node, browser, both |
| Git hooks (Husky + lint-staged)? | yes/no |
| Conventional commit linting? | yes/no (if git hooks enabled) |
| Semantic release? | yes/no (library projects only) |
| Security automation (Dependabot + CodeQL)? | yes/no |
| Bundler | tsup, esbuild, vite (web apps), none |
A universal baseline (.editorconfig, .nvmrc, engines.node, knip.json) is scaffolded automatically โ no prompt โ because these are safe defaults for every project.
Files generatedโ
package.jsonโ merged with chosen devDependencies, scripts, andengines.node.editorconfig,.nvmrc,knip.jsonโ universal baselinetsconfig.jsonโ extends the matching presetbiome.json/eslint.config.js+prettier.config.jsโ based on linting choicevitest.config.js/jest.config.jsโ testing config.husky/pre-commit,commitlint.config.jsโ if git hooks chosenrelease.config.jsโ if semantic release chosen.github/workflows/ci.ymlโ CI workflow.github/dependabot.yml,.github/workflows/codeql.ymlโ if security automation chosenREADME.mdโ project README scaffoldreset.d.tsโ ts-reset type augmentation (if TypeScript)
Existing projects: doctor + fixโ
For repos that already exist, don't rerun setup (it's a fresh-project wizard and would clobber your configs). Use doctor to find drift, then fix to apply scaffolders incrementally:
npx @rtorcato/js-tooling doctor # see what's missing or drifted
npx @rtorcato/js-tooling fix # walk every finding, prompting per item
npx @rtorcato/js-tooling fix dependabot # or apply just one
fix defaults to No when overwriting existing files โ your customisations are preserved unless you explicitly opt in (or pass --yes). See CLI reference for full details.
Using specific configs without the wizardโ
If you only need one config file, use copy:
npx @rtorcato/js-tooling copy biome # โ biome.json
npx @rtorcato/js-tooling copy tsconfig # โ tsconfig.json
Or import configs directly in your own files:
import '@rtorcato/js-tooling/typescript/base'
CI/CD secretsโ
For automated publishing via Semantic Release, add these to your GitHub repository secrets:
NPM_TOKENโ npm authentication tokenGITHUB_TOKENโ automatically provided by GitHub Actions
Settings โ Secrets and variables โ Actions