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/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
14//!     .target("report-worker")
15//!     .invoke("generate-report", serde_json::json!({
16//!         "startDate": "2025-01-01",
17//!     }))
18//!     .await?;
19//! # Ok(())
20//! # }
21//! ```
22
23mod client;
24mod error;
25
26pub use client::{CommandsClient, CommandsClientConfig, InvokeOptions};
27pub use error::CommandError;