Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevKit CLI

A simple Node.js CLI built with TypeScript, commander, axios, and chalk.

Features

  • Colored terminal output via chalk
  • Input validation with helpful error messages
  • --version / -v flag support
  • OOP class structure (ApiClient, MathOps, PasswordGenerator, etc.)
  • 14 commands spanning math, APIs, and utilities

Requirements

  • Node.js 20.x (LTS recommended)
  • npm

Installation

npm install

Build

Compile TypeScript to JavaScript:

npx tsc

Output is generated in dist/.

Run Locally

After building:

node dist/devkit.js <command>

Install as a Global CLI

npm link

Then run commands directly:

devkit <command>

Available Commands

Command Description
greet [name] Greet a user by name
add <num1> <num2> Add two numbers
subtract <num1> <num2> Subtract second number from first
multiply <num1> <num2> Multiply two numbers
divide <num1> <num2> Divide first number by second
joke Fetch a random joke from the internet
github <username> Fetch GitHub user info
quote Fetch a random inspirational quote
weather <city> Fetch current weather for a city
coinflip Flip a coin — heads or tails?
roll [sides] Roll a dice (default: 6 sides)
fileinfo <filename> Show file size, path, and extension
password [length] Generate a random secure password
sysinfo Show basic system information

Example Usage

devkit greet Ansh
devkit add 10 5
devkit subtract 20 8
devkit multiply 3 7
devkit divide 20 4
devkit joke
devkit github techcodie
devkit quote
devkit weather Delhi
devkit coinflip
devkit roll 20
devkit fileinfo package.json
devkit password 20
devkit sysinfo

API Integrations

API Used For
GitHub REST API User profile info
DummyJSON Quotes Random quotes
Official Joke API Random jokes
wttr.in Weather data

Notes

  • divide handles division by zero and prints an error message.
  • joke, github, quote, and weather depend on internet connectivity.
  • roll defaults to a 6-sided die if no argument is given.
  • password defaults to 16 characters if no length is given.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages