diff --git a/README.md b/README.md index 234b7a7..6f768a9 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,49 @@ # NimbusPulse SDK -The NimbusPulse SDK provides developers with a set of tools and interfaces to interact programmatically with the NimbusPulse platform, which is a DCS (Digital Combat Simulator) server hosting solution. Using this SDK, developers can easily integrate NimbusPulse functionalities into their applications, enabling automation, management, and monitoring of DCS server instances. +NimbusPulse provides SDKs for interacting with the NimbusPulse coordinator API for DCS server hosting. -## Features +This repository currently contains: -- **Server Management:** Create, start, stop, and configure DCS servers directly from your application. -- **Automation:** Automate server tasks such as mission rotations and server monitoring. -- **Monitoring:** Retrieve server metrics and logs for better insights into performance. -- **Multi-language Support:** Designed to work with multiple programming languages. +- `javascript/`: Node.js + TypeScript client published as `@nimbuspulse/client` +- `rust/`: Rust client crate published as `nimbuspulse-client` -## Supported Languages +## Repository Layout -| Language | Status | -|--------------|------------------------------------| -| JavaScript | Minimal | -| Rust | Minimal | +| Path | Language | Version | +| ------------- | -------------------- | ------- | +| `javascript/` | Node.js / TypeScript | `0.2.0` | +| `rust/` | Rust | `0.2.0` | -## Support Level Definitions - - Minimal : Basic functionality is operational (Create, Start, Stop, Delete) - - Functional: Core features are complete with additional settings and customizations available. - - Complete : All features are fully implemented, including advanced functionality like runtime with live player count, chat, and more. +## Current API Coverage -> **Note:** As of now, both JavaScript (with TypeScript support) and Rust versions of the SDK are under active development. Future versions will include more language support and fully stable SDKs. Do you have a language we currently don't cover? Open a [issue](https://github.com/NimbusPulse/sdk/issues) or join our [discord](https://nimbuspulse.com/discord) to chat. +Both implementations cover: -## Installation -WIP +- Health checks +- Server lifecycle management +- Server lookup and runtime retrieval +- Terrain changes +- Resource metrics +- Chat retrieval +- File management and file transfer +- Mission upload and mission rotation endpoints +- DCS pause/resume and settings updates +- Player kick / ban +- SRS client inspection and moderation for servers with the SRS mod installed +- Webconsole execution for servers with the webconsole mod installed + +The Rust client also includes trigger management: + +- Create trigger +- List triggers +- Delete trigger + +This feature is not stable yet and will change in the future. + +## Package-Specific Docs + +- JavaScript package docs: [`javascript/README.md`](javascript/README.md) +- Rust package docs: [`rust/README.md`](rust/README.md) + +## License + +MIT. See [`LICENSE`](LICENSE). diff --git a/javascript/README.md b/javascript/README.md index 234b7a7..4eacbe6 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -1,27 +1,59 @@ -# NimbusPulse SDK +# @nimbuspulse/client -The NimbusPulse SDK provides developers with a set of tools and interfaces to interact programmatically with the NimbusPulse platform, which is a DCS (Digital Combat Simulator) server hosting solution. Using this SDK, developers can easily integrate NimbusPulse functionalities into their applications, enabling automation, management, and monitoring of DCS server instances. +Node.js SDK for the NimbusPulse coordinator API. -## Features +## Requirements -- **Server Management:** Create, start, stop, and configure DCS servers directly from your application. -- **Automation:** Automate server tasks such as mission rotations and server monitoring. -- **Monitoring:** Retrieve server metrics and logs for better insights into performance. -- **Multi-language Support:** Designed to work with multiple programming languages. +- Node.js `^24 || ^25` -## Supported Languages +## Install -| Language | Status | -|--------------|------------------------------------| -| JavaScript | Minimal | -| Rust | Minimal | +```bash +npm install @nimbuspulse/client +``` -## Support Level Definitions - - Minimal : Basic functionality is operational (Create, Start, Stop, Delete) - - Functional: Core features are complete with additional settings and customizations available. - - Complete : All features are fully implemented, including advanced functionality like runtime with live player count, chat, and more. +## Usage -> **Note:** As of now, both JavaScript (with TypeScript support) and Rust versions of the SDK are under active development. Future versions will include more language support and fully stable SDKs. Do you have a language we currently don't cover? Open a [issue](https://github.com/NimbusPulse/sdk/issues) or join our [discord](https://nimbuspulse.com/discord) to chat. +```ts +import Client from "@nimbuspulse/client"; -## Installation -WIP +const client = new Client(process.env.NIMBUSPULSE_API_KEY!); +const servers = await client.getServers(); +``` + +## Implemented Capabilities + +- Health checks +- Create, fetch, update, start, stop, restart, full restart, update, and delete servers +- Runtime lookup, chat retrieval, and resource metrics +- Terrain changes +- File listing, directory creation, upload, download, move, and delete +- Mission upload, add, delete, select, and start +- DCS pause / resume, settings save, kick, ban, and chat send +- SRS client listing, kick, and ban for servers with the SRS mod installed +- Webconsole execution for servers with the webconsole mod installed + +## Package Exports + +- Default export: `Client` +- Type exports: generated API types from `lib/types.ts` + +## Development + +Build the package locally with: + +```bash +npm run build +``` + +Available scripts: + +- `npm run dev` +- `npm run build` +- `npm run clean` + +## Repository + +The monorepo root README contains the cross-language overview: + +- [`../README.md`](../README.md) diff --git a/javascript/package-lock.json b/javascript/package-lock.json index 346f500..a8681fa 100644 --- a/javascript/package-lock.json +++ b/javascript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nimbuspulse/client", - "version": "0.2.0", + "version": "0.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nimbuspulse/client", - "version": "0.2.0", + "version": "0.2.1", "license": "MIT", "devDependencies": { "@types/node": "^22.15", diff --git a/javascript/package.json b/javascript/package.json index ae4a849..146dd67 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,7 +1,7 @@ { "name": "@nimbuspulse/client", "description": "Node.js SDK for the NimbusPulse coordinator API", - "version": "0.2.0", + "version": "0.2.1", "keywords": [ "dcs", "dcs-world", diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 3a86562..fb3063a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -483,7 +483,7 @@ dependencies = [ [[package]] name = "nimbuspulse-client" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "reqwest", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 10c9653..3615ade 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -4,9 +4,9 @@ description = "NimbusPulse API client" homepage = "https://nimbuspulse.com" repository = "https://github.com/NimbusPulse/sdk" license = "MIT" -readme = "../README.md" +readme = "README.md" keywords = ["dcs", "dcs-world", "nimbuspulse", "sdk", "api"] -version = "0.2.0" +version = "0.2.1" edition = "2024" [[bin]] diff --git a/rust/README.md b/rust/README.md new file mode 100644 index 0000000..f23adec --- /dev/null +++ b/rust/README.md @@ -0,0 +1,58 @@ +# nimbuspulse-client + +Rust SDK for the NimbusPulse coordinator API. + +## Install + +Add the crate to your project: + +```bash +cargo add nimbuspulse-client +``` + +## Usage + +```rust +use nimbuspulse_client::Client; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let client = Client::new(std::env::var("NIMBUSPULSE_API_KEY")?); + let servers = client.get_servers().await?; + + println!("servers: {}", servers.len()); + + Ok(()) +} +``` + +## Implemented Capabilities + +- Health checks +- Create, fetch, update, start, stop, restart, full restart, update, and delete servers +- Runtime lookup, chat retrieval, and resource metrics +- Terrain changes +- File listing, directory creation, upload, download, move, and delete +- Mission upload, add, delete, select, and start +- DCS pause / resume, settings save, kick, ban, and chat send +- SRS client listing, kick, and ban for servers with the SRS mod installed +- Webconsole execution for servers with the webconsole mod installed +- Trigger create, list, and delete + +## Trigger Support + +Trigger management is currently Rust-only in this repository. + +This feature is not stable yet and will change in the future. + +## Development + +```bash +cargo check +``` + +## Repository + +The monorepo root README contains the cross-language overview: + +- [`../README.md`](../README.md)