Skip to content

feat: Added documenation for patternfly cli.#4981

Open
dlabaj wants to merge 6 commits intomainfrom
cli-updates
Open

feat: Added documenation for patternfly cli.#4981
dlabaj wants to merge 6 commits intomainfrom
cli-updates

Conversation

@dlabaj
Copy link
Copy Markdown
Contributor

@dlabaj dlabaj commented Mar 31, 2026

Added a page discussing patternfly cli.

Resolves issue # patternfly/patternfly-cli#18

@dlabaj dlabaj requested a review from edonehoo March 31, 2026 01:59
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 31, 2026

Deploying patternfly-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: dfdd52f
Status:🚫  Build failed.

View logs

@patternfly-build
Copy link
Copy Markdown
Collaborator

patternfly-build commented Mar 31, 2026

Preview: https://pf-org--pr-4981-site.surge.sh

Copy link
Copy Markdown
Collaborator

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some moving around and tweaking, lmk what you think!

---
id: PatternFly CLI
title: PatternFly CLI
section: get-started
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the get started section is more so intended for introductory/overview information. Are you set on including these docs there? Otherwise, we could move to /developer-guides or maybe at least nest it under get-started/develop (assuming this is a dev-focused tool)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for both designers and developers. At the moment it's geared towards designers more. I'm good with putting it under developer guides

import './get-started.css';
import { Alert } from '@patternfly/react-core';

The [PatternFly CLI](https://github.com/patternfly/patternfly-cli) is a command-line tool for scaffolding projects, applying code changes, and running common project tasks. It is published as [`@patternfly/patternfly-cli` on npm](https://www.npmjs.com/package/@patternfly/patternfly-cli).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The [PatternFly CLI](https://github.com/patternfly/patternfly-cli) is a command-line tool for scaffolding projects, applying code changes, and running common project tasks. It is published as [`@patternfly/patternfly-cli` on npm](https://www.npmjs.com/package/@patternfly/patternfly-cli).
The [PatternFly CLI](https://github.com/patternfly/patternfly-cli) is a command-line tool published on npm as [`@patternfly/patternfly-cli`](https://www.npmjs.com/package/@patternfly/patternfly-cli). With this tool, you can scaffold projects from built-in or custom templates, automate code updates for repetitive changes, and run workflows (including init, sync with GitHub, updates, and deploys to GitHub Pages).
The PatternFly CLI is developed in the open at [github.com/patternfly/patternfly-cli](https://github.com/patternfly/patternfly-cli), with release notes and tags published on [Releases page](https://github.com/patternfly/patternfly-cli/releases). To report issues or contribute to this tool, refer to the patternfly-cli repo for more instruction.

wdyt about this description, rather than the "what you can do" list? Just to build those list points into the narrative a little more

also moved up the bit about source and releases from the end of the page

Comment on lines +12 to +16
## What you can do

- **Scaffold projects** from built-in or custom templates.
- **Automate code updates** for repetitive changes.
- **Run workflows** such as init, sync with GitHub, updates, and deploys to GitHub Pages.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## What you can do
- **Scaffold projects** from built-in or custom templates.
- **Automate code updates** for repetitive changes.
- **Run workflows** such as init, sync with GitHub, updates, and deploys to GitHub Pages.

remove, if you're okay with folding into the intro description as I did


## Prerequisites

Before you install the CLI, set up:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Before you install the CLI, set up:
Before you install the PatternFly CLI, you must set up the following:

Comment on lines +22 to +24
1. **[Node.js and npm](https://nodejs.org/)** (supported versions **20–24**).
1. **[Corepack](https://nodejs.org/api/corepack.html)** — included with Node.js; enable it with `corepack enable` after installing Node.
1. **[GitHub CLI](https://cli.github.com/)** (`gh`) — required for commands that talk to GitHub.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. **[Node.js and npm](https://nodejs.org/)** (supported versions **20–24**).
1. **[Corepack](https://nodejs.org/api/corepack.html)** — included with Node.js; enable it with `corepack enable` after installing Node.
1. **[GitHub CLI](https://cli.github.com/)** (`gh`) — required for commands that talk to GitHub.
1. **[Node.js and npm](https://nodejs.org/)** (versions 20–24 currently supported).
1. **[Corepack](https://nodejs.org/api/corepack.html):** After Node is installed, enabled corepack via `corepack enable` on the command line.
1. **[GitHub CLI](https://cli.github.com/):** Required for commands that refer to GitHub (`gh`).

Is corepack enable a cli command?

| `load` | Pull the latest changes from GitHub. |
| `deploy` | Build and deploy the app to GitHub Pages. |

For the most up-to-date flags and behavior, see the [PatternFly CLI README](https://github.com/patternfly/patternfly-cli/blob/main/README.md) on GitHub.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For the most up-to-date flags and behavior, see the [PatternFly CLI README](https://github.com/patternfly/patternfly-cli/blob/main/README.md) on GitHub.
For the most up-to-date flags and behavior guidance, refer to the [PatternFly CLI README](https://github.com/patternfly/patternfly-cli/blob/main/README.md) on GitHub.


For the most up-to-date flags and behavior, see the [PatternFly CLI README](https://github.com/patternfly/patternfly-cli/blob/main/README.md) on GitHub.

## Custom templates
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Custom templates
### Custom templates

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

Each entry is an object with at least `name`, `description`, and `repo` (clone URL). Optional fields include `options` (extra `git clone` arguments) and `packageManager` (`npm`, `yarn`, or `pnpm`; default is `npm`). If a custom template uses the same `name` as a built-in one, the custom definition wins.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Each entry is an object with at least `name`, `description`, and `repo` (clone URL). Optional fields include `options` (extra `git clone` arguments) and `packageManager` (`npm`, `yarn`, or `pnpm`; default is `npm`). If a custom template uses the same `name` as a built-in one, the custom definition wins.
Each entry is an object with at least `name`, `description`, and `repo` (clone URL). Optional fields include `options` (extra `git clone` arguments) and `packageManager` (`npm` by default, or `yarn`/`pnpm`). If a custom template uses the same `name` as a built-in template, the custom definition is used.


## Custom templates

You can merge your own templates with the built-ins by passing a JSON file with `--template-file` (or `-t`):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can merge your own templates with the built-ins by passing a JSON file with `--template-file` (or `-t`):
You can merge your own templates with the built-in templates by passing a JSON file with `--template-file` (or `-t`):

Comment on lines +98 to +100
## Source and releases

The CLI is developed in the open at [github.com/patternfly/patternfly-cli](https://github.com/patternfly/patternfly-cli). Report issues or contribute there; release notes and tags are published on the repository’s [Releases](https://github.com/patternfly/patternfly-cli/releases) page.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Source and releases
The CLI is developed in the open at [github.com/patternfly/patternfly-cli](https://github.com/patternfly/patternfly-cli). Report issues or contribute there; release notes and tags are published on the repository’s [Releases](https://github.com/patternfly/patternfly-cli/releases) page.

moving up top?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need this? I can remove it since the guidance link will take you to the readme that will have this information in it. Removing for now, if you want me to add it back let me know.

@dlabaj dlabaj linked an issue Apr 2, 2026 that may be closed by this pull request
4 tasks
Copy link
Copy Markdown
Contributor Author

@dlabaj dlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edonehoo Had some feed back during usability testing. Can you take another look. Also left some responses to review comments since the structure of the doc changed some.

patternfly-cli [command]
```

| Command | Description |
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines +56 to +58
```sh
patternfly-cli [command]
```
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a change on how to verify that patternfly cli has been installed. Let me know if it makes since or if the new command should be removed.

- **Automate code updates** for repetitive changes.
- **Run workflows** such as init, sync with GitHub, updates, and deploys to GitHub Pages.

## Prerequisites
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines +98 to +100
## Source and releases

The CLI is developed in the open at [github.com/patternfly/patternfly-cli](https://github.com/patternfly/patternfly-cli). Report issues or contribute there; release notes and tags are published on the repository’s [Releases](https://github.com/patternfly/patternfly-cli/releases) page.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need this? I can remove it since the guidance link will take you to the readme that will have this information in it. Removing for now, if you want me to add it back let me know.

@dlabaj
Copy link
Copy Markdown
Contributor Author

dlabaj commented Apr 3, 2026

@edonehoo Latest updates can be found here: http://pf-cli.surge.sh/developer-guides/patternfly-cli

Copy link
Copy Markdown
Collaborator

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some more thoughts and suggestions - lmk what you think!

---
id: PatternFly CLI
title: PatternFly CLI
section: developer-guides
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
section: developer-guides
section: get-started

just saw your previous reply that this tool is actually more oriented towards designers right now. with that in mind (combined with the technicality of the doc itself), I think your initial suggestion of putting this in the get started section is okay for now actually

section: developer-guides
---

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).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did just want to mention that (as someone who has no knowledge of this tool) it's not extremely clear to me why this is a separate tool and why designers will be using this. When I read "streamline development workflows and improve productivity" it just sounds like a general dev accelerator tool, so it might be helpful to more explicitly state why we've created this new tool, why we're doing it now, and what's special about it. If I was a designer I wouldn't necessarily pick up that this tool was intended for me to use

that extra context could go up front or in the next ## Features section


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

## Features
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Features
## What does the PatternFly CLI help with?

Maybe some sort of question-formatted heading to help users move through the doc?

Comment on lines +11 to +13
- **Project scaffolding:** Quickly set up new PatternFly based projects for development, and prototyping. This is done using predefined templates.
- **Code modifications:** Automate repetitive code changes that helps users upgrade to the latest version of PatternFly.
- **Task runner:** Execute project-related tasks efficiently, such as source code management and task running.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Project scaffolding:** Quickly set up new PatternFly based projects for development, and prototyping. This is done using predefined templates.
- **Code modifications:** Automate repetitive code changes that helps users upgrade to the latest version of PatternFly.
- **Task runner:** Execute project-related tasks efficiently, such as source code management and task running.
- **Project scaffolding:** Quickly set up new PatternFly based projects for development and prototyping via predefined templates.
- **Code modifications:** Automate repetitive code changes to help accelerate PatternFly version upgrades.
- **Task runner:** Execute project-related tasks efficiently, such as source code management and task running.

would be good to clarify what "task running" means in the last bullet - right now the description doesn't add much extra context for what sort of tasks this might refer to

- **Task runner:** Execute project-related tasks efficiently, such as source code management and task running.


## How do I setup PatternFly CLI?
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## How do I setup PatternFly CLI?
## How do I set up PatternFly CLI?


### Custom templates

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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
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.


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.

**Create with custom templates:**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Create with custom templates:**
**Create a project based on custom templates:**

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

**List templates including custom file:**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**List templates including custom file:**
**List templates included in custom file:**

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

**JSON format** (array of template objects, same shape as the built-in templates):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**JSON format** (array of template objects, same shape as the built-in templates):
**JSON format** (Array of template objects, shown in the same shape as the built-in templates):

Comment on lines +98 to +102
- **`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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **`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.
- **`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` (such as `["--single-branch", "--branch", "main"]`)
- **`packageManager`** (optional): `npm`, `yarn`, or `pnpm`; defaults to `npm` if omitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alpha release usability testing.

3 participants