No more setting up the same 100 tools when starting a new project
Very opinionated by default, but following best practices and easy to customize.
Note
Still in development
Toolsync is a set of tools to configure the development tools in your monorepo. Instead of manually configuring
- build tools (turborepo, tsup, next.js)
- formatters (eslint, prettier)
- IDE Settings (vscode)
- CI pipline (GitHub Actions)
- etc.
Toolsync will set them all up from a single (optional) config file, toolsync.json.
Check out our online documentation to find out more.
This repository contains the following packages:
| Name | Description | Links |
|---|---|---|
| @toolsync/builtin | Default toolsync plugins available | |
| @toolsync/cli | The toolsync command line interface | |
| @toolsync/core | Core functionality used in @toolsync/cli etc | |
| @toolsync/create | no description | |
| @toolsync/logger | The logger we use | |
| @toolsync/object-mods | Type-safe object manipulation utility | |
| @toolsync/template | Update sections of source files | |
| @repo/toolsync-plugins | Some toolsync plugins we use in the toolsync monorepo :) | |
| @toolsync/docs | The sources of toolsync.vercel.app |
Run all tests in watch mode
bun turbo watch testJust a bunch of stuff we want to implement in the future
- Node
- Set engines in root package.json
- Set
node-versionin github actions workflows
- Pnpm
- Set correct version in root packageManager
- Set version in github actions install steps
- Use
catalog:*dependencies if configured
- Package metadata
- Sync meta fields like repository, url, author, etc.
- Ensure private packages have the same scope (e.g.
@repo/)
- Package readmes
- Header with package name, description, npm badge etc. for every package
- List of packages in Root readme
- Generate mermaid dependency graph in root
- VScode
- Create settings.json based on other plugins
- Gitignore .vscode folder
- Generate devcontainers.json
- Hide generated files in explorer (so users don't edit them directly)
- Generate "search.exclude" setting from gitignore and generated files
- Generate "files.readonlyInclude" setting from generated files a la https://tanstack.com/router/latest/docs/framework/react/routing/installation-with-vite#ignoring-the-generated-route-tree-file
- toolsync VScode extension
- Show errors for files that will be overwritten
- JSON schema for toolsync.json
- prettier
- Create .prettierrc
- Add
formatscript - Add vscode extension if enabled
- Add format task to turbo.json (if enabled)
- Github Actions
- Basic CI workflow
- ignore-sync
- Install
- setup "prepare" script
- Create .prettierignore-sync if prettier is enabled
- Add file associations to vscode settings
- Turborepo
- Create turbo.json
- Create root scripts
- Provide instructions on how to configure remote caching
- Create generators for new packages
- These should also init other tools
- Eslint
- Ensure all packages have an eslint config file
- Add vscode extension if enabled
- Ignore coverage files - Sync "ignores" with gitignore etc.
- Configure vscode setting "eslint.workingDirectories"
- Check first if "mode": "auto" isn't enough
- Configure vscode setting "editor.codeActionsOnSave"
"editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }
- Framework integration:
- Create e.g. nextjs config if used
- Disable nextjs eslint during build if github actions are used
- nextjs:
- create turbo.json like in docs/turbo.json
- Publint
- Ensure all packages have a "check:exports" script
- Add "check:exports" to turbo.json if necessary
- Add vscode extension if enabled
- @manypkg/cli
- Run during check
- Changesets
- Manage config file (?)
- Setup github action
- Provide instructions on how to configure GitHub settings (separate GITHUB_TOKEN)
- Adjust "on" in ci workflow to include the default branch
- Create a "prebuild" version of @changesets/cli that does not add 1000 runtime dependencies
- Payload
- Adjust eslint config for importmap etc.
- Recommended: A builtin plugin that loads all other builtin plugins
- Config schema: Generate a json schema for config file(s)
- CLI
-
initshould install @toolsync/cli and @toolsync/builtin (if needed) and run "prepare" -
prepareshould set up tools, update readme etc. for each package- Run from repo root to handle all packages
- Should not run during CI to speed up build
-
checkshould call prepare and check if git status is clean - tovalidate setup during CI buildscheckcould be a v2 feature
-
- Github
- Automatically update repo description + homepage
- Tailwind
- Setup prettier plugin
- Renovatebot
- Add renovate.json
- Vercel
- Add vercel.json with node version etc.
- VSCode: Add
"$schema": "https://openapi.vercel.sh/vercel.json"for vercel.json files to vscode settings, - Un-ignore turbo.json for vercel to detect it
- Shadcn UI
- Add vscode setting
"tailwindCSS.experimental.configFile": "packages/ui/src/styles/globals.css"if inside a monorepo
- Add vscode setting
-
Allow configuration via package.json
-
Store generated file hashes to detect user customizations: Warn if a file is modified by the user, ask to reset or add to "customized" files list (?)
-
Allow individial packages to disable tools in their package.json (or toolsync.json ?)
{ "toolsync": { "@toolsync/builtin/toolsync": { "prettier": false } } } -
Plugin's own default config should be loaded first so others/config file can override it
- Get rid of pino packages
- Add builtin plugins to search index
@toolsync/core does not check if a plugin's name matches the name it was loaded from. This can lead to naming conflicts during config merging etc.