2024-03-29 19:34:21 +01:00
# Shulkerscript cli tool
This is a cli tool for the shulkerscript language. It can be used to initialize a new project, and to compile and package a project.
## Installation
```bash
2024-06-12 18:36:46 +02:00
cargo install --git https://github.com/moritz-hoelting/shulkerscript-cli.git
2024-03-29 19:34:21 +01:00
```
## Usage
### Initialize a new project
```bash
shulkerscript init [OPTIONS] [PATH]
```
2024-06-10 09:30:01 +02:00
Where [PATH] is the path of the folder to initialize in [default: `.` ]
2024-03-29 19:34:21 +01:00
Options:
- `--name <NAME>` The name of the project
- `--description <DESCRIPTION>` The description of the project
- `--pack-format <PACK_FORMAT>` The pack format version
- `--force` Force initialization even if the directory is not empty
2024-06-10 09:30:01 +02:00
### Build a project
```bash
shulkerscript build [OPTIONS] [PATH]
```
Where [PATH] is the path of the project folder to build [default: `.` ]
Options:
2024-06-12 22:43:57 +02:00
- `--assets <ASSETS>` The path to the assets directory [default: `./assets` ]
2024-06-10 09:30:01 +02:00
- `--output <OUTPUT>` The output directory, overrides the `DATAPACK_DIR` environment variable
2024-06-12 22:43:57 +02:00
- `--zip` Package the output into a zip file
2024-06-10 09:30:01 +02:00
Environment variables:
- `DATAPACK_DIR` The output directory [default: `./dist` ]
### Clean the output directory
```bash
shulkerscript clean [OPTIONS] [PATH]
```
Where [PATH] is the path of the project folder to clean [default: `.` ]
Options:
- `--output <OUTPUT>` The output directory, overrides the `DATAPACK_DIR` environment variable
2024-06-13 10:38:16 +02:00
- `--all` Clean all files in the output directory, not only the ones generated by shulkerscript
- `--force` Required for `--all` to prevent accidental deletion of files
2024-06-10 09:30:01 +02:00
Environment variables:
- `DATAPACK_DIR` The output directory [default: `./dist` ]
2024-06-12 22:25:09 +02:00
### Watch for changes
```bash
2024-06-13 10:38:16 +02:00
shulkerscript watch [OPTIONS] [PATH]
2024-06-12 22:25:09 +02:00
```
2024-06-13 10:38:16 +02:00
Where [PATH] is the path of the project folder to watch [default: `.` ]
2024-06-12 22:25:09 +02:00
Options:
- `--no-initial` Do not run the command initially
- `--debounce-time <DEBOUNCE_TIME>` The time to wait in ms after the last change before running the command [default: `2000` ]
2024-06-13 10:38:16 +02:00
- `--execute <COMMAND>` The commands (cli subcommands or shell commands) to execute in the project when changes have been detected [multi-arg, default: `build` ]
2024-06-12 22:25:09 +02:00
2024-06-10 09:30:01 +02:00
## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.
Please make sure to update tests as appropriate.
**Note that this repository only contains the cli tool for interfacing with the language. The language itself is located in the [shulkerscript-lang ](https://github.com/moritz-hoelting/shulkerscript-lang ) repository. Please indicate if pull requests for this repository require pull requests for the language repository**