JSPM

@nestauth/cli

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q12845F
  • License MIT

CLI for managing NestAuth utilities

Package Exports

  • @nestauth/cli
  • @nestauth/cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nestauth/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NestAuth CLI

This module is part of NestAuth, a powerful authentication system for NestJS.

A standalone CLI utility for managing email templates and generating RSA key pairs for use with MFA TOTP or other cryptographic operations. This tool simplifies setup and maintenance tasks, making it easier to integrate these functionalities into your application.

Installation

You can use the CLI directly with npx (recommended) or install it globally for frequent use:

# Using npx
npx @nestauth/cli [command]

# Global installation
npm install -g @nestauth/cli

After a global installation, you can run:

nestauth [command]

Available Commands

Templates

Copies the default email templates provided by the module to a specified directory. This makes it easy to customize email templates for your application's requirements.

npx @nestauth/cli templates [destination]

Options

  • destination (optional): The path to the directory where the templates will be copied. If not specified, the current working directory is used.

Example

npx @nestauth/cli templates email-templates

RSA Keys

Generates RSA key pairs (public and private) for use with MFA TOTP or other cryptographic operations.

npx @nestauth/cli rsa-keys <passphrase> [options]

Options

  • passphrase (required): The passphrase used to secure the private key.
  • -d, --destination <destination>: The path to the directory where the keys will be saved. Defaults to the current working directory.
  • -l, --length <length>: Specifies the length of the RSA key. Defaults to 2048.

Example

npx @nestauth/cli rsa-keys mySecurePassphrase -d keys -l 4096

Notes

  • The destination directory for templates or RSA keys must exist before running the commands; it will not be created automatically.
  • Make sure to store your private key securely, as it is critical for maintaining the security of your application.