{"id":13456355,"url":"https://github.com/benduran/turbo-tools","last_synced_at":"2026-01-12T05:54:00.703Z","repository":{"id":65348460,"uuid":"589761328","full_name":"benduran/turbo-tools","owner":"benduran","description":"A collection of TurboRepo CLI tools to test, lint, build, version and publish packages in your Turborepo monorepo","archived":false,"fork":false,"pushed_at":"2025-03-14T09:03:42.000Z","size":1393,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T04:37:10.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benduran.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-16T21:49:46.000Z","updated_at":"2025-03-14T09:03:45.000Z","dependencies_parsed_at":"2023-10-17T01:57:48.829Z","dependency_job_id":"6d73b7a4-589f-4f04-b493-95d80c0e3be7","html_url":"https://github.com/benduran/turbo-tools","commit_stats":null,"previous_names":[],"tags_count":122,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benduran%2Fturbo-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benduran%2Fturbo-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benduran%2Fturbo-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benduran%2Fturbo-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benduran","download_url":"https://codeload.github.com/benduran/turbo-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245252457,"owners_count":20585067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:01:20.467Z","updated_at":"2026-01-12T05:54:00.697Z","avatar_url":"https://github.com/benduran.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# turbo-tools\n\nA collection of TurboRepo CLI tools to test, lint, build, version and publish packages in your Turborepo monorepo.\n\n[TurboRepo](https://turbo.build/), by itself, is fantastic, and you should definitely use it! However, there are a few extra commands that could be added to really make the TurboRepo experience perfect and fully-featured out of the box. This is where [Turbo Tools](https://github.com/benduran/turbo-tools) comes in!\n\nTurbo Tools add the ability for you to perform version bumps of all your packages, as well as publishing of these packages. Turbo Tools can detect which packages have changed and only version bump and publish those, leaving the rest of your repository unchanged. You can also run the version and publish commands independently from each other, which is perfect if you're building internal applications for your company, but want each `git` change to have a real-world change to your application's version number.\n\n## used by\n\n![Netflix](./docs/assets/logos/netflix.png)\n\n## dependencies\n\n**Turbo Tools supports `npm`, `yarn` and `pnpm`.**\n\nYou must have `turbo@\u003e=1.9.9` declared in your `package.json` file.\n\n---\n\n## installation\n\n**npm**\n\n`npm install @better-builds/turbo-tools -D`\n\n**yarn**\n\n`yarn add @better-builds/turbo-tools -D`\n\n**pnpm**\n\n`pnpm add @better-builds/turbo-tools -D`\n\n## usage\n\n```bash\nturbo-tools [command]\n\nCommands:\n  turbo-tools version  Skips publishing and just version bumps packages in your\n                       monorepo\n  turbo-tools publish  Publishes packages in a Turborepo-powered Monorepo, and\n                       optionally uses whichever custom Publish command you may\n                       need (if overwritten in turboTools.config.mjs)\n  turbo-tools run      Pass-through to Turborepo's run command\n  turbo-tools init     Initializes a sane default configuration of config files\n                       to work with the turbo-tools\n  turbo-tools ls       Lists all the packages in the monorepo, as detected\n                       officially by NPM\n\nOptions:\n  --version  Show version number                                       [boolean]\n  --help     Show help                                                 [boolean]\n```\n\n### `version` command\n\nUsed to version bump each package in your repository. `alpha` and `beta` releases are treated as special cases, and a unique `git sha` value is appended to the generated / bumped version number.\n\n```bash\nnpx turbo-tools version --help\n\nOptions:\n      --version           Show version number                          [boolean]\n  -p, --package           Scope the version bump and / or publish operation to s\n                          pecific packages. You can specify multiple by doing -p\n                           \u003cname1\u003e -p \u003cname2\u003e -p \u003cname3\u003e                 [array]\n  -a, --all               If true, dirties all monorepo packages and thus, force\n                          s them all to be version bumped and published\n                    [deprecated: Use --force instead] [boolean] [default: false]\n      --allowUncommitted  If true, will allow the version operation to continue\n                          when there are uncommitted files in the repo at versio\n                          n bump time. This is usefull if you have some scripts\n                          that need to run after version bumps are performed, bu\n                          t potentially before you issue a git commit and subseq\n                          uent npm publish operation. [boolean] [default: false]\n  -d, --dryRun            If true, will perform all steps right up until publish\n                          , and then output what would happen if publish were to\n                           continue                   [boolean] [default: false]\n      --force             If true, dirties all monorepo packages and thus, force\n                          s them all to be version bumped and published\n                                                      [boolean] [default: false]\n      --noChangelog       If true, will not write CHANGELOG.md updates for each\n                          package that has changed    [boolean] [default: false]\n      --noCommit          If true, will modify all required files but leave them\n                           uncommitted after all operations have completed. This\n                           will also prevent a git push from occurring\n                                                      [boolean] [default: false]\n      --noFetchAll        If true, will not fetch information from remote via \"g\n                          it fetch origin\"            [boolean] [default: false]\n      --noFetchTags       If true, does not force fetch tags from origin. By def\n                          ault, lets-version will do \"git fetch origin --tags --\n                          force\" to ensure your branch if up-to-date with the ta\n                          gs on origin                [boolean] [default: false]\n      --noPush            If true, will not push changes and tags to origin\n                                                      [boolean] [default: false]\n      --updatePeer        If true, will update any dependent \"package.json#peerD\n                          ependencies\" fields         [boolean] [default: false]\n      --updateOptional    If true, will update any dependent \"package.json#optio\n                          nalDependencies\" fields     [boolean] [default: false]\n      --releaseAs         Releases each changed package as this release type or\n                          as an exact version. \"major\" \"minor\" \"patch\" \"alpha\" \"\n                          beta\" or an exact semver version number are allowed.\n                                                                        [string]\n      --rollupChangelog   If true, in addition to updating changelog files for a\n                          ll packages that will be bumped, creates a \"rollup\" CH\n                          ANGELOG.md at the root of the repo that contains an ag\n                          gregate of changes          [boolean] [default: false]\n      --uniqify           If true, will append the git SHA at version bunp time\n                          to the end of the version number (while maintaining va\n                          lid semver)                 [boolean] [default: false]\n      --saveExact         If true, saved dependencies will be configured with an\n                           exact version rather than using npm's default semver\n                          range operator              [boolean] [default: false]\n  -y, --yes               If true, bypasses any prompts\n                                                      [boolean] [default: false]\n      --help              Show help                                    [boolean]\n```\n\n### `publish` command\n\nPerforms version bumping of your packages, and then attempts to publish said packages to whichever NPM registry you are using.\n\n```bash\nnpx turbo-tools publish --help\n\nOptions:\n      --version           Show version number                          [boolean]\n  -p, --package           Scope the version bump and / or publish operation to s\n                          pecific packages. You can specify multiple by doing -p\n                           \u003cname1\u003e -p \u003cname2\u003e -p \u003cname3\u003e                 [array]\n  -a, --all               If true, dirties all monorepo packages and thus, force\n                          s them all to be version bumped and published\n                    [deprecated: Use --force instead] [boolean] [default: false]\n      --allowUncommitted  If true, will allow the version operation to continue\n                          when there are uncommitted files in the repo at versio\n                          n bump time. This is usefull if you have some scripts\n                          that need to run after version bumps are performed, bu\n                          t potentially before you issue a git commit and subseq\n                          uent npm publish operation. [boolean] [default: false]\n  -d, --dryRun            If true, will perform all steps right up until publish\n                          , and then output what would happen if publish were to\n                           continue                   [boolean] [default: false]\n      --force             If true, dirties all monorepo packages and thus, force\n                          s them all to be version bumped and published\n                                                      [boolean] [default: false]\n      --noChangelog       If true, will not write CHANGELOG.md updates for each\n                          package that has changed    [boolean] [default: false]\n      --noCommit          If true, will modify all required files but leave them\n                           uncommitted after all operations have completed. This\n                           will also prevent a git push from occurring\n                                                      [boolean] [default: false]\n      --noFetchAll        If true, will not fetch information from remote via \"g\n                          it fetch origin\"            [boolean] [default: false]\n      --noFetchTags       If true, does not force fetch tags from origin. By def\n                          ault, lets-version will do \"git fetch origin --tags --\n                          force\" to ensure your branch if up-to-date with the ta\n                          gs on origin                [boolean] [default: false]\n      --noPush            If true, will not push changes and tags to origin\n                                                      [boolean] [default: false]\n      --updatePeer        If true, will update any dependent \"package.json#peerD\n                          ependencies\" fields         [boolean] [default: false]\n      --updateOptional    If true, will update any dependent \"package.json#optio\n                          nalDependencies\" fields     [boolean] [default: false]\n      --releaseAs         Releases each changed package as this release type or\n                          as an exact version. \"major\" \"minor\" \"patch\" \"alpha\" \"\n                          beta\" or an exact semver version number are allowed.\n                                                                        [string]\n      --rollupChangelog   If true, in addition to updating changelog files for a\n                          ll packages that will be bumped, creates a \"rollup\" CH\n                          ANGELOG.md at the root of the repo that contains an ag\n                          gregate of changes          [boolean] [default: false]\n      --uniqify           If true, will append the git SHA at version bunp time\n                          to the end of the version number (while maintaining va\n                          lid semver)                 [boolean] [default: false]\n      --saveExact         If true, saved dependencies will be configured with an\n                           exact version rather than using npm's default semver\n                          range operator              [boolean] [default: false]\n  -y, --yes               If true, bypasses any prompts\n                                                      [boolean] [default: false]\n      --skipBuild         If true, skips running the build command across all ch\n                          anged repositories before attempting to publish\n                                                      [boolean] [default: false]\n      --skipLint          If true, skips running the lint command across all cha\n                          nged repositories before attempting to publish\n                                                      [boolean] [default: false]\n      --skipTest          If true, skips running the test command across all cha\n                          nged repositories before attempting to publish\n                                                      [boolean] [default: false]\n      --help              Show help                                    [boolean]\n```\n\n### `run` command\n\nThis is a straight pass-through to `turbo run`, and accepts all the same values that [Turbo run does](https://turbo.build/repo/docs/reference/command-line-reference#turbo-run-task).\n\n### `init` command\n\nSet your repository up to use Turbo Repo with a set of sensible defaults (including generating a `turbo.json` file).\n\n```bash\nnpx turbo-tools init --help\n\nOptions:\n      --version    Show version number                                 [boolean]\n      --help       Show help                                           [boolean]\n  -n, --noPublish  If true, skips writing config files required for publishing\n                   packages to NPM                    [boolean] [default: false]\n  -d, --noDeps     If true, skips modifying your root package.json and\n                   installing the missing dependencies required to power your\n                   monorepo experience                [boolean] [default: false]\n```\n\n### `ls` command\n\nLists all of the packages that have been detected by the tools and NPM's workspace feature\n\n```bash\nnpx turbo-tools ls --help\n\nOptions:\n      --version  Show version number                                   [boolean]\n      --help     Show help                                             [boolean]\n  -j, --json     If true, prints resulting monorepo package information as JSON.\n                 If false, prints the path to each package instead.\n                                                      [boolean] [default: false]\n```\n\n## customizing behaviors\n\nThere are many cases where you might want to use Turbo Tools at your enterprise software organization, and might not be publishing packages to the public NPM registry. As such, you can customize which publish command is used for your use case, override guards for publishing, or merge additional contents into `package.json` files when you initialize your repository to work with Turbo and Turbo Tools. These can all be customized by placing a `turboTools.config.mjs` (**Note the `.mjs` extension**) file at the root of your repository. To get typing and IDE assistance for this config, you can use the provided pass-through `defineConfig` function (see below). Not all of the options are required!\n\n```javascript\nimport { defineTurboToolsConfig } from \"@better-builds/turbo-tools\";\n\nexport default defineTurboConfig({\n  init: {\n    // Will be called for every child package that exists in the monorepo when \"init\" is called.\n    // You can completely customize the contents and they will be merged in with Turbo Tools' defaults\n    addToPackageJson({ monorepoRoot, noDeps, noPublish, whichPackageManager }) {\n      return {\n        somethingCustom: new Date().toISOString(),\n      };\n    },\n  },\n  publish: {\n    // you can perform some async operation here if you'd like to check whether\n    // a publish should continue or not\n    async checkCanPublish({ dryRun, force, releaseAs, packagePath, publishTag, yes }) {\n      return true;\n    },\n\n    // if you need to use something other than \"npm publish\" for publishing your packages,\n    // you can construct the command and its arguments here and return them to have Turbo Tools\n    // call the command when publishing each package in the repository\n    getCommand({ dryRun, force, releaseAs, packageName, packagePath, publishTag, yes }) {\n      if (packageName === \"@my-monorepo-package/some-package\") {\n        return { args: [], cmd: \"package-specific-publish-command\" };\n      }\n\n      const cmd = \"custom-publish-command\";\n      const args = [\"publish\"];\n      if (releaseAs) args.push(\"--release-as\", releaseAs);\n      if (dryRun) args.push(\"--dry-run\");\n      if (publishTag) args.push(\"--tag\", publishTag);\n      args.push(\"--no-commit\", \"--no-push\", \"--no-publish-confirm\");\n\n      return { args, cmd };\n    },\n  },\n  version: {\n    // accepts all the same configuration options supported by the @better-builds/lets-version library.\n    // https://github.com/benduran/lets-version#advanced-configuration\n    changelog: {},\n  },\n});\n```\n\n## get started contributing\n\n1. Clone this repo\n2. Install [mise](https://mise.jdx.dev/) so you're using the same tool versions this repo uses.\n3. Run `./repo-setup.sh`\n4. Run all your commands via `mise x -- bun \u003cSCRIPT\u003e`\n5. Happy hacking! ⌨️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenduran%2Fturbo-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenduran%2Fturbo-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenduran%2Fturbo-tools/lists"}