New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

screepsmod-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

screepsmod-cli

Allows CLI commands to be executed via HTTP calls

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

screepsmod-cli

This is heavily inspired by screeps-launcher's climod.

Testing

Spin up the Docker container:

docker compose up -d

Then try using curl to post a command:

docker compose run curl -X POST http://localhost:21028/cli -d 'help()'

Usage

If you want to be able to access the CLI endpoint from outside the container, set the host to 0.0.0.0 in your config (and make sure the port is exposed in your docker-compose):

cli:
  host: 0.0.0.0
  port: 21028

Then you can call it directly:

curl -X POST http://localhost:21028/cli -d 'help()'

To pass in a script (note the response will only include the return value of the last command):

curl -X POST http://localhost:21028/cli -d '@testScript.js'

Keywords

screeps

FAQs

Package last updated on 16 Feb 2024

Did you know?

Socket

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.

Install

Related posts