
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
@pawelgalazka/shell
Advanced tools
Simple exec of shell commands in node
const { shell } = require('@pawelgalazka/shell')
shell('touch somefile.js')
shell('http-server', { async: true })
Options:
{
cwd: ..., // current working directory (String)
async: ... // run command asynchronously (true/false), false by default
env: ... // environment key-value pairs (Object)
timeout: ...
transform: // function which transforms the output, line by line
nopipe: // if true, it will send output directly to parent process
silent: // if true, it won't print anything to the terminal
}
interface IShellOptions {
cwd?: string
env?: NodeJS.ProcessEnv
timeout?: number
async?: boolean
nopipe?: boolean
silent?: boolean
transform?: (output: string) => string
}
Transform function which can be used for transform
option.
Example:
const { shell, prefixTransform } = require('@pawelgalazka/shell')
shell('echo "test"', { transform: prefixTransform('[prefix]') })
$ node ./script.js
echo "test"
[prefix] test
FAQs
Simple exec of shell commands
The npm package @pawelgalazka/shell receives a total of 3,560 weekly downloads. As such, @pawelgalazka/shell popularity was classified as popular.
We found that @pawelgalazka/shell demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.