{"_id":"exec-cute","_rev":"7-7bad551ca17c3957d560a7a417b891ec","name":"exec-cute","dist-tags":{"latest":"2.0.5"},"versions":{"1.0.1":{"name":"exec-cute","version":"1.0.1","keywords":["exec","spawn","shell","child_process","command","bash","promise","asynchronous","terminal"],"author":{"name":"hrach347"},"license":"MIT","_id":"exec-cute@1.0.1","maintainers":[{"name":"hrach347","email":"hrachpapyan347@gmail.com"}],"homepage":"https://github.com/hrach347/exec-cute#readme","bugs":{"url":"https://github.com/hrach347/exec-cute/issues"},"dist":{"shasum":"11d92ae74868b636ce5c4fe5d4eeeacb290e1b3f","tarball":"https://registry.npmjs.org/exec-cute/-/exec-cute-1.0.1.tgz","fileCount":4,"integrity":"sha512-D/TZf2aFKwHrwmscZYmMwBnd87MOy5khCpA+WE79xuGo5TLBSNJosI3rZoWEKN7EAHGs2Y1LePoStYSOtPcbsA==","signatures":[{"sig":"MEUCID+TgkNYKMtCaEM8gq9v24EVhM5Q+Jo1wxwRcYKT4xcIAiEApe0dDpkXwriZ70UC29EhrsqEgC6/7wIhTwMCLHJu2u0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9213},"main":"src/index.js","type":"module","engines":{"node":">=18"},"scripts":{"lint":"eslint .","test":"node --test"},"_npmUser":{"name":"hrach347","email":"hrachpapyan347@gmail.com"},"repository":{"url":"git+https://github.com/hrach347/exec-cute.git","type":"git"},"_npmVersion":"9.2.0","description":"Execute shell commands in Node.js with a clean, promise-based API, real-time streaming, and optional fun mode with emojis and colored output.","directories":{},"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/exec-cute_1.0.1_1773663253909_0.9561843866692417","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"exec-cute","version":"2.0.0","keywords":["exec","spawn","shell","child_process","command","bash","promise","asynchronous","terminal"],"author":{"name":"hrach347"},"license":"MIT","_id":"exec-cute@2.0.0","maintainers":[{"name":"hrach347","email":"hrachpapyan347@gmail.com"}],"homepage":"https://github.com/hrach347/exec-cute#readme","bugs":{"url":"https://github.com/hrach347/exec-cute/issues"},"dist":{"shasum":"11711d1273592808bfd7ddeca945d87aaac4b444","tarball":"https://registry.npmjs.org/exec-cute/-/exec-cute-2.0.0.tgz","fileCount":5,"integrity":"sha512-AOO7rMHqiolommC73Vk8AWphTsfoTIzqaBsz4lHIppQgkJXmfFHdkHcF+0Rrmmaw2DUsVYtsqxw9LYILwWo6cQ==","signatures":[{"sig":"MEUCIEjP2QlGx12GOGFkfoNj6CYQwxIQNFFXOS9o2OI71h/mAiEA3CUAn9rwuFytfdouIJsp78BW5ECM0p4gINbo8Ajb9jk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10442},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"682bb72cbbdba22031ff4408a539b899530d35b8","scripts":{"lint":"eslint .","test":"node --test","build":"tsc"},"_npmUser":{"name":"hrach347","email":"hrachpapyan347@gmail.com"},"repository":{"url":"git+https://github.com/hrach347/exec-cute.git","type":"git"},"_npmVersion":"9.2.0","description":"Execute shell commands in Node.js with a clean, promise-based API, real-time streaming, and optional fun mode with emojis and colored output.","directories":{},"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.12","typescript":"^7.0.2","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/exec-cute_2.0.0_1787041983085_0.6350907515321302","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"exec-cute","version":"2.0.1","keywords":["exec","spawn","shell","child_process","command","bash","promise","asynchronous","terminal"],"author":{"name":"hrach347"},"license":"MIT","_id":"exec-cute@2.0.1","maintainers":[{"name":"hrach347","email":"hrachpapyan347@gmail.com"}],"homepage":"https://github.com/hrach347/exec-cute#readme","bugs":{"url":"https://github.com/hrach347/exec-cute/issues"},"dist":{"shasum":"1f6541bfe49680610ddba0198e6fcfdfd7fd8c71","tarball":"https://registry.npmjs.org/exec-cute/-/exec-cute-2.0.1.tgz","fileCount":13,"integrity":"sha512-YUxsQIwen3EtPxcL5bS/IIVwhxkKHpKnjk/fEZWx7Gb6HYYMrR03rHvVlM+gwtzjKgt0aqdWXrw5NFQ1QAHagw==","signatures":[{"sig":"MEQCIB6K74Halp40H9x+ibRhLzefER/vuQDLU4fdkfh8x15fAiB6/G6yM4kX9MPIFd+GnRtx/5A0uG7MYx9o/+F5DtjUdg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18717},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"8f2481df91a9c25c493eeb50bce16d5dfed3e10f","scripts":{"lint":"eslint .","test":"node --test","build":"tsc"},"_npmUser":{"name":"hrach347","email":"hrachpapyan347@gmail.com"},"repository":{"url":"git+https://github.com/hrach347/exec-cute.git","type":"git"},"_npmVersion":"9.2.0","description":"Execute shell commands in Node.js with a clean, promise-based API, real-time streaming, and optional fun mode with emojis and colored output.","directories":{},"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.12","typescript":"^7.0.2","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/exec-cute_2.0.1_1787042201098_0.9176901676900426","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"exec-cute","version":"2.0.2","keywords":["exec","spawn","shell","child_process","command","bash","promise","asynchronous","terminal"],"author":{"name":"hrach347"},"license":"MIT","_id":"exec-cute@2.0.2","maintainers":[{"name":"hrach347","email":"hrachpapyan347@gmail.com"}],"homepage":"https://github.com/hrach347/exec-cute#readme","bugs":{"url":"https://github.com/hrach347/exec-cute/issues"},"dist":{"shasum":"703dcd7e921700069ea86d87bd95e0cdb70afe9d","tarball":"https://registry.npmjs.org/exec-cute/-/exec-cute-2.0.2.tgz","fileCount":13,"integrity":"sha512-EB0vr3foKGsFSxVI8xmYe6GQ2jyXpChXo/fm9/IcEbkMsEHNhV1qTw4zz56mj+BXYOgRbgtoarpLmNIN51aIXA==","signatures":[{"sig":"MEUCIQDd4zpXtLafsV+fa9oP2VeWnxWxvqzafKt9RiASCDzcqwIgCuc5ElB2DDXfc50pJv0rnOAM9AKbYGehn1Vq3tB/nxQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18717},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"d7da06d1b5e5fd0da7ebc369b05c181d12b9da6b","scripts":{"lint":"eslint .","test":"node --test","build":"tsc"},"_npmUser":{"name":"hrach347","email":"hrachpapyan347@gmail.com"},"repository":{"url":"git+https://github.com/hrach347/exec-cute.git","type":"git"},"_npmVersion":"9.2.0","description":"Execute shell commands in Node.js with a clean, promise-based API, real-time streaming, and optional fun mode with emojis and colored output.","directories":{},"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.12","typescript":"^7.0.2","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/exec-cute_2.0.2_1787042362031_0.3026170681636906","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"exec-cute","version":"2.0.3","keywords":["exec","spawn","shell","child_process","command","bash","promise","asynchronous","terminal"],"author":{"name":"hrach347"},"license":"MIT","_id":"exec-cute@2.0.3","maintainers":[{"name":"hrach347","email":"hrachpapyan347@gmail.com"}],"homepage":"https://github.com/hrach347/exec-cute#readme","bugs":{"url":"https://github.com/hrach347/exec-cute/issues"},"dist":{"shasum":"085586e887dc650e7bf1a52ca1b4be5bbf22fe48","tarball":"https://registry.npmjs.org/exec-cute/-/exec-cute-2.0.3.tgz","fileCount":13,"integrity":"sha512-H1ixPJ7c3HqLsCDbBeIM/CNFI6yIe4bxN/0MW8Ts1G3NdqYoTP8EnSiSue9a3QzrkcHC2ZeMtTbh2dDpz4Txww==","signatures":[{"sig":"MEUCIBe/DaY4ICA2//kU000OaTInQvnyPUjfrlABC4whlxnbAiEAh7jRHdAc1xDdTY1J1Xl+NgF7oiJf23FBlkc6c6elNn4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18753},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"22978c9611afcd37584306ddf162f7dc363a123e","scripts":{"lint":"eslint .","test":"node --test","build":"tsc"},"_npmUser":{"name":"hrach347","email":"hrachpapyan347@gmail.com"},"repository":{"url":"git+https://github.com/hrach347/exec-cute.git","type":"git"},"_npmVersion":"9.2.0","description":"Execute shell commands in Node.js with a clean, promise-based API, real-time streaming, and optional fun mode with emojis and colored output.","directories":{},"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.12","typescript":"^7.0.2","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/exec-cute_2.0.3_1787214249237_0.850710395316004","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"exec-cute","version":"2.0.4","keywords":["exec","spawn","shell","child_process","command","bash","promise","asynchronous","terminal"],"author":{"name":"hrach347"},"license":"MIT","_id":"exec-cute@2.0.4","maintainers":[{"name":"hrach347","email":"hrachpapyan347@gmail.com"}],"homepage":"https://github.com/hrach347/exec-cute#readme","bugs":{"url":"https://github.com/hrach347/exec-cute/issues"},"dist":{"shasum":"d720c6f7727013d424da5df5de46cfc1785a1a17","tarball":"https://registry.npmjs.org/exec-cute/-/exec-cute-2.0.4.tgz","fileCount":13,"integrity":"sha512-OQwRuwoESNyQ/t9N/vDY1AOruW/5/w+ULtdqushWm0AGor9Iae6gq0/wSaROxgA4FeR85J+1+wYhGr4joi7LEg==","signatures":[{"sig":"MEQCIEiXMFukNPwO7XgwFrnRue8GKrHfr4I7KBqoqX0G2SRKAiBgZ8Kxx5UktN0L9/nJePacRO5vElGwVXL1ohgcDWCzvA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18860},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"d3ec606ac52e7ebcc1de024655d905991162cf0f","scripts":{"lint":"eslint .","test":"node --test","build":"tsc"},"_npmUser":{"name":"hrach347","email":"hrachpapyan347@gmail.com"},"repository":{"url":"git+https://github.com/hrach347/exec-cute.git","type":"git"},"_npmVersion":"9.2.0","description":"Execute shell commands in Node.js with a clean, promise-based API, real-time streaming, and optional fun mode with emojis and colored output.","directories":{},"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.12","typescript":"^7.0.2","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/exec-cute_2.0.4_1787221668786_0.09425533261125052","host":"s3://npm-registry-packages-npm-production"}},"2.0.5":{"name":"exec-cute","version":"2.0.5","description":"Execute shell commands in Node.js with a clean, promise-based API, real-time streaming, and optional fun mode with emojis and colored output.","author":{"name":"hrach347"},"type":"module","main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18"},"keywords":["exec","spawn","shell","child_process","command","bash","promise","asynchronous","terminal"],"repository":{"type":"git","url":"git+https://github.com/hrach347/exec-cute.git"},"scripts":{"test":"node --test","build":"tsc","lint":"eslint ."},"license":"MIT","devDependencies":{"@types/node":"^26.2.0","tsx":"^4.23.12","typescript":"^7.0.2"},"gitHead":"68dbcf8263e7b72583ab7050d9b94921ac653fe9","bugs":{"url":"https://github.com/hrach347/exec-cute/issues"},"homepage":"https://github.com/hrach347/exec-cute#readme","_id":"exec-cute@2.0.5","_nodeVersion":"20.19.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-ilYudi7hi70wI7sdPnJuJF6dy4Rm8VjpOsy/A9ldKwrE3N9ijiMy4rVplS+Yg+dMTbvm5oCiGVH0O3JgV0ke4w==","shasum":"dab5deebd46638e92831a08f37590846cc39080b","tarball":"https://registry.npmjs.org/exec-cute/-/exec-cute-2.0.5.tgz","fileCount":13,"unpackedSize":18890,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB6aad02EHdOgsGwZYOZLbTl8DZ9DlF/uNQWUzUwO+SzAiEAiLh0s+n2004cHFwhiQcaJRBr8p3y9UVpw0sukQtkknQ="}]},"_npmUser":{"name":"hrach347","email":"hrachpapyan347@gmail.com"},"directories":{},"maintainers":[{"name":"hrach347","email":"hrachpapyan347@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/exec-cute_2.0.5_1789131157435_0.6690017775481749"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T12:14:13.807Z","modified":"2026-09-11T12:52:37.697Z","1.0.1":"2026-03-16T12:14:14.066Z","2.0.0":"2026-08-18T08:33:03.229Z","2.0.1":"2026-08-18T08:36:41.237Z","2.0.2":"2026-08-18T08:39:22.182Z","2.0.3":"2026-08-20T08:24:09.378Z","2.0.4":"2026-08-20T10:27:48.925Z","2.0.5":"2026-09-11T12:52:37.569Z"},"bugs":{"url":"https://github.com/hrach347/exec-cute/issues"},"author":{"name":"hrach347"},"license":"MIT","homepage":"https://github.com/hrach347/exec-cute#readme","keywords":["exec","spawn","shell","child_process","command","bash","promise","asynchronous","terminal"],"repository":{"type":"git","url":"git+https://github.com/hrach347/exec-cute.git"},"description":"Execute shell commands in Node.js with a clean, promise-based API, real-time streaming, and optional fun mode with emojis and colored output.","maintainers":[{"name":"hrach347","email":"hrachpapyan347@gmail.com"}],"readme":"# Exec-cute\n\n**Execute** shell commands with enhanced alternatives to **exec()** and **spawn()**, offering a cleaner API, promise support, and optional fun mode.\n\n**GitHub: https://github.com/hrach347/exec-cute**\n\n## Install\n```bash\n npm install exec-cute\n```\n\n# Usage\n\n\n## run() - alternative for exec()\n```js\nimport { run } from \"exec-cute\";\n\nconst { stdout, stderr, err } = await run(\"ls -la\");\nconsole.log(\"Output:\", stdout);\n\n```\n\n### ✅ Why it’s better than exec()\n- **Promise-based API** - no callbacks or nested logic  \n- **Consistent return object** - always returns { stdout, stderr, err }  \n- **Controlled error handling** - errors don’t crash your flow, you handle them manually  \n- **Optional wait delay** - delay execution before running the command\n\n---\n\n## spawnProcess() - alternative for spawn()\n\n```js\nimport { spawnProcess } from \"exec-cute\";\n\nconst child = spawnProcess(\"ping 1.1.1.1\");\n\nchild.onData((data, stdout, stderr) => {\n  if (stdout) console.log(\"stdout:\", data);\n  if (stderr) console.error(\"stderr:\", data);\n});\n```\n\n### ✅ Why it’s better than spawn()\n- **Cleaner API** - run a full command string instead of splitting command and args manually  \n- **Single output handler** - onData() receives stdout and stderr in one place  \n- **Less boilerplate** - no need to manually attach child.stdout.on() and child.stderr.on()  \n- **Faster to write** - fewer lines needed to get real-time command output  \n- **Readable code** - command execution stays simple and easy to understand  \n- **Safer defaults** - avoids common mistakes when working with spawn streams  \n- **Automatic Buffer handling** - stdout/stderr Buffers are automatically converted to strings\n\n---\n\n\n## Fun Mode\n```js\n// creating a file\nimport { run, funMode } from \"exec-cute\";\n\nfunMode(true);\n\nconst { stdout } = await run(\"touch newFile.txt\");  \n\n// ╔═ exec-cute ════════════════════════════════════════════════════════════════╗\n//   ✍️  Running: \"touch newFile.txt\" ✍️\n// ╚════════════════════════════════════════════════════════════════════════════╝\n// ✅ SUCCESS ✅\n\n\n```\n```js\n// removing a file\nimport { run, funMode } from \"exec-cute\";\n\nfunMode(true);\n\nconst { stdout } = await run(\"rm newFile.txt\");  \n\n// ╔═ exec-cute ════════════════════════════════════════════════════════════════╗\n//   🔥  Running: \"rm newFile.txt\" 🔥\n// ╚════════════════════════════════════════════════════════════════════════════╝\n// ✅ SUCCESS ✅\n\n\n```\n\n```js\nfunMode(true) // Enable\nfunMode(false) // Disable\n```\n\n**Exec-cute** makes Node.js shell commands **cleaner**, **safer**, and more **reliable**, while keeping the experience enjoyable with optional **fun mode** features like emojis, colored output, and banners. It still gives you full control over stdout, stderr, errors, and streaming data.\n\n--- \n## More run() examples\n```js\nimport { run } from \"exec-cute\";\n\n// Run with delay\nconst { stdout: delayed } = await run(\"echo Delayed Command\", { wait: 1000 });\nconsole.log(\"Delayed output:\", delayed);\n\n// Handling errors without crashing\nconst { stdout, stderr, err } = await run(\"ls /nonexistent\");\nif (err) console.log(\"Caught error:\", stderr);\n\n// Chaining commands manually\nconst { stdout: first } = await run(\"echo First\");\nconst { stdout: second } = await run(`echo Second after \"${first.trim()}\"`);\nconsole.log(first.trim(), \"->\", second.trim());\n```\n---\n## More spawnProcess() examples\n```js\nimport { spawnProcess } from \"exec-cute\";\n\n// Real-time streaming of a long-running command\nconst child = spawnProcess(\"ping -c 4 1.1.1.1\");\n\nchild.onData((data, stdout, stderr) => {\n  if (stdout) console.log(\"Live output:\", data);\n  if (stderr) console.error(\"Error output:\", data);\n});\n\n// Run multiple commands at once\nconst listChild = spawnProcess(\"ls -la\");\nlistChild.onData((data) => console.log(\"Listing:\", data));\n\nconst dateChild = spawnProcess(\"date\");\ndateChild.onData((data) => console.log(\"Current time:\", data));\n```\n\n## License\n- MIT\n\n### Conclusion\nExec-cute makes running Node.js shell commands clean, reliable, and fun. Enjoy !","readmeFilename":"README.md"}