km-musthaq 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env ADDED
@@ -0,0 +1 @@
1
+ FORMSPREE_ENDPOINT="https://formspree.io/f/xvzbaeqk"
package/.env.example ADDED
@@ -0,0 +1 @@
1
+ FORMSPREE_ENDPOINT="https://formspree.io/f/xvzbaeqk"
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # km.musthaq CLI Portfolio 🚀
2
+
3
+ A professional animated interactive terminal portfolio CLI tool.
4
+
5
+ ![Portfolio Preview](https://via.placeholder.com/800x400?text=Terminal+Portfolio+Preview)
6
+
7
+ ## ✨ Features
8
+
9
+ - 🎨 **Hacker Theme**: Authentic terminal experience with green text and black background.
10
+ - 🔄 **Interactive**: Navigate through `about`, `projects`, `skills`, and more.
11
+ - 📧 **Contact Form**: Send messages directly from the terminal.
12
+ - ⚡ **Animations**: Smooth typing effects and loading spinners.
13
+ - 🛠 **Customizable**: Easy to modify content and extend commands.
14
+
15
+ ## 🚀 Usage
16
+
17
+ Run the portfolio directly using `npx`:
18
+
19
+ ```bash
20
+ npx km.musthaq
21
+ ```
22
+
23
+ Or install globally:
24
+
25
+ ```bash
26
+ npm install -g km.musthaq
27
+ km.musthaq
28
+ ```
29
+
30
+ ## 🛠 Installation for Development
31
+
32
+ 1. Clone the repository:
33
+ ```bash
34
+ git clone https://github.com/yourusername/km-musthaq.git
35
+ cd km-musthaq
36
+ ```
37
+
38
+ 2. Install dependencies:
39
+ ```bash
40
+ npm install
41
+ ```
42
+
43
+ 3. Run locally:
44
+ ```bash
45
+ node bin/index.js
46
+ ```
47
+ OR
48
+ ```bash
49
+ npm link
50
+ km.musthaq
51
+ ```
52
+
53
+ ## 📧 Configuration
54
+
55
+ To enable the contact form sending feature, create a `.env` file in the root directory:
56
+
57
+ ```env
58
+ FORMSPREE_ENDPOINT=https://formspree.io/f/your-form-id
59
+ ```
60
+
61
+ > **Note**: You can get your Form Endpoint from [Formspree](https://formspree.io/).
62
+ >
63
+ > **Fallback**: If the endpoint is not configured, messages will be saved locally to `messages.log` in the project directory.
64
+
65
+ ## 📦 Publishing to npm
66
+
67
+ 1. Login to npm:
68
+ ```bash
69
+ npm login
70
+ ```
71
+
72
+ 2. Publish:
73
+ ```bash
74
+ npm publish
75
+ ```
76
+
77
+ ## 📝 Commands
78
+
79
+ - `help`: List available commands
80
+ - `about`: Display bio
81
+ - `projects`: Show portfolio projects
82
+ - `skills`: Display skill proficiency
83
+ - `contact`: Send an email
84
+ - `education`: Show educational background
85
+ - `certifications`: List certifications
86
+ - `leadership`: Show leadership roles
87
+ - `neofetch`: Display fake system info
88
+ - `sudo`: Try it and see 😉
89
+ - `clear`: Clear the screen
90
+ - `hire`: Open collaboration channel
91
+
92
+ ## 📄 License
93
+
94
+ MIT
package/bin/index.js ADDED
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env node
2
+
3
+ const inquirer = require('inquirer');
4
+ const clear = require('clear');
5
+ const chalk = require('chalk');
6
+ const { showBanner, createBox, printGreen } = require('../lib/ui');
7
+ const { sleep, typeText } = require('../lib/animations');
8
+ const commands = require('../lib/commands');
9
+ const ora = require('ora');
10
+
11
+ process.on('SIGINT', () => {
12
+ console.log(chalk.green('\nGoodbye!'));
13
+ process.exit(0);
14
+ });
15
+
16
+ const start = async () => {
17
+ clear();
18
+ const spinner = ora('Initializing Musthaq Portfolio...').start();
19
+ await sleep(1500);
20
+ spinner.text = 'Loading modules...';
21
+ await sleep(1000);
22
+ spinner.succeed('Access Granted ✔');
23
+
24
+ await showBanner();
25
+
26
+ await typeText('Welcome to the interactive portfolio of Musthaq.', 30);
27
+ console.log(chalk.gray('Type "help" to see available commands.'));
28
+
29
+ // Initial prompt
30
+ ask();
31
+ };
32
+
33
+ const ask = async () => {
34
+ const { command } = await inquirer.prompt([
35
+ {
36
+ type: 'input',
37
+ name: 'command',
38
+ message: 'km.musthaq$:',
39
+ prefix: '',
40
+ suffix: '',
41
+ validate: (val) => val ? true : 'Please enter a command'
42
+ }
43
+ ]);
44
+
45
+ const cmd = command.trim().toLowerCase();
46
+
47
+ if (cmd === 'exit' || cmd === 'quit' || cmd === 'exit()') {
48
+ console.log(chalk.green('Goodbye!'));
49
+ process.exit(0);
50
+ }
51
+
52
+ if (commands[cmd]) {
53
+ await commands[cmd]();
54
+ } else {
55
+ console.log(chalk.red(`Command not found: ${cmd}`));
56
+ console.log(chalk.gray('Type "help" for a list of commands.'));
57
+ }
58
+
59
+ // Loop
60
+ ask();
61
+ };
62
+
63
+ start();
@@ -0,0 +1,11 @@
1
+ const sleep = (ms = 100) => new Promise((r) => setTimeout(r, ms));
2
+
3
+ const typeText = async (text, delay = 50) => {
4
+ for (const char of text) {
5
+ process.stdout.write(char);
6
+ await sleep(delay);
7
+ }
8
+ process.stdout.write('\n');
9
+ };
10
+
11
+ module.exports = { sleep, typeText };
@@ -0,0 +1,124 @@
1
+ const chalk = require('chalk');
2
+ const open = require('open');
3
+ const { contact } = require('./contact');
4
+ const { createBox, printGreen } = require('./ui');
5
+ const { typeText, sleep } = require('./animations');
6
+ const clear = require('clear');
7
+
8
+ const commands = {
9
+ help: () => {
10
+ console.log(
11
+ chalk.green(
12
+ 'Available commands: help | about | projects | skills | contact | education | certifications | leadership | neofetch | sudo | clear | hire'
13
+ )
14
+ );
15
+ },
16
+ about: async () => {
17
+ console.log(
18
+ createBox(
19
+ chalk.white(
20
+ 'AI Enthusiast\nFull Stack Developer\nFocused on automation & security'
21
+ ),
22
+ 'About Me'
23
+ )
24
+ );
25
+ },
26
+ projects: async () => {
27
+ console.log(chalk.bold.green('Projects:'));
28
+ const projects = [
29
+ '• Phishing URL Detection – Built a machine learning model to classify phishing websites using URL-based feature extraction and Random Forest classifier. [GitHub]',
30
+ '• Handwritten Digit Recognition – Developed a model to classify handwritten digits using image processing. [GitHub]',
31
+ '• Portfolio Terminal Interface',
32
+ ];
33
+ for (const project of projects) {
34
+ await typeText(project, 20);
35
+ }
36
+ },
37
+ skills: async () => {
38
+ console.log(chalk.bold.green('Skills:'));
39
+ const skillCategories = [
40
+ '• Programming Languages: Python',
41
+ '• Web Development: React.js, React Native, HTML5, CSS3, JavaScript, Tailwind CSS',
42
+ '• Machine Learning & AI: TensorFlow, Scikit-learn, Machine Learning',
43
+ '• Database Management: MySQL, PostgreSQL',
44
+ ];
45
+
46
+ for (const skill of skillCategories) {
47
+ await typeText(skill, 20);
48
+ }
49
+ },
50
+ education: () => {
51
+ console.log(createBox(chalk.white('BCA Graduate\nBearys Institute of Emerging Science'), 'Education'));
52
+ },
53
+ certifications: () => {
54
+ console.log(createBox(chalk.white(
55
+ '• Foundation of Cyber Security: Gained essential knowledge of cybersecurity principles.\n' +
56
+ '• Play it Safe: Manage Security Risks: Acquired skills to identify and mitigate risks.\n' +
57
+ '• EyeQ Dot Net Webinar (Feb 2024): Cybersecurity webinar by leading company.\n' +
58
+ '• 2nd Place in Idea Pitching (Feb 2025): "SenseIT" by IEEE Student Branch.'
59
+ ), 'Certifications & Achievements'));
60
+ },
61
+ leadership: () => {
62
+ console.log(createBox(chalk.white(
63
+ '• 🔒 Reliable and Disciplined\n' +
64
+ '• 🤐 Lead Silently, Act Strongly\n' +
65
+ '• 🧑💻 Technical Role Model\n' +
66
+ '• 💬 Supportive in One-on-One'
67
+ ), 'Leadership Style'));
68
+ },
69
+ neofetch: () => {
70
+ const art = `
71
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
72
+ @@@@@@@#BGGB&@@@@@@@@&G555G#@@@@@@@&BBGB#&@@@@@@@@
73
+ @@@@#J^. :!P@@@@G!. .~5@@@GJ?7777??5#@@@@@@
74
+ @@@G: 7@@Y !@G77???????7?G@@@@@
75
+ @@@^ 5&. P@??????????7?&@@@@
76
+ @@@^ 5# B@??????????7J@@@@@
77
+ @@@G: ?@7 .5@P7?77??????J#@@@@@
78
+ @@@@&Y~:. .^7GB~ .:^~^^!YBGJ77?5G#&&&&&@@@@@@@
79
+ @@@@@@#GPPPPPY~ :JPGGGGGP5Y?77?P&&G5YJJY5G#@@@@@
80
+ @@@&Y~...:.. ?&BY??777777?7Y&@5?77777777?5&@@@
81
+ @@#^ !@577????????7J&@57??????????7Y@@@
82
+ @@? Y#7??????????7G@&????????????7?&@@
83
+ @@J ?@J7????????77#@@5?7????????7JP@@@
84
+ @@&! .P&Y?7777777JG@@@@#Y7???????P&@@@@
85
+ @@@@P!:..... 7B#G5YY5PB&@@@@@@@Y7????7P@@@@@@
86
+ @@@@@@#PYYYYY?^ .~?5PGB&@@@@@@@@@G7????7#@@@@@@
87
+ @@@@B7:. .:!55: .~Y&@@@@@@57????7P@@@@@@
88
+ @@@5. 7B: ^#@@@&57???????5&@@@@
89
+ @@&: P5 7@@P?7????????7?5&@@
90
+ @@&^ G5 ?@@J7??????????7J@@@
91
+ @@@B: J@#~ ~&@@#J77??????77J#@@@
92
+ @@@@&5!:....^?B@@@@5!:. .:!5@@@@@@@BYJ????JYG@@@@
93
+ @@@@@@@&#B#&@@@@@@@@@&#BB#&@@@@@@@@@@@&##&@@@@@@@@
94
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`;
95
+
96
+ const info = `
97
+ Musthaq OS v1.0
98
+ -----------------
99
+ ~ core.modules: Cybersecurity, AI/ML, Full Stack
100
+ ~ sys.tools: Python, React, Node.js, Linux
101
+ ~ exec.tasks: Building Secure AI Systems
102
+ ~ focus.targets: Automation & Innovation
103
+ ~ shell.env: zsh / km-musthaq-cli
104
+ ~ cpu.mode: 100% Dedicated to Code
105
+ ~ gpu.driver: Neural Engine Active
106
+ ~ mem.status: Overflowing with Ideas`;
107
+
108
+ console.log(chalk.green(art));
109
+ console.log(chalk.cyan(info));
110
+ },
111
+ sudo: async () => {
112
+ await typeText('Hi I am Musthaq Ahmed a Cybersecurity & AI/ML Enthusiast', 50);
113
+ },
114
+ clear: () => {
115
+ clear();
116
+ },
117
+ hire: async () => {
118
+ console.log(chalk.green('Smart decision detected.\nOpening collaboration channel...\nLet\'s build something legendary.'));
119
+ // open('mailto:musthaqahmead@gmail.com'); // Optional: open email client
120
+ },
121
+ contact: contact
122
+ };
123
+
124
+ module.exports = commands;
package/lib/contact.js ADDED
@@ -0,0 +1,71 @@
1
+ const inquirer = require('inquirer');
2
+ const axios = require('axios');
3
+ const ora = require('ora');
4
+ const chalk = require('chalk');
5
+ const { sleep } = require('./animations');
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+ require('dotenv').config();
9
+
10
+ const contact = async () => {
11
+ const answers = await inquirer.prompt([
12
+ {
13
+ type: 'input',
14
+ name: 'name',
15
+ message: 'Name:',
16
+ validate: (input) => (input ? true : 'Name is required'),
17
+ },
18
+ {
19
+ type: 'input',
20
+ name: 'email',
21
+ message: 'Email:',
22
+ validate: (input) =>
23
+ /\S+@\S+\.\S+/.test(input) ? true : 'Please enter a valid email',
24
+ },
25
+ {
26
+ type: 'input',
27
+ name: 'message',
28
+ message: 'Message:',
29
+ validate: (input) => (input ? true : 'Message is required'),
30
+ },
31
+ ]);
32
+
33
+ const spinner = ora('Sending message via Formspree...').start();
34
+ await sleep(1000); // Simulate network delay
35
+
36
+ const endpoint = process.env.FORMSPREE_ENDPOINT;
37
+
38
+ try {
39
+ if (endpoint) {
40
+ await axios.post(endpoint, {
41
+ name: answers.name,
42
+ email: answers.email,
43
+ message: answers.message
44
+ });
45
+ spinner.succeed(chalk.green('Message sent successfully via email ✔'));
46
+ console.log(chalk.green('Musthaq will contact you soon.'));
47
+ } else {
48
+ // Mock send + Local Save
49
+ spinner.warn(chalk.yellow('Formspree Endpoint not found in .env'));
50
+
51
+ const logPath = path.join(process.cwd(), 'messages.log');
52
+ const logEntry = `\n--- [${new Date().toISOString()}] (MOCK/NO-ENDPOINT) ---\nName: ${answers.name}\nEmail: ${answers.email}\nMessage: ${answers.message}\n`;
53
+
54
+ fs.appendFileSync(logPath, logEntry);
55
+
56
+ spinner.succeed(chalk.green(`Message saved locally to ${logPath} ✔`));
57
+ console.log(chalk.cyan('Since Formspree is not configured, I saved your message to a file!'));
58
+ console.log(chalk.gray('Tip: Configure FORMSPREE_ENDPOINT in .env to enable real emailing.'));
59
+ }
60
+
61
+ } catch (error) {
62
+ spinner.fail(chalk.red('Failed to send message via Formspree.'));
63
+ // Fallback save
64
+ const logPath = path.join(process.cwd(), 'messages.log');
65
+ const logEntry = `\n--- [${new Date().toISOString()}] (FAILED FORMSPREE) ---\nName: ${answers.name}\nEmail: ${answers.email}\nMessage: ${answers.message}\nError: ${error.message}\n`;
66
+ fs.appendFileSync(logPath, logEntry);
67
+ console.log(chalk.yellow(`Saved to ${logPath} instead.`));
68
+ }
69
+ };
70
+
71
+ module.exports = { contact };
package/lib/ui.js ADDED
@@ -0,0 +1,34 @@
1
+ const figlet = require('figlet');
2
+ const gradient = require('gradient-string');
3
+ const boxen = require('boxen');
4
+ const chalk = require('chalk');
5
+
6
+ const showBanner = () => {
7
+ return new Promise((resolve, reject) => {
8
+ figlet('Musthaq', (err, data) => {
9
+ if (err) {
10
+ console.log('Something went wrong...');
11
+ console.dir(err);
12
+ reject(err);
13
+ return;
14
+ }
15
+ console.log(gradient.pastel.multiline(data));
16
+ resolve();
17
+ });
18
+ });
19
+ };
20
+
21
+ const createBox = (text, title = '') => {
22
+ return boxen(text, {
23
+ padding: 1,
24
+ margin: 1,
25
+ borderStyle: 'round',
26
+ borderColor: 'green',
27
+ title: title,
28
+ titleAlignment: 'center',
29
+ });
30
+ };
31
+
32
+ const printGreen = (text) => console.log(chalk.green(text));
33
+
34
+ module.exports = { showBanner, createBox, printGreen };
package/messages.log ADDED
@@ -0,0 +1,15 @@
1
+
2
+ --- [2026-02-16T05:37:51.614Z] ---
3
+ Name: adler
4
+ Email: musthaqibnmohammad@gmail.com
5
+ Message: hey
6
+
7
+ --- [2026-02-16T05:52:53.441Z] (MOCK/NO-ENDPOINT) ---
8
+ Name: musthaq
9
+ Email: musthaqibnmohammad@gmail.com
10
+ Message: hey
11
+
12
+ --- [2026-02-16T05:53:49.595Z] (MOCK/NO-ENDPOINT) ---
13
+ Name: musthaq
14
+ Email: musthaqibnmohammad@gmail.com
15
+ Message: hey
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "km-musthaq",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "bin/index.js",
6
+ "bin": {
7
+ "km-musthaq": "bin/index.js"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "keywords": [],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "type": "commonjs",
16
+ "dependencies": {
17
+ "axios": "^1.13.5",
18
+ "boxen": "^5.1.2",
19
+ "chalk": "^4.1.2",
20
+ "clear": "^0.1.0",
21
+ "dotenv": "^10.0.0",
22
+ "figlet": "^1.5.0",
23
+ "gradient-string": "^2.0.0",
24
+ "inquirer": "^8.0.0",
25
+ "open": "^8.4.0",
26
+ "ora": "^5.4.1"
27
+ }
28
+ }