Getting Started
Installationโ
- npx
- pnpm dlx
- global
npx @rtorcato/repo-tooling setup
pnpm --package=@rtorcato/repo-tooling dlx setup
npm install -g @rtorcato/repo-tooling
repo-tooling setup
What it looks likeโ
$ npx @rtorcato/repo-tooling setup
๐ ๏ธ Welcome to JS Tooling Setup!
Setting up tooling in: /home/user/my-lib
? ๐ฃ๏ธ What is the primary language of this repo? JavaScript/TypeScript
? ๐ฆ 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 |
|---|---|
| Primary language | js (default), swift, python, perl โ defaults to whatever the directory looks like |
| 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, cypress, 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, .vscode/extensions.json) is scaffolded automatically โ no prompt โ because these are safe defaults for every project.
The table above is the JavaScript/TypeScript question list. Picking Swift asks only for a package name and then scaffolds a SwiftPM library โ SwiftLint, Periphery and swift test are the standard rather than options. See the Swift guide.
Python and Perl write nothing and point you at doctor. For Python that's now a full audit โ Ruff, mypy, pytest, .gitignore, CI and git hooks on top of the language-agnostic checks, all fixable with fix; only the setup preset is still missing. See the Python reference. Perl gets the language-agnostic checks (CI, CodeQL, Dependabot, GitHub repo settings) until its module lands โ see #139.
Non-interactive setup (CI / scripts)โ
Skip the prompts entirely by scaffolding from a named preset:
npx @rtorcato/repo-tooling setup --preset library -d ./my-lib --skip-install
Presets: library, web-app, node-api, nextjs-app, react-app, swift-library.
swift-library scaffolds a SwiftPM package instead of an npm one โ no package.json, no install step. See the Swift guide for the full file list.
For full control, drive setup from a ProjectConfig JSON file โ print the schema, write a config, preview, then scaffold:
npx @rtorcato/repo-tooling setup --config-schema > project-config.schema.json
npx @rtorcato/repo-tooling setup --config project.json --dry-run # preview file list
npx @rtorcato/repo-tooling setup --config project.json -d ./my-lib --skip-install
Files generatedโ
package.jsonโ merged with chosen devDependencies, scripts, andengines.node.editorconfig,.nvmrc,knip.jsonโ universal baseline.vscode/extensions.jsonโ recommends the editor extensions matching your enabled tools (merge-friendly)tsconfig.jsonโ extends the matching presetbiome.json/eslint.config.js+prettier.config.jsโ based on linting choicevitest.config.js/jest.config.jsโ testing configcodecov.ymlโ if Vitest chosen; CI runspnpm coverageand uploads to Codecov.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)
For a Swift package the list is entirely different (Package.swift, Sources/, Tests/, .swiftlint.yml, โฆ) โ see the Swift guide.
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/repo-tooling doctor # see what's missing or drifted
npx @rtorcato/repo-tooling fix # walk every finding, prompting per item
npx @rtorcato/repo-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/repo-tooling copy biome # โ biome.json
npx @rtorcato/repo-tooling copy tsconfig # โ tsconfig.json
npx @rtorcato/repo-tooling copy changesets # โ .changeset/config.json
npx @rtorcato/repo-tooling copy oxlint # โ .oxlintrc.json
npx @rtorcato/repo-tooling copy claude-skill # โ .claude/skills/repo-tooling.md
copy drops the raw preset as-is. For configs you might later customise (biome, tsconfig, vitest, โฆ) prefer fix <target> โ it won't clobber an existing file without --yes, and doctor verifies it afterwards.
Or import configs directly in your own files:
import '@rtorcato/repo-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