CLI tool for scaffolding NestJS libraries from templates
⚠️ This project is currently under active development. APIs may change without notice.
# Using pnpm (recommended)
pnpm add -g @shinijs/cli
# Using npm
npm install -g @shinijs/cli
# Using yarn
yarn global add @shinijs/cli# Interactive mode (recommended)
shinijs create
# With project name
shinijs create my-library
# With template specification
shinijs create my-library --template nestjs-lib
# With specific template version/branch
shinijs create my-library --template nestjs-lib --version master
# Offline mode (use cached templates only)
shinijs create my-library --offlineshinijs interactive
# or
shinijs iCreate a new project from a template.
Options:
-t, --template <name>- Template name to use (default:nestjs-lib)-v, --version <version>- Template version/tag/branch (default:master)--offline- Use cached templates only
Examples:
# Create with default template
shinijs create my-library
# Create with specific template
shinijs create my-library --template nestjs-lib
# Create with specific version
shinijs create my-library --template nestjs-lib --version v1.0.0Start interactive mode for guided project creation.
Alias: i
Templates are fetched from the shinijs/templates GitHub repository.
nestjs-lib- Template for creating NestJS libraries with testing, CI/CD, and documentation
Templates are cached locally in ~/.shinijs/templates/ for 24 hours. After this period, templates are automatically refreshed from GitHub.
To force offline mode and use cached templates only, use the --offline flag.
When creating a project, you'll be prompted for:
- Project Name - Name of your project (must be a valid npm package name)
- Description - Project description
- Author - Author name
- Include Docs - Whether to include VitePress documentation (default:
true) - Include CI/CD - Whether to include GitHub Actions workflows (default:
true)
The following variables are automatically generated:
projectName- Your project namemoduleName- PascalCase version of your project name (e.g.,my-library→MyLibrary)
Templates support Handlebars syntax for variable substitution:
{{projectName}}- Project name{{moduleName}}- Module name in PascalCase{{description}}- Project description{{author}}- Author name{{#if docs}}...{{/if}}- Conditional sections
# Install dependencies
pnpm install
# Build the project
pnpm build
# Run in development mode
pnpm dev
# Run tests
pnpm test
# Lint code
pnpm lint
# Format code
pnpm formatContributions are welcome! Please read our Contributing Guide before submitting pull requests.
MIT © Shironex