A fully featured Node.js CLI toolkit for modern automation and developer workflows.
Uses Commander, Chalk, Inquirer, Axios, OpenAI, simple-git, and more.
- 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
chalkandfigletfor colorful banners and stylish CLI interfaces. - Configurable & Secure: Supports
.envand 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.
This makes mycli available globally:
npm install -g @adarsht0912/mycli
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
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
.envfile in your home directory.- Windows:
C:\Users\your-username.env - Linux/Mac:
/home/your-username/.envor~/.env
- Windows:
- This is picked up automatically by the CLI if you use
dotenv.
If You Cloned the Repository (Locally):
- Create a
.envfile 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.
Explore mycli --help for all options and details.
mycli greetβ Show a custom banner and welcomemycli timeβ Display the current timemycli quoteβ Get motivational quotesmycli initβ Initialize new CLI configs/projectsmycli configβ Edit/view CLI configmycli jokeβ Print a random jokemycli aiβ Ask AI for code helpmycli githubβ Interact with GitHubmycli todoβ Manage TODOsmycli secretβ Encrypt/decrypt secretsmycli lintβ JavaScript lintingmycli auditβ Security checks
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
Feel free to fork, submit PRs, or open issues for bugs/feature requests!
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