You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/documentation-site/patternfly-docs/content/developer-guides/patternfly-cli.md
+21-24Lines changed: 21 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,58 +6,55 @@ section: developer-guides
6
6
7
7
The [PatternFly CLI](https://github.com/patternfly/patternfly-cli) is a command-line tool for scaffolding projects, performing code modifications, and running project-related tasks. It aims to streamline development workflows and improve productivity. The published package is [`@patternfly/patternfly-cli` on npm](https://www.npmjs.com/package/@patternfly/patternfly-cli).
8
8
9
-
## Features
9
+
## What does the PatternFly CLI help with?
10
10
11
11
-**Project scaffolding:** Quickly set up new PatternFly based projects for development and prototyping via predefined templates.
12
12
-**Code modifications:** Automate repetitive code changes to help accelerate PatternFly version upgrades.
13
13
-**Task runner:** Execute project-related tasks efficiently, such as source code management and task running.
14
14
15
15
16
-
## How do I setup PatternFly CLI?
16
+
## How do I set up PatternFly CLI?
17
17
18
18
### Prerequisites
19
-
Prerequistes can be found below. For macOS, WSL, and Linux it is recommended that you use [install script](#install-script-macos-and-linux), it covers the items below (you may still need administrator access for system packages). Window based system you will need to install the following yourself before using the CLI:
19
+
There are a few key prerequisites to meet before using PatternFly CLI. For macOS, WSL, and Linux, we recommended using [install script](#install-script-macos-and-linux) to address the following prerequisites (you might still need administrator access for system packages). For a Windows-based system, you will need to install the following items manually:
20
20
21
-
-**[Node.js and npm](https://nodejs.org/)** (supported versions**20–24**) — also see [npm](https://www.npmjs.com/).
22
-
-**[Corepack](https://nodejs.org/api/corepack.html)**— included with Node.js; enable with `corepack enable` after installing npm.
21
+
-**[Node.js](https://nodejs.org/)** (Supported versions: 20–24) and **[npm](https://www.npmjs.com/)**
22
+
-**[Corepack](https://nodejs.org/api/corepack.html)**(Included with Node.js and enabled via `corepack enable` after installing npm)
23
23
-**[GitHub CLI](https://cli.github.com/)** (`gh`)
24
24
25
25
## Installation
26
26
27
27
### Install script (macOS and Linux)
28
28
29
-
You can pipe the repository install script into `bash`. It installs Node.js with [nvm](https://github.com/nvm-sh/nvm) when `node` is not available, enables Corepack, installs GitHub CLI when it is missing, then installs the CLI globally from npm:
29
+
You can pipe the repository install script into `bash`. This installs Node.js with [nvm](https://github.com/nvm-sh/nvm) when `node` is not available, enables Corepack, installs GitHub CLI when it is missing, and installs the CLI globally from npm:
The script may prompt for`sudo` when your system package manager installs GitHub CLI.
35
+
The script might prompt you to include`sudo` when your system package manager installs GitHub CLI.
36
36
37
-
### Windows Install
37
+
### Windows
38
38
39
39
After installing the [prerequisites](#prerequisites) on your machine, install the published package globally:
40
40
41
41
```sh
42
42
npm install -g @patternfly/patternfly-cli
43
43
```
44
44
45
-
## Usage
45
+
## How do I use PatternFly CLI?
46
46
47
-
After installation, you can verify the latest version of the CLI has been installed by running the following in the termianl:
47
+
After installation, you can verify the latest version of the CLI has been installed by running the following terminal command:
48
48
49
-
```sh
50
-
patternfly-cli -v
51
-
```
52
49
53
50
### Available CLI commands
54
-
51
+
Once the PatternFly CLI is installed, you can run the following commands via `patternfly-cli [command]`:
55
52
| Command | Usage |
56
53
| --- | --- |
57
54
|`create`| Create a new project from the available templates. |
58
55
|`list`| List all available templates (built-in and optional custom). |
59
56
|`update`| Update your project to a newer version. |
60
-
|`cli-upgrade`| Upgrade the globally installed CLI to the latest npm release. It runs `npm install -g @patternfly/patternfly-cli@latest`; use your package manager’s equivalent if you did not install with npm. |
57
+
|`cli-upgrade`| Upgrade the globally installed CLI to the latest npm release. It runs `npm install -g @patternfly/patternfly-cli@latest`—use your package manager’s equivalent if you did not install with npm. |
61
58
|`init`| Initialize a git repository and optionally create a GitHub repository. |
62
59
|`save`| Commit and push changes to the current branch. |
63
60
|`load`| Pull the latest updates from GitHub. |
@@ -67,21 +64,21 @@ For the most up-to-date flags and behavior guidance, refer to [PatternFly CLI RE
67
64
68
65
### Custom templates
69
66
70
-
You can add your own templates in addition to the built-in ones by passing a JSON file with `--template-file` (or `-t`). 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.
67
+
In addition to the built-in templates, you can add your own templates by passing a JSON file with `--template-file` (or `-t`). Custom templates are merged with the built-in list—if a custom template has the same `name` as a built-in template, the custom definition is used.
0 commit comments