Present CLI Info in Style! (A CLI app helper)
Why use Presentio instead of console.log()?
-------------------------------------------
Simply put it, its way more:
- Elegent
- Colorful
- Readable
- & Minimal
Why create a whole library for this?
------------------------------------
Presentio is a tool that was originally created for the Hyper Cli;
The use of various libraries to just log some basic colored txt & a help msg was a bit too excessive.
Here aroused the idea to create a fully fletched yet lightwieght library.
& that's how this project was born.
yarn add presentio
# or
npm install presentio
Example usage: Hyper
import Present from 'presentio';
Present({
title: 'Hyper',
tagline: 'by @Shorky',
description: 'A CLI to bootstrap new projects!',
version: '1.0',
// defaults > fg: 'black', bg: 'green', clear: true
}, helpMessage);
// ^ Msg to print upon use of help argument (ig* -h, --help)
Presentio also includes a built-in fn to ease the process of creating a help message.
import Present, { helpTxt } from 'presentio';
const cliCmds = {
commands: {
prettify: 'add rainbows everywhere'
},
flags: {
rainbow: {
alais: 'r',
description: 'girl-in-red?',
default: false
}
}
}
Present({
... // same config as above
}, helpTxt(cliCmds));
Expected output from: $ hyper -h/--help
Hyper v1.0 by @Shorky
A CLI to bootstrap new projects!
Usage:
$ hyper <commands> [options]
Commands:
<!-- cmd: description -->
prettify: add rainbows everywhere
Options:
<!-- alias, flag: description -->
-r, --rainbow: girl-in-red?
-h, --help: Print CLI's helpTxt <!-- Included by default -->
-v, --version: Print CLI's version <!-- Included by default -->
<!-- Incase sensitive -->
- Black
- Red
- Green
- Yellow
- Blue
- Magenta
- Cyan
- White
<!-- We'll be adding more later -->
π¦ <Presentio>
ββ .circleci
β ββ config.yml
ββ .github
β ββ ISSUE_TEMPLATE
β β ββ BUG_REPORT.md
β β ββ FEATURE_REQUEST.md
β ββ workflows
β β ββ CodeQL.yml
β β ββ Release.yml
β ββ PULL_REQUEST_TEMPLATE.md
ββ .husky
β ββ pre-commit
ββ Lib
β ββ @Types
β β ββ Args.d.ts
β β ββ Present.d.ts
β β ββ Usage.d.ts
β ββ Modules
β β ββ Clear.ts
β β ββ Clrs.ts
β ββ Utils
β β ββ ErrorHandler.ts
β β ββ Indent.ts
β ββ Args.ts
β ββ Present.ts
β ββ Usage.ts
ββ __Tests__
β ββ <!-- Same as @Lib -->
ββ .gitignore
ββ .prettierrc <!-- Available within package.json -->
ββ .eslintrc <!-- Available within package.json -->
ββ jest.config.ts
ββ rollup.config.js
ββ README.md
ββ package.json
ββ tsconfig.json
Made With β₯ By @Shorky
#
# Copyright 2022 @SharkSV
# License Identifier: MIT
#