ai-exec

0.0.4 • Public • Published

ai-exec

A global command for Node.js to execute Javascript code string, like eval().

example1

copyFile in command line.

npx ai-exec "require('fs').copyFileSync('./src.txt', './dest.txt');"

example2

exec 'npm i' if not exists 'node_modules'.

npx ai-exec "if(require('fs').existsSync('node_modules')){}else{require('child_process').execSync('npm i', { stdio: 'inherit' });}"

Package Sidebar

Install

npm i ai-exec

Weekly Downloads

16

Version

0.0.4

License

MIT

Unpacked Size

2.21 kB

Total Files

4

Last publish

Collaborators

  • lamianbu