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 🙏

© 2025 – Pkg Stats / Ryan Hefner

projen-cdk-init

v0.0.2

Published

Scaffold a Projen CDK construct project with npm registry on AWS CodeArtifact

Downloads

7

Readme

projen-cdk-init

Scaffold a Projen-based AWS CDK construct library, pre-wired to use an npm registry hosted in AWS CodeArtifact.

Prerequisites

  • Node.js >= 18
  • npm or yarn
  • Git (recommended)
  • Access to an AWS account if you plan to publish to CodeArtifact

Install / Run

No installation required. Use npx, which runs the CLI directly from npm:

npx projen-cdk-init with-registry-aws-codeartifact --package-name my-construct

An alternate CLI name is also available:

npx cdk-construct-init with-registry-aws-codeartifact --package-name my-construct

Usage

cdk-construct-init with-registry-aws-codeartifact --package-name <name> [options]

Options:
	--package-name        Package name (required)
	--description         Package description
	--author-name         Author name (default: <AUTHOR_NAME>)
	--author-email        Author email (default: <AUTHOR_EMAIL>)
	--repository-url      Repository URL

What the generator does

When you run the command, it will:

  • Create a new folder named after your package.
  • Run projen new awscdk-construct to scaffold a TypeScript library.
  • Configure npm publishing to an AWS CodeArtifact registry and add GitHub OIDC authentication snippets to .projenrc.ts.
  • Synthesize the project (npx projen), then run install/build/tests.

The generator patches the new project’s .projenrc.ts to include a CodeArtifact role similar to:

arn:aws:iam::<AWS_ACCOUNT_ID>:role/github-repo-<ORG>-<packageName>

and sets the npm registry URL using a value you provide via defaults (see Configuration) or that you later edit in the generated project.

Configuration

This CLI ships with placeholders so it can be adapted to your environment:

  • <AUTHOR_NAME>, <AUTHOR_EMAIL>, <AUTHOR_ORGANIZATION>
  • <NPM_REGISTRY_URL>
  • <AWS_ACCOUNT_ID>
  • (used for the package scope @/your-package)
  • (used in the IAM role name in .projenrc.ts)

You can customize these defaults in this repository’s src/construct.ts before publishing your own copy of the CLI. Alternatively, after your project is generated, open the new project’s .projenrc.ts and adjust the CodeArtifact options, repository metadata, and role to match your setup.

Examples

Generate a construct library with description and repo URL:

npx projen-cdk-init with-registry-aws-codeartifact \
	--package-name monitoring-constructs \
	--description "Reusable pipeline constructs" \
	--repository-url https://github.com/<ORG>/<REPO>

Developing this CLI

  • Install deps and build:
    • npx projen build
  • Run locally (after build):
    • npx ./bin/cdk-construct-init with-registry-aws-codeartifact --package-name demo-lib
  • Tests:
    • npm test

License

Apache-2.0