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

@weconjs/cli

v1.3.2

Published

Wecon Framework CLI - Create and manage Wecon applications

Readme

@weconjs/cli

Command-line interface for the Wecon framework.

npm version License: MIT

Table of Contents

Installation

npm install -g @weconjs/cli
# or use via npx
npx @weconjs/cli <command>

Commands

wecon create <name>

Scaffold a new Wecon project with @weconjs/core integration.

wecon create my-api
wecon create my-api --no-install  # Skip dependency installation
wecon create my-api --no-git      # Skip git initialization

Options:

| Flag | Description | |------|-------------| | --git | Initialize git repository (default: true) | | --no-install | Skip running npm install |


wecon dev

Start the development server with hot reload.

wecon dev                 # Default configuration
wecon dev --port 4000     # Custom port
wecon dev --mode staging  # Use staging mode configuration

Options:

| Flag | Description | |------|-------------| | --port <number> | Override the configured port | | --mode <string> | Configuration mode (development, staging, production) |


wecon start

Start the production server.

wecon start                # Uses production mode
wecon start --port 8080    # Custom port override

wecon build

Compile TypeScript and prepare for production deployment.

wecon build                # Build to dist/
wecon build --mode staging # Build with staging configuration

Output:

  • Compiled JavaScript in dist/
  • Copied public/ assets
  • Environment file copied

wecon generate module <name>

Generate a new module with standard structure.

wecon generate module products        # Basic module
wecon g module products --crud        # Include CRUD controller

Options:

| Flag | Description | |------|-------------| | --crud | Generate CRUD controller, service, and model |


Project Structure

Running wecon create my-api generates the following structure:

my-api/
├── src/
│   ├── main.ts                    # Application entry point
│   ├── bootstrap.ts               # Wecon instance and route configuration
│   └── modules/
│       ├── index.ts               # Module registry
│       └── users/                 # Example module
│           ├── users.module.ts    # Module definition (uses defineModule)
│           ├── controllers/
│           │   └── user.controller.ts
│           ├── services/
│           │   └── user.service.ts
│           ├── models/
│           │   └── user.model.ts
│           └── i18n/
│               └── en.translation.json
├── wecon.config.ts                # Framework configuration (uses defineConfig)
├── tsconfig.json                  # TypeScript configuration (NodeNext)
├── package.json                   # Dependencies and scripts
├── .env.development               # Development environment variables
├── .env.production.example        # Production environment template
├── .gitignore
└── README.md

Key Files

| File | Purpose | |------|---------| | wecon.config.ts | Framework configuration using defineConfig() with mode-based settings | | src/main.ts | Entry point using createWecon() for application bootstrap | | src/bootstrap.ts | Wecon instance, routes, and RBAC configuration | | src/modules/index.ts | Module registry for auto-loading |

Generated Dependencies

| Package | Purpose | |---------|---------| | @weconjs/core | Framework utilities (config, modules, server factory) | | @weconjs/lib | Routing with RBAC, Postman generation | | express | Web framework (v5.x) | | mongoose | MongoDB ODM | | winston | Production logging | | tsx | TypeScript execution (dev) |


Quick Start

Create and Run a New Project

# Create project
wecon create my-api
cd my-api

# Install dependencies (if skipped during creation)
npm install

# Start development server
npm run dev

Generate Additional Modules

# Generate a products module with CRUD operations
wecon generate module products --crud

# Register in src/modules/index.ts
import productsModule from "./products/products.module.js";

export const modules = [
  usersModule,
  productsModule,
] as const;

Build for Production

# Build TypeScript
npm run build

# Start production server
npm start

Configuration Example

The generated wecon.config.ts:

import { defineConfig } from "@weconjs/core";

export default defineConfig({
  app: {
    name: "my-api",
    version: "1.0.0",
  },
  modes: {
    development: {
      port: 3000,
      database: {
        mongoose: {
          protocol: "mongodb",
          host: "localhost",
          port: 27017,
          database: "my-api",
        },
      },
      logging: { level: "debug" },
    },
    production: {
      port: 8080,
      database: {
        mongoose: {
          protocol: "mongodb+srv",
          host: process.env.DB_HOST,
          database: "my-api",
          username: process.env.DB_USER,
          password: process.env.DB_PASSWORD,
        },
      },
      logging: { level: "info", enableFile: true },
    },
  },
  modules: ["./src/modules/users"],
  features: {
    i18n: { enabled: true, defaultLocale: "en" },
  },
});

Testing

yarn test    # Run CLI tests
yarn build   # Build CLI package

Requirements

  • Node.js >= 18.0.0
  • npm or yarn

License

MIT © weconjs