From 02d171400482b6344371a6d583f5aa9a666d7dc3 Mon Sep 17 00:00:00 2001 From: Cedric Date: Wed, 3 Jul 2024 08:30:05 +0200 Subject: [PATCH] docs: README update with installation instructions --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index 8873379..5b15ce6 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,54 @@ With LogCraft CLI, you can easily deploy your security detections into your SIEM - [Splunk](./splunk) - [Microsoft Azure Sentinel](./sentinel) + +## Getting the bits + +### Releases + +[Download the latest build](https://github.com/LogCraftIO/logcraft-cli-plugins/releases) of the desired plugins directly from the releases page. This is the recommended approach for most users. + +### Building from the sources + +If you prefer, you can build the plugins from the sources: + +First, clone the repository: + +```bash +git clone https://github.com/LogCraftIO/logcraft-cli-plugins +cd logcraft-cli-plugins +``` + +Then, enter the directory of the plugin of your choice + +```bash +cd +cargo component build --release +``` + +For example +```bash +cd splunk +cargo component build --release +``` + +The plugin will be released under: `../target/wasm32-wasi/release/` as a `.wasm` file. + +Add it to `lgc` using the `plugins install` command: + +```bash +~$ cd your-work-dir +~$ lgc plugins install /path/to/target/wasm32-wasi/release/.wasm +``` +For example: + +```bash +~$ lgc plugins install /path/to/target/wasm32-wasi/release/splunk.wasm +``` + +Note that compiling the plugin requires `cargo-component` and `wasm32-wasi`: + +```bash +cargo install cargo-component --locked +rustup target add wasm32-wasi +```