Skip to content

Commit 139bbe5

Browse files
dlabajedonehoo
andauthored
Apply suggestions from code review
Co-authored-by: Erin Donehoo <105813956+edonehoo@users.noreply.github.com>
1 parent d526d7f commit 139bbe5

1 file changed

Lines changed: 21 additions & 24 deletions

File tree

  • packages/documentation-site/patternfly-docs/content/developer-guides

packages/documentation-site/patternfly-docs/content/developer-guides/patternfly-cli.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,58 +6,55 @@ section: developer-guides
66

77
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).
88

9-
## Features
9+
## What does the PatternFly CLI help with?
1010

1111
- **Project scaffolding:** Quickly set up new PatternFly based projects for development and prototyping via predefined templates.
1212
- **Code modifications:** Automate repetitive code changes to help accelerate PatternFly version upgrades.
1313
- **Task runner:** Execute project-related tasks efficiently, such as source code management and task running.
1414

1515

16-
## How do I setup PatternFly CLI?
16+
## How do I set up PatternFly CLI?
1717

1818
### 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:
2020

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)
2323
- **[GitHub CLI](https://cli.github.com/)** (`gh`)
2424

2525
## Installation
2626

2727
### Install script (macOS and Linux)
2828

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:
3030

3131
```sh
3232
curl -fsSL https://raw.githubusercontent.com/patternfly/patternfly-cli/main/scripts/install.sh | bash
3333
```
3434

35-
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.
3636

37-
### Windows Install
37+
### Windows
3838

3939
After installing the [prerequisites](#prerequisites) on your machine, install the published package globally:
4040

4141
```sh
4242
npm install -g @patternfly/patternfly-cli
4343
```
4444

45-
## Usage
45+
## How do I use PatternFly CLI?
4646

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:
4848

49-
```sh
50-
patternfly-cli -v
51-
```
5249

5350
### Available CLI commands
54-
51+
Once the PatternFly CLI is installed, you can run the following commands via `patternfly-cli [command]`:
5552
| Command | Usage |
5653
| --- | --- |
5754
| `create` | Create a new project from the available templates. |
5855
| `list` | List all available templates (built-in and optional custom). |
5956
| `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`&mdash;use your package manager’s equivalent if you did not install with npm. |
6158
| `init` | Initialize a git repository and optionally create a GitHub repository. |
6259
| `save` | Commit and push changes to the current branch. |
6360
| `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
6764

6865
### Custom templates
6966

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&mdash;if a custom template has the same `name` as a built-in template, the custom definition is used.
7168

72-
**Create with custom templates:**
69+
**Create a project based on custom templates:**
7370

7471
```sh
7572
patternfly-cli create my-app --template-file ./my-templates.json
7673
```
7774

78-
**List templates including custom file:**
75+
**List templates included in custom file:**
7976

8077
```sh
8178
patternfly-cli list --template-file ./my-templates.json
8279
```
8380

84-
**JSON format** (array of template objects, same shape as the built-in templates):
81+
**JSON format** (Array of template objects, shown in the same shape as the built-in templates):
8582

8683
```json
8784
[
@@ -95,8 +92,8 @@ patternfly-cli list --template-file ./my-templates.json
9592
]
9693
```
9794

98-
- **`name`** (required): Template identifier.
99-
- **`description`** (required): Short description shown in prompts and `list`.
100-
- **`repo`** (required): Git clone URL.
101-
- **`options`** (optional): Array of extra arguments for `git clone` (e.g. `["--single-branch", "--branch", "main"]`).
102-
- **`packageManager`** (optional): `npm`, `yarn`, or `pnpm`; defaults to `npm` if omitted.
95+
- **`name`** (required): Template identifier
96+
- **`description`** (required): Short description shown in prompts and `list`
97+
- **`repo`** (required): Git clone URL
98+
- **`options`** (optional): Array of extra arguments for `git clone` (such as `["--single-branch", "--branch", "main"]`)
99+
- **`packageManager`** (optional): `npm`, `yarn`, or `pnpm`; defaults to `npm` if omitted

0 commit comments

Comments
 (0)