secretspec 0.1.0

Declarative secrets, every environment, any provider
Documentation

SecretSpec - A declarative secrets manager for development workflows

This library provides a type-safe, declarative way to manage secrets and environment variables across different environments and storage backends.

Features

  • Declarative Configuration: Define secrets in secretspec.toml
  • Multiple Providers: Keyring, dotenv, environment variables, OnePassword, LastPass
  • Profile Support: Different configurations for development, staging, production
  • Type Safety: Optional compile-time code generation for strongly-typed access
  • Validation: Ensure all required secrets are present before running applications

Example

use secretspec::{Secrets, Result};

fn main() -> Result<()> {
    // Load the secret specification
    let spec = Secrets::load()?;

    // Validate all secrets are present
    spec.check(None, None)?;

    // Run a command with secrets injected
    spec.run(vec!["npm".to_string(), "start".to_string()], None, None)?;

    Ok(())
}