devops-toolkit 0.1.0

All-in-one DevOps toolkit: typed serde models for Kubernetes, Docker Compose, GitLab CI, GitHub Actions, Prometheus, Helm, Ansible + offline YAML validation and auto-repair.
Documentation
# devops-toolkit

[![Crates.io](https://img.shields.io/crates/v/devops-toolkit.svg)](https://crates.io/crates/devops-toolkit)
[![docs.rs](https://docs.rs/devops-toolkit/badge.svg)](https://docs.rs/devops-toolkit)
[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT)

All-in-one DevOps toolkit for Rust: typed serde models + offline YAML validation and auto-repair.

This is a **meta-crate** that re-exports:
- **[devops-models]https://crates.io/crates/devops-models** — typed `serde` models for Kubernetes, Docker Compose, GitLab CI, GitHub Actions, Prometheus, Alertmanager, Helm, Ansible, OpenAPI, and LLM types.
- **[devops-validate]https://crates.io/crates/devops-validate** — YAML type detection, structural + semantic validation, JSON Schema registry, declarative rule engine, and 6-stage auto-repair pipeline.

## Quick start

```toml
[dependencies]
devops-toolkit = "0.1"
```

### Validate with auto-detection

```rust,ignore
use devops_toolkit::validate::validate_auto;

let result = validate_auto(yaml_str);

if !result.valid {
    for err in &result.errors {
        eprintln!("Error: {}", err);
    }
}
for warn in &result.warnings {
    println!("Warning: {}", warn);
}
```

### Parse typed models

```rust,ignore
use devops_toolkit::models::{
    k8s::K8sDeployment,
    docker_compose::DockerCompose,
};

// serde_yaml is a transitive dependency — add it to your Cargo.toml
let deployment: K8sDeployment = serde_yaml::from_str(yaml).unwrap();
let compose: DockerCompose = serde_yaml::from_str(yaml).unwrap();
```

### Auto-repair

```rust,ignore
use devops_toolkit::repair::repair_yaml;

let result = repair_yaml(yaml_str, &schema);
println!("{}", result.repaired_yaml);
```

### Schema registry

```rust
use devops_toolkit::schema::SchemaRegistry;

let mut registry = SchemaRegistry::new();
let schema = registry.get_schema_sync("k8s/deployment").unwrap();
assert!(schema.is_object());
```

### Rule engine

```rust
use devops_toolkit::rules::load_builtin_rules;
use serde_json::json;

let engine = load_builtin_rules();
let data = json!({ "spec": { "replicas": 1 } });
let diagnostics = engine.evaluate(&data);
assert!(!diagnostics.is_empty());
```

## Feature flags

| Feature | Description |
|---------|-------------|
| `wasm` | Enable WASM-compatible `getrandom` backend (forwarded to `devops-validate/wasm`). |

## Why separate crates?

| Use case | Recommended crate |
|----------|------------------|
| Only need the data types (models) | `devops-models` |
| Need validation but already have `devops-models` | `devops-validate` |
| New project, want everything | `devops-toolkit` |

## License

Licensed under either of [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE), at your option.