Skip to content

Commit 8a4c442

Browse files
committed
update README.md
1 parent ec608e4 commit 8a4c442

File tree

1 file changed

+12
-132
lines changed

1 file changed

+12
-132
lines changed

README.md

Lines changed: 12 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
11
# DevNet Cli
2-
This dependency is a part of **DevNet Framework**, a command-line Interface tool, that used for creating and running DevNet applications.
2+
This dependency is a part of **DevNet Framework**, a command-line Interface tool, for managing DevNet projects.
33

44
## Requirements
5-
- PHP 7.4 or higher version from [php.net](https://www.php.net/)
6-
- Composer the dependency manager from [getcomposer.org](https://getcomposer.org/)
7-
- Git the distributed version control system from [git-scm.com](https://git-scm.com/)
5+
- [PHP](https://www.php.net/) version 7.4 to 8.1
6+
- [Composer](https://getcomposer.org/) version 2.0 or higher
87

98
## Installation
10-
> **Note :** This is an early release, not recommended for production use.
11-
12-
First we need to config composer global minimum-stability to development, because DevNet is still in development
13-
14-
so in the terminal type the following command:
15-
```
16-
composer global config minimum-stability dev
17-
```
18-
19-
Then force composer to prefer the stable version if that possible, like so:
9+
To install DevNet CLI in your project, run the following command in the terminal:
2010
```
21-
composer global config prefer-stable true
11+
composer require devnet/cli
2212
```
13+
>**Note:** This is the minimal installation of DevNet Framework that allows you to create a console app only, but you can add other DevNet packages later, like devnet/web package to be able to create a web app.
2314
24-
To install DevNet Cli globally, run the following command in the terminal:
15+
You can install DevNet CLI globally in your system, by run the following command in the terminal:
2516
```
2617
composer global require devnet/cli
2718
```
2819

29-
This will run a minimal installation of DevNet Framework that allows you to create a console app only, but you can add other DevNet packages later, like devnet/web package to be able to create a web app.
30-
31-
>**Note:** For Linux users, do not forget to add composer **bin** into the System Environment Variables, like the following line:
20+
>**Note:** In order to run DevNet CLI globally in linux os, you need to add composer **bin** into the system environment variables.
3221
>`echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc`
3322
3423
## Usage
@@ -38,117 +27,8 @@ To show help on how to use **DevNet Command Line**, run the following option in
3827
devnet --help
3928
```
4029

41-
##### Output
42-
```
43-
DevNet command-line interface v1.0.0
44-
Usage: devnet [options]
45-
46-
Options:
47-
--help Show command line help.
48-
--version Show DevNet Cli version.
49-
--path Show DevNet runtime path.
50-
51-
Usage: devnet [command] [arguments] [options]
52-
53-
commands:
54-
new Create a new project
55-
run Run the DevNet applicaton
56-
add Add a template code file to the project
57-
58-
Run 'devnet [command] --help' for more information on a command.
59-
```
60-
61-
The Help shows a list of responsible commands that you can use with DevNet Cli, and for more details about a command that you want to use you can run it with the option `--help` like in the following example:
62-
63-
```
64-
devnet new --help
65-
```
66-
67-
##### Output
68-
```
69-
Usage: devnet new [template] [options] [arguments]
70-
71-
Options:
72-
--help Displays help for this command.
73-
--project Location to place the generated project.
74-
75-
templates:
76-
console Console Applicatinon project
77-
```
78-
79-
The help shows a usage of the `new` command followed by the name of the project template that you want to create, and followed by options and arguments, and shows a list of options that you can use with the command and a list of templates that you can choose from to create your project.
80-
81-
### Add more Templates
82-
By default DevNet Cli include **console** template only, and in order to create a **web** project like **web api** and **mvc** project, you have to install DevNet addons templates
83-
84-
To add empty web template to your system, run the following command in your terminal:
85-
```
86-
composer global require devnet/web
87-
```
88-
89-
To add mvc web template to your system, run the following command in your terminal:
90-
```
91-
composer global require devnet/mvc
92-
```
93-
94-
Now when we check again the list of the available templates, we find that we can create more than just a console project.
95-
96-
```
97-
devnet new --help
98-
```
99-
100-
##### Output
101-
```
102-
Usage: devnet new [template] [options] [arguments]
103-
104-
Options:
105-
--help Displays help for this command.
106-
--project Location to place the generated project.
107-
108-
templates:
109-
console Console Application
110-
mvc DevNet Web Application (Model-View-Controller)
111-
web DevNet Web Application (Empty)
112-
```
113-
114-
### Create new Project
115-
This example shows how to create a console application project, so in your terminal run the following command:
116-
117-
```
118-
devnet new console --project YourProjectName
119-
```
120-
121-
This will create a Program class that outputs a "Hello World" message in your terminal.
122-
123-
```php
124-
<?php
125-
126-
namespace Application;
127-
128-
use DevNet\System\IO\Console;
129-
130-
class Program
131-
{
132-
public static function main(array $args = [])
133-
{
134-
Console::writeLine("Hello World!");
135-
}
136-
}
137-
```
138-
139-
### Run Your Application
140-
To run your application, go to your project folder and run the following command in your terminal:
141-
142-
```
143-
devnet run
144-
```
145-
146-
##### Output
147-
148-
```
149-
Hello World!
150-
```
151-
152-
>**Note :** Full documentation on how to use **DevNet Framework** is available at [devnet-framework.github.io](https://devnet-framework.github.io)
30+
## Documentation
31+
Full documentation on how to use **DevNet Framework** is available at [devnet-framework.github.io](https://devnet-framework.github.io)
15332

154-
That's it! Enjoy coding and build cool things :)
33+
## License
34+
This library is licensed under the MIT license. See [License File](https://github.com/DevNet-Framework/cli/blob/master/LICENSE) in the root folder for more information.

0 commit comments

Comments
 (0)