Skip to content

Commit 1929ac0

Browse files
committed
docs(readme): Improve the readme
1 parent af07e11 commit 1929ac0

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

README.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A command-line for the [PHP-Prefixer](https://php-prefixer.com) service.
88

99
**Blog post announcement**: [New PHP-Prefixer CLI: Prefix from the Terminal](https://blog.php-prefixer.com/2021/06/12/new-php-prefixer-cli-prefix-from-the-terminal/)
1010

11-
The [PHP-Prefixer](https://php-prefixer.com) service has a command line to use the service locally and process the project source code from your workstation.
11+
The [PHP-Prefixer](https://php-prefixer.com) service has a command-line (CLI) to use the service locally and process the project source code from your workstation.
1212

1313
The command calls the **PHP-Prefixer** service using the [REST API](https://php-prefixer.com/docs/rest-api-reference/) to submit a project source code, apply the prefixes, wait and download the results.
1414

@@ -44,38 +44,42 @@ class Carbon extends DateTime
4444
...
4545
```
4646

47-
## Installation
47+
## How to install the CLI?
4848

49-
### PHAR
49+
You can install the CLI using two ways:
50+
51+
### 1. How to install the PHAR CLI
5052

5153
The preferred installation method is with the **PHP Prefixer CLI PHAR**. You can download the latest PHAR from the most recent [Github Releases](https://github.com/PHP-Prefixer/php-prefixer-cli/releases). After downloading it, copy the file into a directory on your local path.
5254

53-
### Composer
55+
### 2. Install via Composer
5456

5557
Alternatively, you can install **PHP-Prefixer CLI** globally with Composer:
5658

5759
```sh
5860
composer global require php-prefixer/php-prefixer-cli
5961
```
6062

63+
The source code is available here: <https://github.com/PHP-Prefixer/php-prefixer-cli>
64+
6165
## Usage
6266

63-
To use the command line, you must create an account on [PHP-Prefixer](https://php-prefixer.com/) and prepare your projects with the prefix definition in the `composer.json` schema.
67+
To use the CLI, you must create an account on [PHP-Prefixer](https://php-prefixer.com/) and prepare your projects with the prefix definition in the `composer.json` schema.
6468

65-
Before using the command line, we recommend checking the documentation and guides here: <https://php-prefixer.com/docs/>
69+
Before using the command-line, we recommend checking the documentation and guides here: <https://php-prefixer.com/docs/>
6670

67-
The command line requires four parameters, and it can receive an additional parameter for GitHub integration:
71+
The CLI requires four parameters to function, and it can receive an additional parameter for GitHub integration:
6872

6973
Parameter | Description
7074
---------|----------
71-
source-directory * | The project source directory.
72-
target-directory *| The target directory where the results are stored.
73-
personal-access-token* | The personal access token, generated on [PHP-Prefixer](https://php-prefixer.com/)/ Settings.
74-
project-id * | The identification of the configured project on [PHP-Prefixer](https://php-prefixer.com/)/ Projects.
75-
--github-access-token | An optional GitHub token to access ´composer.json´ dependencies that are managed in private repositories.
75+
source-directory * | The project source directory
76+
target-directory *| The target directory where the results are stored
77+
personal-access-token* | The personal access token, generated on [PHP-Prefixer](https://php-prefixer.com/) Settings
78+
project-id * | The identification of the configured project on [PHP-Prefixer](https://php-prefixer.com/) Projects
79+
--github-access-token | An optional GitHub token to access ´composer.json´ dependencies that are managed in private repositories
7680

7781
```bash
78-
# Sample command line
82+
# Sample command-line
7983
php-prefixer-cli prefix \
8084
\
8185
/sample/acme_project \
@@ -91,7 +95,7 @@ php-prefixer-cli prefix \
9195

9296
### Environment Variables
9397

94-
The command line supports the definition of the parameters as environment variables in a project `.env` file.
98+
The CLI supports the definition of the parameters as environment variables in a project `.env` file.
9599

96100
```yml
97101
# PHP Prefixer CLI - Sample .env
@@ -104,10 +108,10 @@ SOURCE_DIRECTORY="/sample/acme_project"
104108
# Target Directory: The target directory where the results are stored
105109
TARGET_DIRECTORY="/output/prefixed_project"
106110

107-
# Personal Access Token: The personal access token, generated on PHP-Prefixer/ Settings.
111+
# Personal Access Token: The personal access token, generated on PHP-Prefixer Settings
108112
PERSONAL_ACCESS_TOKEN="789|1234567890123456789012345678901234567890"
109113

110-
# Project ID: The identification of the configured project on PHP-Prefixer/ Projects.
114+
# Project ID: The identification of the configured project on PHP-Prefixer Projects
111115
PROJECT_ID="123456"
112116

113117
# GitHub Access Token: An optional GitHub token to access composer.json dependencies that are managed in private repositories.
@@ -118,53 +122,55 @@ GITHUB_ACCESS_TOKEN="1234567890123456789012345678901234567890"
118122

119123
- [PHP-Prefixer Documentation](https://php-prefixer.com/docs)
120124
- [PHP Prefixer CLI](https://php-prefixer.com/docs/command-line)
121-
- [REST API Referece](https://php-prefixer.com/docs/rest-api-reference/)
125+
- [REST API Reference](https://php-prefixer.com/docs/rest-api-reference/)
122126

123-
## Command Line Development
127+
## Command-Line Development
124128

125-
Clone the project:
129+
Step 1: Clone the project:
126130

127131
```bash
128132
git clone https://github.com/php-prefixer/php-prefixer-cli
129133
```
130134

131-
Go to the project directory:
135+
Step 2: Go to the project directory:
132136

133137
```bash
134138
cd php-prefixer-cli
135139
```
136140

137-
Install dependencies:
141+
Step 3: Install dependencies:
138142

139143
```bash
140144
composer update
141145
```
142146

143-
Build the PHAR:
147+
Step 4: Build the PHAR:
144148

145149
```bash
146150
php-prefixer-cli app:build
147151
```
148152

149-
To run tests, run the following command:
153+
Step 5: To run tests, execute the following command:
150154

151155
```bash
152156
phpunit
153157
```
154158

155-
## TO-DO
159+
## Roadmap / Ideas
160+
161+
This roadmap is subject to change and should only be used as a general guideline regarding future releases. As long as a version, feature or application is not yet released, the dates are estimated and could be altered.
156162

157163
- Parameter to exclude directories from ZIP, `--exclude`
158164

159165
## Contributing
160166

161-
Contributions are always welcome!
167+
The current CLI is a starting point to prefix PHP code. If you want to improve the current commmand-line, contributions are always welcome!
162168

163-
See `CONTRIBUTING.md` for ways to get started.
169+
See [CONTRIBUTING.md](https://github.com/PHP-Prefixer/php-prefixer-cli/blob/main/CONTRIBUTING.md) for ways to get started.
164170

165171
## Security
166172

167-
If you discover a security vulnerability within this package, please send an email to Anibal Sanchez at team@php-prefixer.com. All security vulnerabilities will be promptly addressed.
173+
If you discover a security vulnerability within this package, please email to Anibal Sanchez at team@php-prefixer.com. We address all security vulnerabilities promptly.
168174

169175
## License
170176

0 commit comments

Comments
 (0)