Skip to content

A Patternfly CLI used to for scaffolding, updating, and buildling.

License

Notifications You must be signed in to change notification settings

patternfly/patternfly-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patternfly CLI

Patternfly CLI is a command-line tool designed for scaffolding projects, performing code modifications, and running project-related tasks. It aims to streamline development workflows and improve productivity.

Features

  • Project Scaffolding: Quickly set up new projects with predefined templates.
  • Code Modifications: Automate repetitive code changes.
  • Task Runner: Execute project-related tasks efficiently.

Installation

To install the CLI globally, use npm:

npm install -g patternfly-cli

Usage

After installation, you can use the CLI by running:

patternfly-cli [command]

Available Commands

  • create: Create a new project from the available templates.
  • list: List all available templates (built-in and optional custom).
  • update: Update your project to a newer version.

Custom templates

You can add your own templates in addition to the built-in ones by passing a JSON file with the --template-file (or -t) option. Custom templates are merged with the built-in list; if a custom template has the same name as a built-in one, the custom definition is used.

Create with custom templates:

patternfly-cli create my-app --template-file ./my-templates.json

List templates including custom file:

patternfly-cli list --template-file ./my-templates.json

JSON format (array of template objects, same shape as the built-in templates):

[
  {
    "name": "my-template",
    "description": "My custom project template",
    "repo": "https://github.com/org/repo.git",
    "options": ["--single-branch", "--branch", "main"],
    "packageManager": "npm"
  }
]
  • name (required): Template identifier.
  • description (required): Short description shown in prompts and list.
  • repo (required): Git clone URL.
  • options (optional): Array of extra arguments for git clone (e.g. ["--single-branch", "--branch", "main"]).
  • packageManager (optional): npm, yarn, or pnpm; defaults to npm if omitted.

Development / Installation

Install Dependencies

npm install

Build

To build the project, run:

npm run build

Installing the cli

After building the cli you can install the cli globally by running the following command:

npm install -g

After that you can now execute the cli via patternfly-cli command in the terminal. We are currently in the process of moving this to npmjs once we this ready for v 1.0.0

About

A Patternfly CLI used to for scaffolding, updating, and buildling.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published