|
1 | | -# Lesy JS |
2 | | - |
3 | | -Lesy js is a super simple CLI framework to build modern node based command line applications, without much boilerplate. |
4 | | - |
5 | | -Though there were awesome tools available for building CLI apps, the ultimate and only purpose of Lesy is to bring all cool fuctionalities to UI. Which means write code once and run it in terminal or web UI. There were other nice features in lesy that you might like. |
6 | | - |
| 1 | +<h1 align="center"> |
| 2 | + <a |
| 3 | + target="_blank" |
| 4 | + rel="noopener noreferrer" |
| 5 | + href="https://lesyjs.io" |
| 6 | + ><img |
| 7 | + width="300" |
| 8 | + alt="The Lounge" |
| 9 | + src="https://user-images.githubusercontent.com/1754676/97110133-75926f00-16fd-11eb-9a27-3d52508d51cf.png" |
| 10 | + style="max-width: 100%" |
| 11 | + /></a> |
| 12 | +</h1> |
7 | 13 | <br/> |
| 14 | +<h3 align="center"> |
| 15 | + > 𝙱𝚞𝚒𝚕𝚍 𝚖𝚘𝚍𝚎𝚛𝚗 𝚌𝚘𝚖𝚖𝚊𝚗𝚍-𝚕𝚒𝚗𝚎 𝚊𝚙𝚙𝚜_ |
| 16 | +</h3> |
| 17 | +<p align="center"> |
| 18 | + <span> |
| 19 | + <a href="https://lesyjs.io/">Website</a> |
| 20 | + • |
| 21 | + <a href="https://lesyjs.io/docs/get-started/overview">Documentation</a> |
| 22 | + • |
| 23 | + <a href="https://codesandbox.io/s/lesy-pilot-playground-hzjgw?file=/src/index.js">Playground</a> |
| 24 | + </span> |
| 25 | +</p> |
| 26 | +<br/> |
| 27 | +<h1></h1> |
8 | 28 |
|
9 | | -### 𝙵𝚎𝚊𝚝𝚞𝚛𝚎𝚜 |
10 | | - |
11 | | -✓ **Language**: Javascript and Typescript with @types |
12 | | - |
13 | | -✓ **Flexibility**: Able to change complete behaviour with middlewares |
14 | | - |
15 | | -✓ **Boilerplate**: Write less code. whether its a dead simple project or complex one. |
16 | | - |
17 | | -✓ **Extensions**: Add cool functionalities with plugins |
18 | | - |
19 | | -✓ **Platform**: Write once and run in CLI or web UI. Desktop interface is coming soon. |
20 | | - |
21 | | -✓ **Performance**: It is faster than existing tools. Benchmarks inside. |
22 | | - |
23 | | -✓ **Testing**: Dedicated testing setup for unit test and integration test |
24 | | - |
25 | | -✓ **Lot more**: Features, sub commands, plugins, boilerplate generator... |
| 29 | +### Features |
26 | 30 |
|
27 | | -<br/> |
| 31 | +- **Language**     - _Javascript and Typescript with @types_ |
| 32 | +- **Flexibility**     - _Able to change complete flow with middlewares_ |
| 33 | +- **Boilerplate**    - _Write less code. whether it's a dead simple project or complex one_ |
| 34 | +- **Extensions**    - _Add cool functionalities with plugins_ |
| 35 | +- **Platform**      - _Write once and run in CLI or web UI. Desktop interface is coming soon_ |
| 36 | +- **Performance**  - _It is faster than existing tools. Benchmarks inside_ |
| 37 | +- **Testing**       - _Dedicated testing setup for unit test and integration test_ |
| 38 | +- **Lot more**      - _Features, sub-commands, boilerplate generator..._ |
| 39 | + <br/> <br/> |
28 | 40 |
|
29 | | -### 𝙸𝚗𝚜𝚝𝚊𝚕𝚕𝚊𝚝𝚒𝚘𝚗 |
| 41 | +### Installation |
30 | 42 |
|
31 | 43 | Scaffold new project directly using npx command |
32 | 44 |
|
33 | 45 | ```shell |
34 | | -npx lesy new my-cli |
| 46 | +> npx lesy new my-cli |
35 | 47 | ``` |
36 | 48 |
|
37 | 49 | Or, you can install lesy cli globally and generate a new project |
38 | 50 |
|
39 | 51 | ```shell |
40 | | -npm i -g lesy |
41 | | -lesy new my-cli |
| 52 | +> npm i -g lesy |
| 53 | +> lesy new my-cli |
42 | 54 | ``` |
43 | 55 |
|
44 | | -Also you can create your own project setup and run lesy. [Learn more](/). |
| 56 | +<br/> <br/> |
45 | 57 |
|
46 | | -<br/> |
| 58 | +[](https://asciinema.org/a/cByzQns8RTNs5I117XolHSgAt) |
47 | 59 |
|
48 | | -### 𝚁𝚞𝚗 𝚌𝚘𝚖𝚖𝚊𝚗𝚍𝚜 |
| 60 | +Also you can create your own project setup and run lesy. [Learn more](). |
| 61 | +<br/> <br/> |
49 | 62 |
|
50 | | -Once you setup a project, you can create and run your first command. |
| 63 | +### Basic Example |
51 | 64 |
|
52 | 65 | ```js |
53 | 66 | #!/usr/bin/env node |
54 | 67 |
|
55 | 68 | const lesy = require("@lesy/compiler"); |
56 | | -const helloCommand = { name: "hello", run: () => console.log("hello world") }; |
| 69 | +const commands = [{ name: "hello", run: () => console.log("hello world") }]; |
57 | 70 |
|
58 | | -lesy({ commands: [helloCommand] }).parse(); |
| 71 | +lesy({ commands }).parse(); |
59 | 72 | ``` |
60 | 73 |
|
| 74 | +```shell |
| 75 | +./cmd hello |
61 | 76 | ``` |
62 | | -./bin/cmd hello |
63 | | -``` |
64 | | - |
65 | | -It is just a tiny bit of lesy. There are lot of other cool stuffs like, advance commands, middlewares, features, configs, and plugins. [Learn more](/) |
66 | | - |
67 | | -<br/> |
68 | | - |
69 | | -### 𝙰𝚟𝚊𝚒𝚕𝚊𝚋𝚕𝚎 𝚘𝚏𝚏𝚒𝚌𝚒𝚊𝚕 𝙿𝚕𝚞𝚐𝚒𝚗𝚜 |
70 | | - |
71 | | -**@lesy/lesy-plugin-pilot** |
72 | | -Run comamnds in Web UI. Supports input, console, workspace and more.. |
73 | | - |
74 | | -**@lesy/lesy-plugin-store** |
75 | | -Key value storage in the system |
76 | | - |
77 | | -**@lesy/lesy-plugin-config** |
78 | | -Setup config files like myapp.config.json, myapp.config.yml, myapp.config.js |
79 | | - |
80 | | -**@lesy/lesy-plugin-generator** |
81 | | -Scaffold projects with handlebars templating |
82 | | - |
83 | | -**@lesy/lesy-plugin-prompt** |
84 | | -Wrapper around inquirer plugin for prompts and questions |
85 | | - |
86 | | -**@lesy/lesy-plugin-help** |
87 | | -Automatically generate beautiful help with sub commands support. Highly customizable |
88 | | - |
89 | | -**@lesy/lesy-plugin-validator** |
90 | | -Prompt if required args are not supplied |
91 | | - |
92 | | -<br/> |
93 | | - |
94 | | -### 𝚃𝚛𝚢 𝙻𝚎𝚜𝚢 𝙿𝚒𝚕𝚘𝚝 𝚋𝚎𝚏𝚘𝚛𝚎 𝚒𝚗𝚜𝚝𝚊𝚕𝚕𝚒𝚗𝚐 |
95 | | - |
96 | | -We have a setup a _playground_ for you to play around with it. |
97 | 77 |
|
98 | | -[](https://codesandbox.io/s/lesy-pilot-playground-hzjgw?fontsize=14&hidenavigation=1&view=preview) |
| 78 | +It is just a tiny bit of lesy. There are lot of other cool stuffs like, advance commands, middlewares, features, configs, and plugins. [Learn more]() |
| 79 | +<br/> <br/> |
| 80 | + |
| 81 | +### Plugins |
| 82 | + |
| 83 | +- [**UI Pilot**](https://lesyjs.io/docs/plugins/pilot-ui)<br/> |
| 84 | + _Run commands in Web UI. Supports input, console, workspace and more..._ |
| 85 | +- [**Store**](https://lesyjs.io/docs/plugins/config-store)<br/> |
| 86 | + _Key-value storage in the system_ |
| 87 | +- [**Config reader**](https://lesyjs.io/docs/plugins/config-files)<br/> |
| 88 | + _Setup config files like myapp.config.json, myapp.config.yml, myapp.config.js_ |
| 89 | +- [**Scaffold generator**](https://lesyjs.io/docs/plugins/scaffold-generator)<br/> |
| 90 | + _Generate projects with handlebars templating_ |
| 91 | +- [**Prompt**](https://lesyjs.io/docs/plugins/prompt)<br/> |
| 92 | + _Wrapper around inquirer plugin for prompts and questions_ |
| 93 | +- [**Help**](https://lesyjs.io/docs/plugins/help)<br/> |
| 94 | + _Automatically generate beautiful help with sub commands support. Highly customizable_ |
| 95 | +- [**Arg validator**](https://lesyjs.io/docs/plugins/arg-validator)<br/> |
| 96 | + _Prompt if required args are not supplied_ |
| 97 | + <br/> <br/> |
| 98 | + |
| 99 | + ### License |
| 100 | + |
| 101 | + MIT |
| 102 | + |
| 103 | +<!-- logo |
| 104 | +headline |
| 105 | +buttons |
| 106 | +docs link block |
| 107 | +intro |
| 108 | +pilot |
| 109 | +installation |
| 110 | +basic example |
| 111 | +features |
| 112 | +plugins |
| 113 | +contribution |
| 114 | +dev docs |
| 115 | +license --> |
0 commit comments