A modern git based age-encrypted secrets manager for teams.
Project description
cottage
Cottage is a tool for teams to manage age-encrypted secrets in git repositories.
It provides a simple workflow to encrypt/decrypt secrets, manage recipients, and keep secrets out of the repo while still allowing for easy sharing via VCS. Cottage also generates redacted previews of encrypted secrets for better visibility and supports both persistent and temporary decryption workflows, while ensuring secrets are never committed in plaintext.
Features
- Exposure safe: Uses Rust's type system to make sure bugs can neven accidentally expose secrets.
- Team-friendly: Share public keys (recipients) in the repo, keep private keys (identities) local.
- Manages .gitignore: Automatically updates
.gitignoreto keep unencrypted secrets out of the repo. - Previews: Generates timestamped redacted previews of encrypted secrets for better visibility.
- Rich diffs: Keeps git diff clean & reviewable, while
ctg diffshows diff of locally modified secrets with tracked encrypted counterparts. - Checksum verification: Prevents tampering and makes sure that the changes in secrets and recipients are correct and intentional.
- Persistent secrets workflow:
ctg decrypt/edit/synckeeps decrypted secrets on disk. - Temporary secrets workflow:
ctg run(shortcutctgx) decrypts secrets temporarily to run a command, then deletes them regardless of the command's success or failure. - Clean up:
ctg cleandeletes all decrypted secrets from local repo to let you run your AI agents with a tiny bit less worry. - Supports jj and non-git directories:
ctg initturns any directory into a secret store.
Installation
# rust cargo-binstall
cargo binstall --locked cottage
# rust cargo
cargo install --locked cottage
# python pip
pip install cottage
# python uv
uv pip install cottage
Quick Start
Init project:
mkdir project && cd project
git init # Optional, cottage works better with git but it's not required
ctg init # Also optional in a git repo, required in a non-git directory
tree -a
# .
# ├── .cottage/ <- Auto-generated by `ctg init`
# │ ├── identity <- Your private key, keep if safe. Move it to `~/.config/cottage/identity` to use it globally, or replace it with a soft link to one of your existing private key.
# │ └── recipients/ <- This is where your team keeps the public keys of all the recipients.
# │ └── sayanarijit <- Your public key. Commit it. To use an existing public key, just copy (don't softlink) that key here.
# ├── .git/...
# ├── .gitattributes <- Added `*.cott.age binary filter=cottage-encrypted` to avoid polluting git diff
# └── .gitignore <- Added `/.cottage/identity` for obvious reasons
Create or edit a secret.
ctg edit secret.yml --clean # Opens secret.yml in $EDITOR
ctg encrypt secret.yml --clean # Another way to encrypt secrets
# encrypt secret.yml
# into secret.yml.cott.age
# edit secret.yml.cott.toml
# edit .gitignore
# delete secret.yml
Run a command with temporary decrypted secrets:
cat secret.yml
# cat: secret.yml: No such file or directory
ctg run kubectl apply -f secret.yml # decrypts secret.yml.cott.age to secret.yml
ctg run kubectl apply -f secret.yml.cott.age # same as above
ctg run kubectl apply -f . # decrypts all .cott.age files in .
ctg run ./deploy.sh # decrypts all .cott.age files in repo.
cat secret.yml
# cat: secret.yml: No such file or directory
Or use the shortcut:
ctgx ./deploy.sh # same as ctg run -- ./deploy.sh
Sharing with a team member
To share your secrets, just push to git repo.
git add .
git commit -m "Add secret.yml"
git push origin main
Although, currently you are the only recipient. Ask your teammates to add their public
keys to .cottage/recipients and push the changes. So that you can pull and re-encrypt
the secrets for them.
git pull origin main
ctg sync # or `ctg decrypt && ctg encrypt`
# encrypt secret.yml
# into secret.yml.cott.age
# edit secret.yml.cott.toml
ctg clean # optional
# delete secret.yml
# review changes, commit and push
git add .
git commit -m "Add new recipient to secrets"
git push origin main
Now your teammates can pull the latest changes and decrypt secrets for themselves.
Learn More
See examples directory for more usage examples.
Troubleshooting
# See debug logs with -v, -vv or -vvv
ctg run -vvv -- ./deploy.sh
Roadmap
- Core functionality: encrypting, decrypting, managing recipients, diffing and syncing secrets.
- Nice to have features: shell autocompletions, gitignore, redacted previews, rich diffs, checksum verification and
ctgx. - Syncing remote secret vaults
ctg pullandctg push. - ACL for more fine-grained access control.
- Audit logs of who accessed secrets and when.
- Secret rotation and expiration policies.
- Integrations with popular CI/CD tools and secret management platforms.
- Editor plugins for VSCode, JetBrains IDEs, Vim and Emacs.
- Docker images and kubernetes operators for easier integration with existing workflows.
License
MIT OR Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cottage-0.2.0.tar.gz.
File metadata
- Download URL: cottage-0.2.0.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6d5ee1c9940451cf4630160365c0053ff4d9e7d8da55704ab88ce189ec028ea
|
|
| MD5 |
66150a12a1616f3727f30da95b8c5b41
|
|
| BLAKE2b-256 |
99142833d7a323880a06398564e9800e732cd5adcc6348ca94d822e1cbd041ed
|
File details
Details for the file cottage-0.2.0-py3-none-win_arm64.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-win_arm64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e5acee084e3a793a17840f98bd0d3b44c3cf3fa92befb0c29fac12e75efcbdb
|
|
| MD5 |
56262110fdf27110cd46690f98705211
|
|
| BLAKE2b-256 |
fe35be5b263185e1e46354a64c75202d56fb131f1fc7481e2ac58f34033dc3f4
|
File details
Details for the file cottage-0.2.0-py3-none-win_amd64.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-win_amd64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8ead137eb288f31b34b862cc261e8e8276f4a2b801ae1ed01b9c21c2c2dec03
|
|
| MD5 |
d46e3bf7f6dca518142c491aaab6fc96
|
|
| BLAKE2b-256 |
09ec8edd6d327f6b8b533c4920e449265553a5bc8b29399e7c36c08e286da0b4
|
File details
Details for the file cottage-0.2.0-py3-none-win32.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-win32.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4bf0e7a59677667aeadcf40a6ed5235aba265b2413210acfce1fd9d3b799809
|
|
| MD5 |
54a682cee09790706aedb6505e0b6253
|
|
| BLAKE2b-256 |
1293c1b2f0b6c1aff00ca7bdf38048dd0e47b16d0cd6909b4342cc8dfa3abeac
|
File details
Details for the file cottage-0.2.0-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18e36db6d601386ca97e8a8967331907f242fb69435aa8fba50d8b684f195224
|
|
| MD5 |
c67037e1468b4456d87f67a295392fad
|
|
| BLAKE2b-256 |
98a331d0b2ba98948b7ca07532d7fb5a45eabbc759cf66209a5ab0a53147f2dc
|
File details
Details for the file cottage-0.2.0-py3-none-musllinux_1_2_i686.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-musllinux_1_2_i686.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19545eb89cde2deaefec50a7257f2fe0f304fcf749122be990f5f5ef6e082bfc
|
|
| MD5 |
78a74e535fc2368bfb5e489a9bbb1436
|
|
| BLAKE2b-256 |
3422c0de845dbe35de210391ebab2a4395aa69bc4e9909301e21624cf7d7094e
|
File details
Details for the file cottage-0.2.0-py3-none-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 3.1 MB
- Tags: Python 3, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2da3eaa3bdef621a08a6c24fcd74c416c3106143ddaf180ba15d292943ed2ef2
|
|
| MD5 |
8f74820e06750788920161c52aea4585
|
|
| BLAKE2b-256 |
80b8ec772e3ad7aeb20696d6186e90ba58617c7f8b97951432ae3bb4890779f2
|
File details
Details for the file cottage-0.2.0-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ce88f93ecfabab8935e9d2f9687ae88d7f6ece45680b3cb237e34166d03764c
|
|
| MD5 |
9d49ec8c5fa6bd3425f0046b7efa6937
|
|
| BLAKE2b-256 |
f5ea9866e36e2ce93c401c010bbf803d9149e0e2dbddfa7b5613680697df31e2
|
File details
Details for the file cottage-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2068fa747e10ae4ba845a391ff93fce92cf97f0d40a9a09b11bb5bf6b14c9be
|
|
| MD5 |
b125ced1c2ffad2f2aa1bb7d665d773c
|
|
| BLAKE2b-256 |
7a1a883f880d5f495c1efba90c5840ba24bc099d34a9418d070d06dd0752cb4b
|
File details
Details for the file cottage-0.2.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bca591df97458bc3a3521b80ad1e683394ef8145c5e0e15eefcc318cd4027c86
|
|
| MD5 |
297f7c663089457cbe086cc313a611fc
|
|
| BLAKE2b-256 |
b62e861acf79da8377af7f73db86e0baaf455a1ba4d685fbce16494acc41dfec
|
File details
Details for the file cottage-0.2.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6b130d088db8cebe0dc84c8deed877c527e909af9ca07ec9df369799202b3f5
|
|
| MD5 |
6ceb2d258d4f968a234c98c0c779ddf6
|
|
| BLAKE2b-256 |
9cae728b662df834310480b626e90f80cc24d5e62ad24d22972a5c3e67f7d6c3
|
File details
Details for the file cottage-0.2.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb6d1003a2afcaeeec0ff0607ce2bd3ef6d01ff99c9ccc7a09bc5f4a05bd2904
|
|
| MD5 |
35f375bc98522cd95de9e0410d9f44c2
|
|
| BLAKE2b-256 |
29098c5673054785491d026482c325f35dce5d23d9dbc8c4149c412059a64f7a
|
File details
Details for the file cottage-0.2.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0a799bf2a33071ab00da6bfd41c7385b7fc8511d4d20cf87ec6996f4aee25ae
|
|
| MD5 |
108d0f58c3c3bdca24eb3ce6d222d3de
|
|
| BLAKE2b-256 |
ca76e9bd66ff323692822004f41e396d8593796f12361f8fa7051bdae8182a05
|
File details
Details for the file cottage-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cafe3aef3c625ef7ac0b7c363de5990b2beefd4f2a1ca22f7dc454639ed2fb20
|
|
| MD5 |
eb209fdbbb88ebc26a3b63f139a09cc1
|
|
| BLAKE2b-256 |
c9bf44a3d356e561f00af1fe6993a8b11fcc5d4bb9610033bf56a67f4f695e39
|
File details
Details for the file cottage-0.2.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73534fae73ec96da6b33633eecf655103bcfc0fa66e85e0d4d7f44202966538b
|
|
| MD5 |
8ac5b9c02f7ac3a39cd7181787a89d22
|
|
| BLAKE2b-256 |
dbcb555f45dc46dd88d6ec296e1222a58bf5b14ba8396904f7c4a18e07ff1006
|
File details
Details for the file cottage-0.2.0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: cottage-0.2.0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7233b229baa8efffc4e9fa7eede9a5544f72bc35808c9fa311768c58326e6f01
|
|
| MD5 |
35dbc0c1e4634aeb689649badd023ced
|
|
| BLAKE2b-256 |
f807f5dbd5954b0f305d2fbf78312de1517c993fbb394fba917ca9a52a99b4e9
|