2.0.0 • Published 2 years ago
rylans-node-tools v2.0.0
Rylan's Node Tools
A collection of tiny cli tools.
Installation
General
npm install -g rylans-node-tools
Take Over
- Clone repository to local machine.
- Run
yarn install
to install all dependencies. - Run
yarn link
to link this package with global dependency. - Run
yarn build
oryarn dev
to build source code into lib folder and take over from there.
Usage
- After installation, you should be able to run
node-tools
ornt
as a global command. - Check
node-tools --help
to explore different useful commands.
Available Commands
greet
Basic test of the installation of the tool. Greet in specified language, or random if not provided.
Params | Required | Value | Description |
---|---|---|---|
--lang, -l | N | en, fr, jp, sp, cn, it, ru | Specify a language |
For example:
$ nt greet -l en
Hi
$ nt greet
Bonjour
git
Search oh-my-zsh git command shorthands.
Arguments | Required | Description |
---|---|---|
<search_string> | Y | Search any git commands with search_string |
For example:
$ nt git remote
gbr: git branch remote
gr: git remote
gra: git remote add
grmv: git remote rename
grrm: git remote remove
grset: git remote set-url
grup: git remote update
grv: git remote -v
color
Handy color converter between rgb format and Hex format.
For example:
nt color
? Input color value: 0, 111, 222
#006fde
Supported input formats:
RGB input:
rgb(255, 255, 255)
255, 255, 255
255 255 255
Hex input:
#fff
#FFFFFF
fff
FFFFFF
chatgpt
or cg
Integrated OpenAI's ChatGPT API into command line.
For first time use, enter API_KEY
generated from https://platform.openai.com/account/api-keys.
Arguments | Required | Value | Description |
---|---|---|---|
question | N | String | The question to ask ChatGPT |
Params | Required | Value | Description |
---|---|---|---|
--config, -c | N | None | Update API_KEY |
Examples:
$ nt cg -c
Please create and/or enter your API Key from https://platform.openai.com/account/api-keys
? Enter API Key:
$ nt cg how many countries are there in Asia
>>>>> Answer 💬 <<<<<<
There are 48 countries in Asia.
$ nt cg
? Ask ChatGPT: What is the opposite color of cyan
>>>>> Answer 💬 <<<<<<
The opposite color of cyan is red-orange.