secr

Crates.iosecr
lib.rssecr
version1.2.2
created_at2025-11-09 04:04:18.789203+00
updated_at2025-11-10 02:02:06.582866+00
descriptionA simple secret manager
homepage
repositoryhttps://github.com/zacharysiegel/secr
max_upload_size
id1923579
size35,469
Zachary Siegel (zacharysiegel)

documentation

README

secr   Latest Version

A simple secret manager.

Manage encrypted secrets stored in a file. Uses the ChaCha20Poly1305 algorithm.

Usage

Install secr to your system via Cargo

cargo install secr

Generate a symmetric encryption key:

secr key

Example:

$ secr key
Generated key (base64):
2Af8Ty6PG9ICZppnY5cB8GMPdNg4NubxU4HyPEx1h0E=

Encrypt a secret

secr encrypt --key '<symmetric_key>' '<plaintext>'

Output is preformatted in YAML. Example:

$ secr encrypt --key '2Af8Ty6PG9ICZppnY5cB8GMPdNg4NubxU4HyPEx1h0E=' 'mysecret'
__untitled__:
    nonce: 'qt+WBOWfII63uI9q'
    ciphertext: 'qTEMbZ5SZVox7Mmsc61cXbEbzYuKVO1u'

Add the encrypted secret to a data store

Example:

cat >> secrets.yaml << 'EOF'
hello_world:
  nonce: 'qt+WBOWfII63uI9q'
  ciphertext: 'qTEMbZ5SZVox7Mmsc61cXbEbzYuKVO1u'
EOF

Decrypt the secret

secr decrypt --file '<store_path>' --key '<symmetric_key>' '<secret_name>'

Example:

$ secr decrypt --file secrets.yaml --key '2Af8Ty6PG9ICZppnY5cB8GMPdNg4NubxU4HyPEx1h0E=' 'hello_world'
UTF-8 encoding:
mysecret
Base64 encoding:
bXlzZWNyZXQ=

Versioning

This package follows the Semantic Versioning convention.

License

Licensed under the MIT license.

Commit count: 0

cargo fmt