1.0.0 • Published 4 months ago

nextaim-frontend-cli v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

create-my-app

A flexible CLI tool for bootstrapping new applications with customizable options.

Features

  • Multiple framework support (NextJS with App Router, React)
  • TypeScript and JavaScript support
  • Integrated CSS frameworks (Tailwind, Bootstrap)
  • shadcn UI components integration
  • Custom template support
  • GitHub repository bootstrapping
  • Intelligent defaults with interactive configuration

Installation

npm install -g create-my-app

Usage

Create a new app with interactive prompts:

create-my-app my-project

Command Line Options

create-my-app project-name

Options:

  • --nextjs: Use NextJS with app router (default)
  • --react: Use React
  • --typescript: Use TypeScript (default)
  • --javascript: Use JavaScript
  • --tailwind: Include Tailwind CSS
  • --shadcn: Include shadcn UI components
  • --bootstrap: Include Bootstrap CSS
  • --sass: Include Sass support
  • --no-install: Skip package installation
  • --yes: Skip prompts and use defaults
  • --template <template-name>: Specify a template to use
  • --github <repo-url>: Bootstrap from GitHub repository

Examples

Create a NextJS app with TypeScript and Tailwind CSS:

create-my-app my-nextjs-app --nextjs --typescript --tailwind

Create a React app with JavaScript:

create-my-app my-react-app --react --javascript

Use a custom template:

create-my-app my-custom-app --template my-template

Bootstrap from a GitHub repository:

create-my-app my-github-app --github username/repository

Bootstrap from a specific branch of a GitHub repository:

create-my-app my-branch-app --github username/repository#branch-name

Bootstrapping from GitHub

You can bootstrap your project from any GitHub repository by using the --github flag followed by the repository URL.

To specify a particular branch:

create-my-app my-project --github username/repository#branch-name

Custom Templates

You can create and use custom templates to bootstrap your projects.

Using a Custom Template

create-my-app my-project --template path/to/template

Creating a Custom Template

A custom template should have a structure that mirrors what you want in your final project. You can include a template.config.js file to specify additional dependencies and setup hooks.

Example template.config.js:

module.exports = { dependencies: { "some-package": "^1.0.0" }, setup: async (targetDir, preferences) => { // Perform custom setup tasks } }

Local Development

To test this CLI locally:

  1. Clone the repository
  2. Install dependencies with npm install
  3. Run npm link to create a global symlink
  4. Run create-my-app my-test-project to test

License

MIT