Regent is a multi-paradigm configuration management library for Rust. By embedding a generic automation engine in your codebase, you leverage Rust's type system, fearless concurrency, and rich ecosystem to industrialize automation, configuration management, and self-remediation at scale.
Note: While inspired by Ansible, Regent does not aim to reproduce its API or behaviors. Also, as a multi-paradigm library, you're free to implement agent/agent-less, autonomous/centralized, push/pull models — whatever fits your use case.
Key Regent Principles
At its core, Regent is built around a very straightforward approach: expected state (the desired configuration of your system), attributes (the building blocks that describe that state), and compliance (whether a host matches its expected state or not). When you use Regent, you can assess if a host is compliant or you can enforce it.
Available attributes :
| Category | Attribute | Description |
|---|---|---|
| Package Management | Apt | Debian/Ubuntu package management |
| YumDnf | RHEL/CentOS package management | |
| Pacman | Arch Linux package management | |
| AptRepo | APT repository configuration | |
| DnfRepo | DNF repository configuration | |
| System | Service | System service management (start/stop/enable/disable) |
| User | User account management | |
| Group | Group management | |
| Cron | Cron job management | |
| Hostname | Hostname configuration | |
| Network | Iptables | Firewall rule management |
| Shell | Command | Arbitrary command execution |
| Utilities | LineInFile | Line insertion/removal in files |
| Ping | Connectivity checks between Regent and hosts (network, authentication) | |
| Debug | Debug message output | |
| AI | Ollama | Ollama API integration for AI model management |
Why Regent?
Type Safety Meets System Management Regent puts Rust's powerful type system to work in infrastructure automation. Define your expected state with compile-time guarantees, eliminating entire classes of configuration errors before they reach production.
Async by Default Built on tokio, Regent executes operations in parallel when possible. Handle thousands of hosts concurrently without fighting with threads or callbacks.
Observable by Design Full tracing instrumentation means every operation, every connection, and every state change is observable. Integrate seamlessly with your existing monitoring and logging infrastructure.
Secure Secret Management Never hardcode secrets. Regent's SecretProvider abstraction dynamically retrieves credentials at runtime from environment variables, files, AWS Secrets Manager, GCP Secret Manager, with more providers coming soon.
Flexible as Your Use Case As a library, not a framework, Regent adapts to you. Need a CLI tool? Wrap it with clap. Distributing work? Serialize your tasks and ship them anywhere. Making hosts observable? Put a compliance check behind an axum endpoint.
Two Ways to Use Regent
The YAML API
async
The Rusty API
async
Use Cases
Regent integrates with the Rust ecosystem you already know:
- CLI Tools: Wrap with clap for configuration management commands
- Massive Scale: Use tokio to handle thousands of hosts concurrently
- Distributed Systems: Serialize tasks, send via HTTP/gRPC/RabbitMQ, execute on worker nodes
- Observability: Run compliance checks in axum health endpoints
- Monitoring Integration: Plug into Centreon, Nagios, Zabbix for regular health checks
Secret Providers
Regent never hardcodes secrets. The SecretProvider abstraction dynamically retrieves credentials at runtime from:
- Environment variables
- Files
- AWS Secrets Manager
- GCP Secret Manager
- Hashicorp Vault
- Delinea SecretServer (Thycotic)
Contributing
We welcome contributions! The project needs help with:
- New secret providers: Hashicorp Vault, Delinea SecretServer, Azure Key Vault, or any other secure backend
- New attributes: Expand coverage for network management (nftables, firewalld), additional package managers, container orchestration, or cloud resource management
- Documentation: Tutorials, real-world examples, and deeper API documentation
- Testing: More comprehensive test coverage, especially for edge cases and multi-host scenarios
- Performance: Benchmarks, optimizations for large-scale deployments
Join our Discord: Regent project