|
1 | 1 | # Lesy JS |
2 | 2 |
|
3 | | -Lesy js is a flexible lightweight CLI framework to build modern command line apps without too much boilerplate. |
| 3 | +Lesy js is a super simple CLI framework to build modern node based command line applications, without much boilerplate. |
4 | 4 |
|
5 | | -If you have already used commander, yargs, gluegun, then lesy js will definitely give you a new experience and you will feel the difference. |
| 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 | 6 |
|
7 | | -### Why LesyJS |
| 7 | +<br/> |
8 | 8 |
|
9 | | -- **Language**: Full support for Typescript with @types |
| 9 | +### 𝙵𝚎𝚊𝚝𝚞𝚛𝚎𝚜 |
10 | 10 |
|
11 | | -- **Boilerplate**: Write less code. whether its a dead simple project or complex one. |
| 11 | +✓ **Language**: Javascript and Typescript with @types |
12 | 12 |
|
13 | | -- **Flexibility**: Able to change complete behaviour with middlewares |
| 13 | +✓ **Flexibility**: Able to change complete behaviour with middlewares |
14 | 14 |
|
15 | | -- **Extensions**: Add cool functionalities with plugins |
| 15 | +✓ **Boilerplate**: Write less code. whether its a dead simple project or complex one. |
16 | 16 |
|
17 | | -- **Platform**: Write once and run in CLI or UI |
| 17 | +✓ **Extensions**: Add cool functionalities with plugins |
18 | 18 |
|
19 | | -- **Performance**: It is just faster than existing libraries. Benchmark inside. |
| 19 | +✓ **Platform**: Write once and run in CLI or web UI. Desktop interface is coming soon. |
20 | 20 |
|
21 | | -- **Testing**: Dedicated testing setup for unit test and integration test |
| 21 | +✓ **Performance**: It is faster than existing tools. Benchmarks inside. |
22 | 22 |
|
23 | | -- **Lot more**: Features, sub commands, existing plugins, Boilerplate generator... |
| 23 | +✓ **Testing**: Dedicated testing setup for unit test and integration test |
24 | 24 |
|
25 | | -### Try Lesy before installing |
| 25 | +✓ **Lot more**: Features, sub commands, plugins, boilerplate generator... |
| 26 | + |
| 27 | +<br/> |
| 28 | + |
| 29 | +### 𝙸𝚗𝚜𝚝𝚊𝚕𝚕𝚊𝚝𝚒𝚘𝚗 |
| 30 | + |
| 31 | +Scaffold new project directly using npx command |
| 32 | + |
| 33 | +```shell |
| 34 | +npx lesy new my-cli |
| 35 | +``` |
| 36 | + |
| 37 | +Or, you can install lesy cli globally and generate a new project |
| 38 | + |
| 39 | +```shell |
| 40 | +npm i -g lesy |
| 41 | +lesy new my-cli |
| 42 | +``` |
| 43 | + |
| 44 | +Also you can create your own project setup and run lesy. [Learn more](/). |
| 45 | + |
| 46 | +<br/> |
| 47 | + |
| 48 | +### 𝚁𝚞𝚗 𝚌𝚘𝚖𝚖𝚊𝚗𝚍𝚜 |
| 49 | + |
| 50 | +Once you setup a project, you can create and run your first command. |
| 51 | + |
| 52 | +```js |
| 53 | +#!/usr/bin/env node |
| 54 | + |
| 55 | +const lesy = require("@lesy/compiler"); |
| 56 | +const helloCommand = { name: "hello", run: () => console.log("hello world") }; |
| 57 | + |
| 58 | +lesy({ commands: [helloCommand] }).parse(); |
| 59 | +``` |
| 60 | + |
| 61 | +``` |
| 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 | +### 𝚃𝚛𝚢 𝙻𝚎𝚜𝚢 𝙿𝚒𝚕𝚘𝚝 𝚋𝚎𝚏𝚘𝚛𝚎 𝚒𝚗𝚜𝚝𝚊𝚕𝚕𝚒𝚗𝚐 |
26 | 95 |
|
27 | 96 | We have a setup a _playground_ for you to play around with it. |
28 | 97 |
|
|
0 commit comments