Skip to content

Commands

Kevin Souza edited this page Jun 20, 2023 · 6 revisions

Available commands

start, list, status, attach, log, send, signal, stop, kill, profile

Start

  • file_path: Path to the executable. Optional if a profile was passed with file_path declared.
  • --name, -n: A name for the application. Must not contain spaces. Defaults to the executable name.
  • --interpreter, -i: Use if your application requires an interpreter like python3, java.
  • --interpreter-args: Arguments for the interpreter, for java for example: --interpreter-args "-Xms2G -Xmx2G".
  • --arguments, -a: Arguments for the executable, for a Minecraft server it could be: -a "--nogui"

As an example, a command to start a Minecraft server would look like this:

cres start ./server.jar -i java --interpreter-args "-Xms2G -Xmx2G" -a "--nogui" -n fabric-server

Profiles can be made to turn the above command to just: cres start -p fabric-server.

Learn more about profiles here.

List

Lists the running applications, with the application's name, the crescent process and subprocess PID, cwd and uptime.

Status

  • name

Prints information about the application.

Attach

  • name

Attaches to the application, letting you watch logs in realtime, send commands and see some process resources usage.

Log

  • name
  • --lines, -l: Number of lines to print.
  • --follow, -f: Watches the applications log file, printing any new lines written to it.

Prints the application's log file.

Send

  • name
  • command: The command to send. Use quotes "" if the command contains spaces.

Sends a command to the provided application.

Profile

  • name: Profile name.

Prints the contents of the profile.

Signal, Stop, Kill

  • name

These commands sends a system signal to the application's process. Stop will try to use a stop_command set in a profile, if one wasn't defined, it will send a SIGTERM to the subprocess, you can also use --force/-f to bypass the verification and just send the signal

signal requires an additional argument, signal.

Clone this wiki locally