New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@nl-framework/cli

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nl-framework/cli

Command-line interface for generating Bun-native Nael Framework projects.

latest
npmnpm
Version
0.3.5
Version published
Maintainers
1
Created
Source

@nl-framework/cli

A Bun-native command-line interface for scaffolding Nael Framework services, feature modules, controllers, services, resolvers, models, and shareable libraries.

Usage

After building or installing the package, you can run the following commands:

Create a service

nl new my-service

Generates a new project in ./my-service with Bun scripts, TypeScript configuration, a starter HTTP controller, and a sample scheduler provider ready to customize. By default the CLI avoids overwriting existing files; use --force to permit regenerating files and --install to automatically run bun install.

Generate a feature module

nl g module users

Creates src/modules/users in the current workspace, including a UsersModule class, placeholder folders for controllers/services/resolvers/models, and an export entry in src/modules/index.ts. Use --force to regenerate an existing module directory.

Generate a service

nl g service users --module users

Generates src/modules/users/services/users.service.ts, wires the service into the module's providers array, and re-exports it via src/modules/users/index.ts. Use --module (or -m) to target the destination module.

Generate a controller

nl g controller users --module users

Creates src/modules/users/controllers/users.controller.ts, registers the controller with the module, and exports it. Adjust the generated routes and inject services as needed.

Generate a resolver

nl g resolver users --module users

Produces src/modules/users/resolvers/users.resolver.ts, adds the resolver to the module providers, and re-exports it from src/modules/users/index.ts. Extend the resolver with fields, queries, or mutations and inject services as required.

Generate a model

nl g model user --module users

Creates src/modules/users/models/user.model.ts with a default id field decorated for GraphQL, adds an index export in src/modules/users/models/index.ts, and leaves the module primed for further field additions.

Generate a shared library

nl g lib shared-utils

Creates ./libs/shared-utils with a TypeScript-ready build, README, and an initial feature module (exported via src/modules/index.ts). Pass --force to overwrite existing files if the directory is not empty.

Development

bun install
bun run --cwd packages/cli dev -- --help
bun run --cwd packages/cli build

The build command compiles TypeScript output to dist/ so the nl binary can be executed directly.

Keywords

cli

FAQs

Package last updated on 06 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts