Inceptum/docs/Commands.md

30 lines
1.6 KiB
Markdown
Raw Normal View History

2022-01-20 18:13:37 +01:00
# CLI
Inceptum provides a CLI which performs similar functions to the GUI. If you have feature requests, [open an issue](https://gitlab.com/jfmods/inceptum/-/issues)
To view up-to-date information on the commands provided by Inceptum, run `inceptum help` or `inceptum help <command>`, this page is intended to explain more advanced features
## The inceptum wrapper
Inceptum Wrapper looks through the libraries dir and launches the latest available Inceptum version.
If it doesn't find a usable version, it will download the latest from GitLab.
Launching is performed through a custom ClassLoader and the wrapper command is prepended to the arguments provided by the user.
## The "wrapper" command
Inceptum internally uses this command to inform the main Inceptum jar that it was launched through the Inceptum Wrapper and should allow installing updates.
It sets an internal flag and launches the command provided in its arguments.
Manually invoking this command WILL cause problems, so a check has been implemented that should prevent this from starting Inceptum in unintended environments.
## The "batch" command
This command will go through every line in the file provided in its arguments and executes the command written there.
It is intended to be used in scripts that only want to run inceptum once, such as the systemd unit in the AUR package.
The batch command has the additional advantage of allowing caches to stay loaded between commands, making execution faster.
2022-01-20 18:13:37 +01:00
For example,
```
git pull icesrv
run server restart icesrv
```
is equivalent to the bash script
```shell
#!/bin/sh
inceptum git pull icesrv
inceptum run server restart icesrv
```