uno

module
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2026 License: Apache-2.0

README

cntryl/uno

Uno copies existing secrets between providers or injects them into a child process. Go, npm, and .NET projects use the same .env.secrets-template.

Install and run

Run these commands from your project directory. Create the template before using check or run.

Go

Requires Go 1.26 or later. The tool is pinned in go.mod.

go get -tool github.com/cntryl/uno/cmd/uno@latest
go tool uno check
go tool uno run -- go run ./cmd/myapp
Node.js

The npm launcher requires Node.js 22 or later.

npm install --save-dev @cntryl/uno
npm exec -- uno check
npm exec -- uno run -- node app.js
.NET

Requires the .NET 10 SDK or later. Configure an authenticated NuGet source at https://nuget.pkg.github.com/cntryl/index.json and commit the resulting tool manifest. GitHub Packages authentication

dotnet new tool-manifest # If the project needs a manifest
dotnet tool install Cntryl.Uno
dotnet tool restore # On a fresh checkout
dotnet tool run uno -- check
dotnet tool run uno -- run -- dotnet run --project src/MyApp

Put -- after dotnet tool run uno to forward Uno's arguments. Use __ in template keys to map .NET configuration sections, such as Payments__ApiKey for Payments:ApiKey.

The npm and NuGet packages bundle x64 and ARM64 binaries for macOS, Windows, and Linux, including Alpine.

Configure a template

Commit .env.secrets-template with references to secrets. Set the placeholder variables in your environment and configure provider credentials before running commands that read or write secrets.

MY_API_KEY=op://$OP_VAULT/my-service/MY_API_KEY -> aws-secrets-manager://$AWS_REGION/my-service/runtime/MY_API_KEY

Commands

Replace check in your project's invocation with any of these commands.

Command What it does
check Validate the template offline.
run -- <command> [args...] Inject source secrets into one process.
dev Write source secrets to a gitignored .env.secrets file.
sync --dry-run Read sources and destinations to preview changes.
sync Copy secrets to destinations after confirmation.
rollback Revert supported destinations after confirmation.

For an unattended write, pass --force to sync or rollback.

See the Uno reference for provider references, template syntax, runtime requirements, and repository development.

Directories

Path Synopsis
cmd
uno command
internal
aws
Package aws adapts explicit AWS Secrets Manager and SSM references.
Package aws adapts explicit AWS Secrets Manager and SSM references.
azure
Package azure adapts explicit Azure Key Vault secret references.
Package azure adapts explicit Azure Key Vault secret references.
cli
Package cli orchestrates Uno commands independently from provider wiring.
Package cli orchestrates Uno commands independently from provider wiring.
core/engine
Package engine resolves and synchronizes direct secret mappings.
Package engine resolves and synchronizes direct secret mappings.
core/provider
Package provider defines provider-neutral secret references and operations.
Package provider defines provider-neutral secret references and operations.
core/secret
Package secret provides explicitly revealed, redacted, best-effort wipeable values.
Package secret provides explicitly revealed, redacted, best-effort wipeable values.
core/template
Package template parses direct secret-to-secret mapping files.
Package template parses direct secret-to-secret mapping files.
devguard
Package devguard validates repository safeguards before local secrets are written.
Package devguard validates repository safeguards before local secrets are written.
dotenv
Package dotenv atomically persists resolved development secrets.
Package dotenv atomically persists resolved development secrets.
gcp
Package gcp adapts explicit Google Cloud Secret Manager references.
Package gcp adapts explicit Google Cloud Secret Manager references.
onepassword
Package onepassword adapts 1Password item sources and Secure Note destinations.
Package onepassword adapts 1Password item sources and Secure Note destinations.
vault
Package vault adapts explicit HashiCorp Vault KV v2 references.
Package vault adapts explicit HashiCorp Vault KV v2 references.
version
Package version defines Uno's build and integration version.
Package version defines Uno's build and integration version.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL