
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@cloud-cli/cli
Advanced tools
Cloudy is a both an HTTP server and a CLI tool, used to run commands on a remote machine using plugins.
So what?
Well, not any commands... You write a script that exports a few functions in an object and Cloudy takes care of exposing it as an API.
Here's an example:
export default {
greeting: {
sayHi() {
return 'Hello!';
}
}
}
And here's what the CLI can do:
cy greeting.sayHi
> Hello!
You install the CLI locally, point it to a server and run remote commands.
On the server side, you run the same CLI, but as an HTTP API.
You need a machine with Node.js installed. Then you can install the Cloudy CLI and create a server.
Tip: create an alias for Cloudy CLI. Add this to
~/.profile:alias cy="npx @cloud-cli/cli"
# generate a random key
head -c 5000 /dev/urandom | sha512sum
echo '[paste-the-generated-key-here]' > key
Next, let's create a configuration file called cloudy.conf.mjs on the server:
// import your plugins
import foo from 'foo-plugin';
import { init } from '@cloud-cli/cli';
function initialize() {
// anything you need to run when the command server starts
}
// export commands from plugins
export default { foo, [init]: initialize };
// optional, change remote port and host
export const apiPort = 1234;
export const apiHost = '0.0.0.0';
And then we start the Cloudy server:
npx @cloud-cli/cli --serve
On your local machine, create a configuration file again:
// cloudy.conf.mjs
export default {};
// same port as the config on the server
export const apiPort = 1234;
export const remoteHost = 'your-server.com';
export const key = '[paste-the-generated-key-here]';
And that's it!
Now you can run npx @cloud-cli/cli --help to get a list of commands available.
A call to cy foo.bar --option value on localhost is converted to a POST request to your-server.com/foo.bar with a JSON body { "option": "value" }.
The server runs your command and sometimes returns an output
The same commands can be executed with cy inside the server and in your local machine.
And if you need to un the same but from a browser, the entire CLI is also an API
FAQs
CLI for the Cloud CLI project
The npm package @cloud-cli/cli receives a total of 27 weekly downloads. As such, @cloud-cli/cli popularity was classified as not popular.
We found that @cloud-cli/cli 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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.