|
1 | 1 | <p align="center"> |
2 | 2 | <br><br> |
3 | | - <img src="https://leafphp.dev/logo.png" height="100"/> |
| 3 | + <img src="https://leafphp.dev/logo-circle.png" height="100"/> |
4 | 4 | <h1 align="center">Leaf CLI</h1> |
5 | | - <br> |
6 | | - <br><br><br> |
| 5 | + <br><br> |
7 | 6 | </p> |
8 | 7 |
|
9 | | -# Leaf CLI 2.0 |
| 8 | +# Leaf CLI 2 |
10 | 9 |
|
11 | 10 | [](https://packagist.org/packages/leafs/cli) |
12 | 11 | [](https://packagist.org/packages/leafs/cli) |
13 | 12 | [](https://packagist.org/packages/leafs/cli) |
14 | 13 |
|
15 | | -A simple command line tool for creating and interacting with your leaf projects. You can do stuff like installing packages, interacting with your app, previewing your app... |
| 14 | +A simple command line tool for creating and interacting with your leaf projects. You can do stuff like installing packages, interacting with your app, previewing your app, ... |
16 | 15 |
|
17 | 16 | ## Installation |
18 | 17 |
|
@@ -50,24 +49,37 @@ echo $PATH |
50 | 49 | To start a new project, simply open up your console or terminal in your directory |
51 | 50 | for projects and enter: |
52 | 51 |
|
53 | | -```bash |
54 | | -leaf create <project-name> |
| 52 | +With leaf 3: |
| 53 | + |
| 54 | +```sh |
| 55 | +leaf create <project-name> --v3 |
55 | 56 | ``` |
56 | 57 |
|
57 | | -or with leaf 3: |
| 58 | +With leaf 2: |
58 | 59 |
|
59 | 60 | ```sh |
60 | | -leaf create <project-name> --v3 |
| 61 | +leaf create <project-name> --v2 |
61 | 62 | ``` |
62 | 63 |
|
63 | | -> Note that the leaf 3 has not yet been released. This is why the default installation uses leaf 2. After the main v3 is released, leaf cli will switch to leaf 3 for its default installations. |
| 64 | +If no version is passed in, leaf CLI will prompt you to select a version to use in your leaf app. |
| 65 | + |
| 66 | +```bash |
| 67 | +leaf create <project-name> |
| 68 | +``` |
| 69 | + |
| 70 | +```sh |
| 71 | +* Select a version to use |
| 72 | + [0] v3 |
| 73 | + [1] v2 |
| 74 | + > |
| 75 | +``` |
64 | 76 |
|
65 | 77 | This will now prompt you to select a preset |
66 | 78 |
|
67 | 79 | ```sh |
68 | 80 | Creating a new Leaf app "<project-name>" in ./projects-directory. |
69 | 81 |
|
70 | | -Please pick a preset |
| 82 | +* Please pick a preset |
71 | 83 | [0] leaf |
72 | 84 | [1] leaf mvc |
73 | 85 | [2] leaf api |
@@ -112,12 +124,18 @@ leaf create <project-name> --skeleton |
112 | 124 |
|
113 | 125 | This cli tool also adds a feature to install modules from composer |
114 | 126 |
|
115 | | -```bash |
| 127 | +```sh |
116 | 128 | leaf install ui |
117 | 129 | ``` |
118 | 130 |
|
119 | 131 | This installs the `leafs/ui` package. |
120 | 132 |
|
| 133 | +You can also install third party packages from packagist |
| 134 | + |
| 135 | +```sh |
| 136 | +leaf install psr/log |
| 137 | +``` |
| 138 | + |
121 | 139 | ### Interactive Shell |
122 | 140 |
|
123 | 141 | You can also use the interactive shell to interact with your app. |
@@ -149,3 +167,25 @@ leaf serve -p 8000 |
149 | 167 | ## License |
150 | 168 |
|
151 | 169 | Leaf CLI is open-sourced software licensed under the [MIT license](LICENSE.md). |
| 170 | + |
| 171 | +## 😇 Contributing |
| 172 | + |
| 173 | +We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀. |
| 174 | + |
| 175 | +To report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project. |
| 176 | + |
| 177 | +## 🤩 Sponsoring Leaf |
| 178 | + |
| 179 | +Your cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on [open collective](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute. |
| 180 | + |
| 181 | +And to all our existing cash/code contributors, we love you all ❤️ |
| 182 | + |
| 183 | +<a href="https://github.com/leafsphp/leaf/graphs/contributors" target="_blank"><img src="https://opencollective.com/leafphp/contributors.svg?width=890" /></a> |
| 184 | + |
| 185 | +## 🤯 Links/Projects |
| 186 | + |
| 187 | +- [Leaf Docs](https://leafphp.dev) |
| 188 | +- [Leaf MVC](https://mvc.leafphp.dev) |
| 189 | +- [Leaf API](https://api.leafphp.dev) |
| 190 | +- [Leaf CLI](https://cli.leafphp.dev) |
| 191 | +- [Aloe CLI](https://leafphp.dev/aloe-cli/) |
0 commit comments