Skip to content

CLI Commands

Nolly edited this page Jan 24, 2025 · 5 revisions

πŸ’» CLI Commands

Learn about the commands available in Create Nolly CLI to streamline your development process. πŸš€


πŸ› οΈ Core Commands

Command Alias Description
create-nolly new N/A Creates a new project interactively.
create-nolly list N/A Displays all available templates.
create-nolly --help -h Shows help information about the CLI commands and options.
create-nolly --version -v Displays the current version of the CLI.
create-nolly update N/A Updates the CLI directly, if an update is available.

πŸ“‹ Detailed Descriptions

new

create-nolly new <project-name> [--type <template>] [--package-manager <manager>] [--no-git] [--no-install]

Creates a new project interactively. If any required option is missing (e.g., <project-name>, --type), the CLI will prompt you for input.

  • Arguments:
    • <project-name>: Name of your project.
    • --type: (Optional) Specify the project type. Options:
      • frontend: Frontend template (e.g., Vite + React + TypeScript + SASS).
      • backend: Backend template (e.g., Express + TypeScript).
      • fullstack: Fullstack template (e.g., both frontend and backend).
    • --package-manager: (Optional) Choose a package manager. Options:
      • npm, yarn, or pnpm.
    • --no-git: (Optional) Skip initializing a Git repository.
    • --no-install: (Optional) Skip installing dependencies after creating the project.

Example:

create-nolly new my-app --type frontend --package-manager yarn --no-git

Workflow:

  1. Interactive Input:
    • Prompts for project name, template type, or package manager if not provided.
    • Ensures input validity (e.g., valid project name, supported package manager).
  2. Project Directory:
    • Creates the project folder based on the specified name.
    • Copies files from the chosen template into the folder.
    • Adds a configuration file (.nollyrc.json) to store project metadata.
  3. Dependencies:
    • Installs dependencies unless --no-install is specified.
  4. Git Initialization:
    • Initializes a Git repository and creates a .gitignore unless --no-git is specified.

list

create-nolly list

Displays all available templates with descriptions.

Example Output:

🌟 Available Templates:

⚑ frontend   - Frontend (Vite + React + TypeScript + SASS)
πŸš€ backend    - Backend (Express + TypeScript)
🌈 fullstack  - Fullstack (Frontend + Backend)

--help or -h

create-nolly --help

Displays help information, including usage and available commands.

Example:

🌟 Create Nolly CLI

Usage:
  create-nolly [options]

Options:
  --help, -h    Show this help message
  --version, -v Show the CLI version
  new           Create a new project
  list          List all available templates
  update        Update the CLI to the latest version

Links:
  GitHub:    https://github.com/thenolle
  npm:       https://npmjs.com/~nolly-cafe

--version or -v

create-nolly --version

Displays the current version of the CLI.

Example:

🌟 Create Nolly CLI
Version: 0.1.0

update

create-nolly update

Checks if a new version of the CLI is available. If an update is available, it offers to install the latest version automatically.

Example:

create-nolly update

Output (if an update is available):

⚠️ Update available: 1.1.0 (current: 1.0.0). Do you want to update now?
πŸš€ Updating to version 1.1.0 using npm...
βœ… Successfully updated to version 1.1.0.

πŸ“Œ Notes

  • Use the --type flag with the new command for quicker project creation.
  • Supported package managers for --package-manager include npm, yarn, and pnpm.
  • Ensure Node.js v18+ is installed for the CLI to function correctly.

Thank you for using Create Nolly CLI! ❀️
For further details, visit the Getting Started or Templates pages.