
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
cli-cli-cli2
Advanced tools
Command line interface for node.js
npm install @kp/cli
import {Cli} from "@kp/cli";
const cli = new Cli();
cli.command("foo")
.action(() => {
return "Foo result";
});
cli.run(process.argv).then((res) => {
process.stdout.write(res);
}).catch((err) => {
process.stderr.write(err.message);
});
<bar>
- required argument
[bar]
- not required argument
cli.command("foo <bar1> [bar2]")
.action((options, bar1: string, bar2?: string) => {
return `Foo result, with arguments bar1=${bar1} bar2=${bar2}`;
});
Types:
cli.command("foo")
.option("bar", {
type: "string",
alias: "b"
})
.option("init", {
type: "boolean",
alias: "i"
})
.action((options) => {
const {
bar = "",
init = false
} = options;
return `Foo result, with options bar=${bar} init=${init.toString()}`;
});
cli.command("foo <bar>")
.completion("bar", () => ["value1", "value2", "value3"])
.action((options, bar: string) => {
return `Foo result, with argument bar=${bar}`;
});
cli.command("completion script")
.action(() => {
return cli.completionScript();
});
source <(your-script.js completion script)
FAQs
Command line interface for node.js
The npm package cli-cli-cli2 receives a total of 0 weekly downloads. As such, cli-cli-cli2 popularity was classified as not popular.
We found that cli-cli-cli2 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 Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.