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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dworac/cli

v2.10.2

Published

Collection of dworac's CLI tools.

Downloads

21

Readme

@dworac/cli

npm npm GitHub issues GitHub

This is dworac's CLI tool. It is used to create new projects from several templates and more....

Usage

This is a command-line tool that generates a new project from a template. You can use it with npx or install it globally.

npx @dworac/cli

Help

In order to get help, you can use the --help flag.

npx @dworac/cli --help

Project generator

In order to obtain a list of available templates, you can use the list command.

npx @dworac/cli templates

To create a new project, run the following command:

npx @dworac/cli create <name> <template>

Options

  • -d, --description : The description of the new project.
  • -r, --repository : The git repository of the new project.
  • -k, --keywords : The keywords of the new project.
  • -a, --author : The author of the new project.

Examples

Generate a new project without options:

npx @dworac/cli create my-project typescript-lib-node

Generate a new project with a description, git repository, keywords, and author:

npx @dworac/cli create my-project typescript-lib-node -d "My project description" -r "https://github.com/dworac/cli" -k "cli template generator" -a "dworac <[email protected]>"

Developping

In order to develop this project, you can use the following commands:

Install dependencies:

yarn

Run

yarn start:dev

In order to test the project locally you must build it and link it globally, the following command does both things:

yarn publish:local

To test it run the following command:

npx @dworac/cli

To unlink the project, you can use the following command:

yarn publish:local:unlink

Contributing

If you have any suggestions or improvements, please feel free to create a pull request or submit an issue.

Add a template

Adding a new template is very simple:

  • Create a new folder with the name of the template in the templates folder.
  • Add a template.json file to your template folder
  • If you have any .gitignore files rename them to gitignore

template.json

template.json file should be in each one of the templates folder and it should look something like this.

{
  "name": "typescript-api",
  "description": "This template is used to create an express server with typescript, grahpql, typeorm, and postgres.",
  "commands": [
    {
      "name": "yarn",
      "description": "Install dependencies"
    }
  ],
  "secrets": [
    {
      "name": "DIGITALOCEAN_APP_NAME",
      "description": "Name of the digital ocean app the project will be deployed to."
    }
  ]
}

This file helps document the template for the cli's output. All of the properties are optional but recommended:

interface TemplateInfo {
    name: string;
    description?: string;
    commands?: {
        name: string;
        description: string;
    }[]; // Recommended commands, starter commands.
    secrets?: {
        name: string;
        description: string;
    }[]; // Secrets needed for github workflows to work.
}

License

This project is licensed under the MIT license. Please see the LICENSE file for more information.