screepsmod-cli

1.0.3 • Public • Published

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'

Readme

Keywords

Package Sidebar

Install

npm i screepsmod-cli

Weekly Downloads

5

Version

1.0.3

License

MIT

Unpacked Size

6.61 kB

Total Files

8

Last publish

Collaborators

  • glitchassassin