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

create-app-page

v2.1.0

Published

Create a new Next JS 15 app router app page and optionally supporting folders and files.

Readme

create-app-page

Description

This command line tool will create a new NextJS app router page in the current directory. In addition, it will optionally create additional files and folders based on the user's input. There are:

  • A Next JS route layout file
  • A components folder1
  • A handlers folder1
  • A hooks folder1
  • A utilities folder1.
  • An API route folder1,4
  • A Drizzle ORM schema file2,3

Notes:

  1. For each of these folders, an empty index.ts will be create in addition to an index.ts folder next to the page.ts file.
  2. The existing index.ts file will be updated to add the new schema.
  3. Zod schema and types will be generated for the new schema.
  4. The existing top-level route handler will be updated to add the new route.

Usage

To create a new page in the current directory, run the following command. The tool will prompt you for the information needed to complete the process that is not provided as command line arguments and options.

npx create-app-page

Environment variables

The tool uses not environment variables.

Command line arguments

This tool uses the following command line arguments:

| Argument | Description | |----------|-------------| | pageName | The name of the new page. |

Command line options

This tool uses the following command line options:

| Option | Description | |--------|-------------| | -d --defaults | Use default values for all prompts. | | -f --force | Overwrite existing files without prompting. | | -h --help | Display help for command. | | -q --quiet | Suppress all output other than warning and errors. | | -y --yes | Skip confirmation prompt. | | -V --version | Display version number. |

Error codes

The following codes will be displayed if an error occurs: | Code | Description | |------|-------------| | 0 | Use chose to abort the process. | | 1 | The path provided for the new page already exists. | | 2 | An error occurred creating a file or a folder. |

License

GNU General Public License (GPL)

This software is licensed under the GNU General Public License (GPL). The GPL allows users to freely use, copy, modify, and distribute this software under the following conditions:

  • Any modified versions of this software must also be licensed under the GPL.

  • The original or modified software cannot be sold or used for profit.

  • The source code must be made available when distributing the software.

For more detailed information, please visit the official GNU GPL website.

Contributing

To contribute, contact RamonaSteve.

Change Log

Release 2.1.0

  • Corrected prompting for page name when not provided as command line argument.
  • Updated process exit codes.
  • Updated this document.

Release 2.0.0

  • Major refactor of codebase.
  • Added command line arguments and options.
  • Add help information.
  • Updated this document.

Release 1.0.0

  • Initial release

Know Issues

There are no known issues at this time.

Planned Enhancements

  1. Add option to update AuthItems for the parent route.
  2. Add option to update navigation bar items for the parent route.