Skip to content

Adarsh16-30/CommandLineInterface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– My CLI (CommandLineInterface)

A fully featured Node.js CLI toolkit for modern automation and developer workflows.

Uses Commander, Chalk, Inquirer, Axios, OpenAI, simple-git, and more.


πŸš€ Features

  • Extensible Commands: Includes utilities for greet, time, quote, init, config, joke, file manipulation, git operations, server tools, updates, info, script runner, AI code explanations (Hugging Face/OpenAI), Docker management, GitHub integration, todo lists, secret management, linting, audits, theming, and more.
  • Modular Structure: All commands are organized in the commands/ folder.
  • Beautiful Output: Uses chalk and figlet for colorful banners and stylish CLI interfaces.
  • Configurable & Secure: Supports .env and custom config file management for tokens and secrets.
  • Modern Toolkit: Built with Commander, Chalk, Inquirer, Axios, HuggingFace API, OpenAI, simple-git, express, and ora spinners.

πŸ› οΈ Getting Started

Option 1: Install from npm (Recommended)

This makes mycli available globally:

npm install -g @adarsht0912/mycli

Option 2: Clone This Repository

git clone https://github.com/Adarsh16-30/CommandLineInterface.git
cd CommandLineInterface
npm install

(Optional) To make the command available globally from the cloned folder:

npm link

Environment Setup (.env)

Before using advanced features, you need to set up environment variables for authentication and security. Depending on how you install and use MyCLI, here are your options:

If You Installed via npm (Globally):

  • Recommended: Create a .env file in your home directory.
    • Windows: C:\Users\your-username.env
    • Linux/Mac: /home/your-username/.env or ~/.env
  • This is picked up automatically by the CLI if you use dotenv.

If You Cloned the Repository (Locally):

  • Create a .env file in the root folder of the project.

Example .env contents:

GITHUB_TOKEN=your_github_personal_token_here
HF_TOKEN=your_huggingface_token_here
ENCRYPTION_KEY=some-very-strong-random-string
  • GITHUB_TOKEN: Needed for GitHub integrations (repo, issues, etc.).
  • HF_TOKEN: Required for Hugging Face AI integrations (text/code, etc.).
  • ENCRYPTION_KEY: Used to securely encrypt/decrypt secrets via the CLI.

Alternatively, you can set these variables directly in your terminal:

Linux/Mac:

export GITHUB_TOKEN=your_github_personal_token_here
export HF_TOKEN=your_huggingface_token_here
export ENCRYPTION_KEY=some-very-strong-random-string

Windows (CMD):

set GITHUB_TOKEN=your_github_personal_token_here
set HF_TOKEN=your_huggingface_token_here
set ENCRYPTION_KEY=some-very-strong-random-string

Important: Keep your .env file privateβ€”never commit it to a public repository.

πŸ€– Example Commands

Explore mycli --help for all options and details.

  • mycli greet – Show a custom banner and welcome
  • mycli time – Display the current time
  • mycli quote – Get motivational quotes
  • mycli init – Initialize new CLI configs/projects
  • mycli config – Edit/view CLI config
  • mycli joke – Print a random joke
  • mycli ai – Ask AI for code help
  • mycli github – Interact with GitHub
  • mycli todo – Manage TODOs
  • mycli secret – Encrypt/decrypt secrets
  • mycli lint – JavaScript linting
  • mycli audit – Security checks

πŸ“ Project Folder Structure

CommandLineInterface/
β”œβ”€β”€ commands/            # Modular CLI command implementations
β”‚   β”œβ”€β”€ greet.js
β”‚   β”œβ”€β”€ time.js
β”‚   └── ...other commands...
β”œβ”€β”€ utils/               # Utilities (helpers, colors, etc.)
β”‚   β”œβ”€β”€ colors.js
β”‚   └── helpers.js
β”œβ”€β”€ index.js             # Main entry point (registers CLI and commands)
β”œβ”€β”€ package.json         # Project metadata & dependencies
β”œβ”€β”€ .env                 # Required environment variables (not committed)
└── README.md            # This documentation

🀝 Contributing

Feel free to fork, submit PRs, or open issues for bugs/feature requests!

πŸ“ License

This project is intended for educational purposes and personal learning only. Please use, modify, and share it to enhance your understanding of CLI tools and Node.js development.

Made by Adarsh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published