<p align="center">
<img src="https://raw.githubusercontent.com/cindy-rs/cindy/main/assets/logo.png" alt="Cindy" width="520">
</p>
# Cindy
[](https://crates.io/crates/cindy)
[](https://docs.rs/cindy)
[](https://cindy.rs)
[](https://github.com/cindy-rs/cindy)
[](https://discord.gg/M7x6hyq57h)
> A remarkably simple infrastructure management solution.
The purpose of this project is to provide a faster, safer, simpler, and overall better alternative
to current provisioning tools like Ansible and Salt.
It aims to solve all of the pain points of Ansible, while still being "agent-less" and easy to use.
You write Rust. That's it.
You get the full power of the Rust language and ecosystem, on the orchestrator *and* on the remote machine.
A minimal example demonstrating the sample use:
```rust,no_run
#[cindy::wire]
struct Vars {
my_var_a: u64,
my_var_b: String,
}
#[cindy::inventory]
fn inventory() -> cindy::Inventory<Vars> {
cindy::Inventory::new([
cindy::Host::new(
"host-a.myenterprise.net",
["location:prague", "service:grafana"],
Vars {
my_var_a: 42,
my_var_b: "Hello".into(),
},
),
cindy::Host::new(
"host-b.myenterprise.net",
["location:prague", "service:nginx"],
Vars {
my_var_a: 77,
my_var_b: "Hiya".into(),
},
),
],
)
}
#[cindy::remote]
async fn do_stuff(x: u64) -> cindy::Result<u64> {
let result = x * 3;
println!("{result}");
Ok(result)
}
#[cindy::main]
async fn main(host: cindy::Host<Vars>) -> cindy::Result<()> {
let mut result = do_stuff(host.vars.my_var_a).await?;
result += 23;
result = do_stuff(result).await?;
println!("Final result: {result}");
Ok(())
}
```
Running it is as simple as running `cindy play --limit 'location:prague & !service:nginx'`