Skip to content

Commit b2282f6

Browse files
authored
Merge pull request #20 from patternfly/doctor-update
feat: Added doctor command to test if all requirements are install.
2 parents 3a57c38 + 1e1401d commit b2282f6

File tree

4 files changed

+641
-0
lines changed

4 files changed

+641
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,43 @@ patternfly-cli [command]
3434

3535
### Available Commands
3636

37+
- **`doctor`**: Check if all requirements are installed and optionally fix them.
3738
- **`create`**: Create a new project from the available templates.
3839
- **`list`**: List all available templates (built-in and optional custom).
3940
- **`update`**: Update your project to a newer version.
41+
- **`init`**: Initialize a git repository and optionally create a GitHub repository.
42+
- **`save`**: Commit and push changes to the current branch.
43+
- **`load`**: Pull the latest updates from GitHub.
44+
- **`deploy`**: Build and deploy your app to GitHub Pages.
45+
46+
### Doctor Command
47+
48+
The `doctor` command checks if all requirements are met to use Patternfly CLI:
49+
50+
```sh
51+
patternfly-cli doctor
52+
```
53+
54+
This will check for:
55+
- Node.js version >= 20
56+
- Corepack enabled
57+
- GitHub CLI installed
58+
59+
To automatically fix any missing requirements, use the `--fix` flag:
60+
61+
```sh
62+
patternfly-cli doctor --fix
63+
```
64+
65+
The `--fix` flag will:
66+
- Enable corepack if it's not already enabled
67+
- Install GitHub CLI using the appropriate package manager for your OS:
68+
- macOS: Homebrew (`brew install gh`)
69+
- Linux (Debian/Ubuntu): apt (`sudo apt install gh`)
70+
- Linux (Fedora/RHEL): dnf (`sudo dnf install gh`)
71+
- Windows: winget (`winget install --id GitHub.cli`)
72+
73+
**Important Note about Node.js:** The `doctor` command **cannot** automatically install or update Node.js. If your Node.js version is below 20 or Node.js is not installed, you must manually download and install it from [https://nodejs.org/](https://nodejs.org/). We recommend installing the **LTS (Long Term Support)** version.
4074

4175
### Custom templates
4276

0 commit comments

Comments
 (0)