Skip to main content

alien_commands_client/
lib.rs

1//! Rust client SDK for invoking commands on Alien deployments.
2//!
3//! Mirrors the TypeScript `@alienplatform/sdk/commands` — a high-level client
4//! for creating, polling, and decoding command results.
5//!
6//! # Example
7//!
8//! ```no_run
9//! use alien_commands_client::{CommandsClient, CommandsClientConfig};
10//!
11//! # async fn example() -> Result<(), alien_commands_client::CommandError> {
12//! let client = CommandsClient::new("http://localhost:9090/v1", "dep_123", "token");
13//! let result: serde_json::Value = client.invoke("generate-report", serde_json::json!({
14//!     "startDate": "2025-01-01",
15//! })).await?;
16//! # Ok(())
17//! # }
18//! ```
19
20mod client;
21mod error;
22
23pub use client::{CommandsClient, CommandsClientConfig, InvokeOptions};
24pub use error::CommandError;