ritik 0.0.16 → 0.0.18

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/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # NPX Ritik
2
+
3
+ ![CLI Portfolio Demo](./demo.png)
4
+
5
+ ## Overview
6
+
7
+ A Node.js based CLI portfolio published as an npm package and executed via npx. Instead of serving static HTML, it runs as a command line utility that renders professional profile information directly in the terminal.
8
+
9
+ The tool fetches data dynamically at runtime, ensuring roles, social links, and contact details stay in sync with the source of truth. It is built to feel native to the shell, using a structured, box-style TUI layout that fits naturally into a developer’s workflow.
10
+
11
+ ## Usage
12
+
13
+ To check it out, just pop this into your terminal:
14
+
15
+ ```bash
16
+ npx ritik
17
+ ```
18
+
19
+ ---
20
+
21
+ <div align="center">
22
+
23
+ **Open Source & Built in Public**
24
+ <br>
25
+ Feel free to explore the code, fork it, or even suggest an edit
26
+ <br>
27
+ <i>If you appreciate this CLI first approach, a star on GitHub is always welcome</i>
28
+
29
+ </div>
package/demo.png ADDED
Binary file
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import d from"ora";import u from"boxen";import o from"chalk";import{select as g}from"@inquirer/prompts";import s from"open";const c=22,m=52,p=c+m+2,f={facebook:o.hex("#3b5998"),twitter:o.hex("#1DA1F2"),linkedin:o.hex("#0077B5"),github:o.hex("#666666"),instagram:o.hex("#fb3958"),website:o.hex("#f1c40f"),email:o.hex("#f39c12"),npx:o.hex("#cb3837")},a=(e,t,i)=>(f[e]||o.white).dim.bgWhite.inverse(`${t.padStart(c," ")}: ${i.padEnd(m," ")}`),b=e=>e.charAt(0).toUpperCase()+e.slice(1),l=(e,t=" ")=>e.padStart(e.length+Math.floor((p-e.length)/2),t).padEnd(p,t),y=[`Tip: Try ${o.cyanBright.bold("cmd/ctrl + click")} on the links above`,null].join(`
3
- `),w=["I am actively seeking new opportunities and welcome any inquiries","Please feel free to contact me for questions or casual greetings","I will make every effort to respond promptly","My inbox remains open for your correspondence."];function x(e){const t=e.personal.name.split(" ")?.[0],i=`https://${e.personal.displayEmail.replace(/.*@/,"")}`,n=[null,o.bold.cyanBright(l(e.personal.name)),o.whiteBright(l(e.personal.currentRole)),null];e.socialHandles.forEach(r=>{n.push(a(r.platform,b(r.platform),`${r.url}/${r.handle}`))}),n.push(a("website","Portfolio",i)),n.push(a("npx","Npx",`npx ${t.toLowerCase()}`)),n.push(null),w.forEach(r=>{n.push(o.italic.whiteBright(l(r)))}),n.push(null);const h=u(n.join(`
4
- `),{margin:1,float:"center",borderStyle:"single",borderColor:"cyan"});console.log(h),console.log(y)}var $=(e=>(e.EMAIL="email",e.RESUME="resume",e.MEETING="meeting",e.EXIT="exit",e))($||{});const E=[{name:`Send me an ${o.cyanBright.bold("email")}?`,value:"email",description:o.white.dim.bold(`
5
- Send a message \u2014 I promise low-latency replies.`)},{name:`Checkout my ${o.magentaBright.bold("Resume")}?`,value:"resume",description:o.white.dim.bold(`
6
- Pulling the latest version of my resume from production.`)},{name:`Schedule a ${o.yellowBright.bold("Meeting")}?`,value:"meeting",description:o.white.dim.bold(`
7
- Scheduling a sync \u2014 adding coffee to the calendar... \u2615`)},{name:"Exit.",value:"exit",description:o.white.dim.bold(`
8
- Ending session, but not the connection.`)}];function k(e){const t=e.personal.name.split(" ")?.[0],i={email:()=>{s(`mailto:${e.personal.displayEmail}?subject=Hi%20${t}!`),console.log(`
2
+ import g from"ora";import t from"chalk";import f from"boxen";import{select as y}from"@inquirer/prompts";import s from"open";var b="0.0.18";const c=22,m=52,p=c+m+2,a=(e,o,i)=>t.hex(i).dim.bgWhite.inverse(`${e.padStart(c," ")}: ${o.padEnd(m," ")}`),w=e=>e.charAt(0).toUpperCase()+e.slice(1),l=(e,o=" ")=>e.padStart(e.length+Math.floor((p-e.length)/2),o).padEnd(p,o),$=[`Tip: Try ${t.cyanBright.bold("cmd/ctrl + click")} on the links above`,null].join(`
3
+ `),E=["I am actively seeking new opportunities and welcome any inquiries","Please feel free to contact me for questions or casual greetings","I will make every effort to respond promptly","My inbox remains open for your correspondence."];function v(e){const o=e.personal.name.split(" ")?.[0],i=`https://${e.personal.displayEmail.replace(/.*@/,"")}`,n=[null,t.bold.cyanBright(l(e.personal.name)),t.whiteBright(l(e.personal.currentRole)),null],d={github:"#666666",x:"#1DA1F2"};e.socialHandles.forEach(r=>{const h=d[r.platform]||r.color;n.push(a(w(r.platform),`${r.url}/${r.handle}`,h))}),n.push(a("Portfolio",i,"#f1c40f")),n.push(a("Npx",`npx ${o.toLowerCase()}`,"#cb3837")),n.push(null),E.forEach(r=>{n.push(t.italic.whiteBright(l(r)))}),n.push(null);const u=f(n.join(`
4
+ `),{margin:1,float:"center",borderStyle:"single",borderColor:"cyan"});console.log(u),console.log($)}var k=(e=>(e.EMAIL="email",e.RESUME="resume",e.MEETING="meeting",e.EXIT="exit",e))(k||{});const x=[{name:`Send me an ${t.cyanBright.bold("email")}?`,value:"email",description:t.white.dim.bold(`
5
+ Send a message \u2014 I promise low-latency replies.`)},{name:`Checkout my ${t.magentaBright.bold("Resume")}?`,value:"resume",description:t.white.dim.bold(`
6
+ Pulling the latest version of my resume from production.`)},{name:`Schedule a ${t.yellowBright.bold("Meeting")}?`,value:"meeting",description:t.white.dim.bold(`
7
+ Scheduling a sync \u2014 adding coffee to the calendar... \u2615`)},{name:"Exit.",value:"exit",description:t.white.dim.bold(`
8
+ Ending session, but not the connection.`)}];function S(e){const o=e.personal.name.split(" ")?.[0],i={email:()=>{s(`mailto:${e.personal.displayEmail}?subject=Hi%20${o}!`),console.log(`
9
9
 
10
10
  Email launched \u2014 preparing witty yet professional response.
11
11
  `)},resume:()=>{s("https://cv.ritik.me"),console.log(`
@@ -17,6 +17,6 @@ Meeting scheduled \u2014 time to build something great together.
17
17
  `)},exit:()=>{console.log(`
18
18
 
19
19
  Session ended \u2014 but DMs are always open.
20
- `)}};g({message:"Choose an Action",choices:E}).then(n=>i[n]())}const v=async()=>{console.clear();const e=d("Fetching profile data...").start();try{const t=await fetch("https://raw.githubusercontent.com/itzzritik/ItzzRitik/main/profile/profile.json");if(!t.ok)throw new Error(`Failed to fetch profile: ${t.statusText}`);const i=await t.json();e.succeed("Profile loaded successfully"),x(i),k(i)}catch(t){e.fail("Failed to load profile"),t instanceof Error?console.error(`
21
- Error: ${t.message}`):console.error(`
22
- An unknown error occurred.`),process.exit(1)}};v();
20
+ `)}};y({message:"Choose an Action",choices:x}).then(n=>i[n]())}const B=async()=>{console.clear();const e=g("Fetching profile data...").start();try{const o=await fetch("https://raw.githubusercontent.com/itzzritik/ItzzRitik/main/profile/profile.json");if(!o.ok)throw new Error(`Failed to fetch profile: ${o.statusText}`);const i=await o.json();e.succeed(`Profile loaded (${t.dim(`v${b}`)})`),v(i),S(i)}catch(o){e.fail("Failed to load profile"),o instanceof Error?console.error(`
21
+ Error: ${o.message}`):console.error(`
22
+ An unknown error occurred.`),process.exit(1)}};B();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ritik",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "description": "CLI Portfolio",
6
6
  "main": "dist/index.js",
@@ -24,6 +24,7 @@
24
24
  "ora": "^9.0.0"
25
25
  },
26
26
  "devDependencies": {
27
+ "@rollup/plugin-json": "^6.1.0",
27
28
  "@types/node": "^25.0.9",
28
29
  "@typescript-eslint/eslint-plugin": "^8.53.0",
29
30
  "@typescript-eslint/parser": "^8.53.0",
@@ -40,7 +41,8 @@
40
41
  "registry": "https://registry.npmjs.org/"
41
42
  },
42
43
  "files": [
43
- "dist"
44
+ "dist",
45
+ "demo.png"
44
46
  ],
45
47
  "repository": {
46
48
  "type": "git",