Callista is the next generation of terminal tool kits for your use!
Callista is just made for easy first-hand development, it reduces your projects weight be it big or small, Callista just makes things easy, with its in-built powerful library! Why it extends over others:
- Callista uses its own modules, bringing more rigidity in development.
- Makes the whole project light-weight.
- Offers you libraries for commercial software development.
- Provides flexibility instead of tough paradigms.
The Beautify library innumerates modules that beautify the terminal, in other words, terminal styling.
The spinner inside of the beautify library provides a animated spinner useful for showing loading ups! A pretty basic example
const {Beautify} = require("callista");
var spinner = new Beautify.spinner({
text: "Something",
color: "magenta"
}).start();
setTimeout(()=>{
spinner.succeed();
}, 1000)
All Spinner Methods
Part of the new Beautify.spinner
class
.start()
-> Starts the initial spinner. Timeout interval is 300
by default.
.succeed()
-> Shows that the spinner succeeded, i.e., stops the spinner and indicates success with a tick mark. Takes in parameters(optional) as text
.fail()
-> Shows that the task indicated by the spinner failed, i.e., stops the spinner and indicates failure with a cross mark. Takes in parameters(optional) as text
The Beautify library provides the freedom to make tables in your terminal!
A pretty basic example
var {Beautify, Logger} = require('callista');
const table = new Beautify.table("Tables");
table.setHeading("","Name","Gender").addRow('1','Micheal','Male').addRow('2',"Maria",'Female');
Logger.write(table.toString());
Alignments Beautify.table.toCentre() For centre allignment
This module provides of colors which can be used on terminal text.
A pretty basic example
var {Color} = require("callista");
console.log(Color.red("Hey I\'m red!"));
// Colored output, in console.
Colors provided by this module!
red
magenta
blue
black
green
blue
grey
white
yellow
brightRed
brightGreen
brightYellow
brightBlue
brightMagenta
brightCyan
brightWhite
Use bg
for colors but in background
Stlyes
The Colors library also provides of different style functions!
reset
bold
dim
italic
underline
inverse
hidden
strikethrough
Random and Rainbow are also functions of this library!
This library provides of logging functions to log console outputs into a .log
file or set levels for logs!
A pretty basic example
var {Logger} = require("callista");
Logger.level.warn("This is a console warning!"); // sends a warning to the console
Logger.write("I'm writing this to the default callista log file"); // writes this into callista.log and the terminal
// or use the simple log method
Logger.log("ok") // does not write into a log file!
Logger.write("I'm writting in my own lovely file!","awesomeness") // writes to awesomeness.log
Logger.level Functions
trace(text)
debug(text)
info(text)
warn(text)
error(text)
You can set logger level using the level.setLevel() method or to set the default level -> level.setDefaultLevel() method The different Levels are...
- Silent(5)
- Warn(3)
- info(2)
- error(4)
- trace(0)
- debug(1) Numbers in bracket indicate the level!
Repository logo created by @doublevcodes