npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pagopa/monorepo-generator

v0.14.1

Published

A package that will generate a monorepo, following DX conventions, from a template

Readme

@pagopa/monorepo-generator

A package that generates a monorepo scaffold following PagoPA DX conventions.

Overview

The @pagopa/monorepo-generator provides a plop-based generator and templates to bootstrap a new monorepo with the repository layout, configuration and files used across the DX initiative.

Work in progress — expect improvements to templates and prompts.

Required environment variables

  • GITHUB_TOKEN (optional but recommended): a GitHub personal access token to increase API rate limits and avoid being blocked by unauthenticated limits. If not present the generator will perform unauthenticated requests and may hit rate limits.

If you have authenticated with the GitHub CLI (gh) or another local auth mechanism that exposes a token to the environment/Octokit, you typically don't need to manually set GITHUB_TOKEN — local authentication will allow the generator to perform authenticated requests.

Variables provided to templates

The generator exposes the following variables to Handlebars templates. Use the Handlebars syntax {{variableName}} inside templates.

Prompted variables

| Variable | Source | Description & format example | Default | Required | | --------------------------- | ------ | ------------------------------------------------------------------------------------------- | ------------------------ | -------- | | repoSrc | prompt | Directory where the repository will be created. | cwd | yes | | repoName | prompt | Repository name provided by the user (string). | | yes | | repoDescription | prompt | Repository description provided by the user (string). | | no | | csp | prompt | Cloud provider selection. One of aws or azure. | azure | yes | | environments | prompt | List of environments to create (e.g., dev, prod, uat). | | yes | | prefix | prompt | Project prefix (short code, e.g., pay, id). Used for resource naming. | | yes | | azureLocation | prompt | Azure location (e.g., italynorth, northeurope, westeurope). Only if csp is azure. | italynorth | yes* | | domain | prompt | Project domain (e.g., payments, identity). | | yes | | envInstanceNumber | prompt | Instance number (e.g., 01, 02). Used for resource uniqueness. | 01 | no | | awsRegion | prompt | AWS region (e.g., eu-south-1). Only if csp is aws. | eu-south-1 | yes* | | awsAppName | prompt | AWS app name (e.g., my-app). Only if csp is aws. | | yes* | | tfStateResourceGroupName | prompt | Azure resource group for tfstate. Only if csp is azure. | dx-d-itn-terraform-rg-01 | yes* | | tfStateStorageAccountName | prompt | Azure storage account for tfstate. Only if csp is azure. | dxditntfst01 | yes* | | awsAccountId | prompt | AWS Account ID. Only if csp is aws. | | yes* | | costCenter | prompt | Cost Center for the project (string). Used for billing and tracking. | | yes | | managementTeam | prompt | Management Team for the project (string). Organizational team responsible for the project. | | yes | | businessUnit | prompt | Business Unit for the project (string). | | yes |

*Required only if the corresponding cloud provider is selected.

Automatically loaded variables

These variables are loaded automatically by custom actions and do not require user input. They have no defaults and are not required in prompts.

| Variable | Source | Description & format example | | ------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------- | | terraformVersion | custom action (GitHub fetch) | Terraform version used to populate .terraform-version. Full semver string, e.g. 1.5.7. | | githubTfProviderVersion | custom action (GitHub fetch) | Version used inside Terraform infra templates for the GitHub provider/module. | | awsTfProviderVersion | custom action (GitHub fetch) | AWS Terraform provider version, e.g. 5.34. | | tlsTfProviderVersion | custom action (GitHub fetch) | TLS Terraform provider version, e.g. 4.0. | | azurermTfProviderVersion | custom action (GitHub fetch) | AzureRM Terraform provider version, e.g. 3.80. | | azureadTfProviderVersion | custom action (GitHub fetch) | AzureAD Terraform provider version, e.g. 2.40. | | pagopaDxAwsTfProviderVersion | custom action (GitHub fetch) | PagoPA DX AWS Terraform provider version, e.g. 1.0. | | pagopaDxAzureTfProviderVersion | custom action (GitHub fetch) | PagoPA DX Azure Terraform provider version, e.g. 1.0. | | dxGithubEnvironmentBootstrapVersion | custom action (GitHub fetch) | Version/tag used by infra templates to bootstrap GitHub environment resources. | | dxAwsBootstrapperVersion | custom action (GitHub fetch) | AWS bootstrapper module version, e.g. 1.2. | | dxAwsCoreValuesExporterVersion | custom action (GitHub fetch) | AWS core values exporter module version, e.g. 1.2. | | dxAzureBootstrapperVersion | custom action (GitHub fetch) | Azure bootstrapper module version, e.g. 1.2. | | dxAzurermCoreValuesExporterVersion | custom action (GitHub fetch) | Azure core values exporter module version, e.g. 1.2. | | preCommitTerraformVersion | custom action (GitHub fetch) | Version used for the pre-commit-terraform hooks in the generated .pre-commit-config.yaml. |

Recommended usage

This package exports the generator function. To use it, you can create your own plopfile (plopfile.js) and register the generator.

  1. Install plop and the generator package in the consumer repository (plop must be provided by the consumer):
pnpm add -D plop
pnpm add @pagopa/monorepo-generator
  1. Example repository-level plopfile (JavaScript)
// plopfile.js
const scaffoldMonorepo = require("@pagopa/monorepo-generator");

module.exports = function (plop) {
  scaffoldMonorepo(plop);
};

Or TypeScript plopfile (plopfile.ts)

import scaffoldMonorepo from "@pagopa/monorepo-generator";

export default function (plop) {
  scaffoldMonorepo(plop);
}
  1. Run plop from your repository root to use the registered generator:
pnpm plop

Select the "monorepo" generator and follow prompts.

[!NOTE] This package declares plop as a peer dependency, so you will have to install plop in your project.