Lesy js is a super simple CLI framework to build modern node based command line applications, without much boilerplate.
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.
✓ Language: Javascript and Typescript with @types
✓ Flexibility: Able to change complete behaviour with middlewares
✓ Boilerplate: Write less code. whether its a dead simple project or complex one.
✓ Extensions: Add cool functionalities with plugins
✓ Platform: Write once and run in CLI or web UI. Desktop interface is coming soon.
✓ Performance: It is faster than existing tools. Benchmarks inside.
✓ Testing: Dedicated testing setup for unit test and integration test
✓ Lot more: Features, sub commands, plugins, boilerplate generator...
Scaffold new project directly using npx command
npx lesy new my-cliOr, you can install lesy cli globally and generate a new project
npm i -g lesy lesy new my-cliAlso you can create your own project setup and run lesy. Learn more.
Once you setup a project, you can create and run your first command.
#!/usr/bin/env node const lesy = require("@lesy/compiler"); const helloCommand = { name: "hello", run: () => console.log("hello world") }; lesy({ commands: [helloCommand] }).parse();./bin/cmd hello 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
@lesy/lesy-plugin-pilot Run comamnds in Web UI. Supports input, console, workspace and more..
@lesy/lesy-plugin-store Key value storage in the system
@lesy/lesy-plugin-config Setup config files like myapp.config.json, myapp.config.yml, myapp.config.js
@lesy/lesy-plugin-generator Scaffold projects with handlebars templating
@lesy/lesy-plugin-prompt Wrapper around inquirer plugin for prompts and questions
@lesy/lesy-plugin-help Automatically generate beautiful help with sub commands support. Highly customizable
@lesy/lesy-plugin-validator Prompt if required args are not supplied
We have a setup a playground for you to play around with it.