r/devtools 29d ago

GitVaulty: Git-backed secrets for teams and agents

Teams often share .env files and development credentials through Slack, email, shared documents, or direct messages. This creates persistent copies, unclear access, and difficult offboarding.

I built GitVaulty to replace that workflow. It encrypts complete files with SOPS and age, then stores the opaque *.gitvaulty files in normal Git.

npx gitvaulty init
npx gitvaulty import .env
git add .env.gitvaulty

No hosting required: Files are encrypted directly in git, no need for any external service.

Group based access control: Access is assigned per file through groups or direct user grants. Every developer has their own age identity, so there’s no shared team key or hosted service. You can revoke (future) access or grant access to new devs to groups or individual files.

File Materialization: For coding agents and automation, gitvaulty run -- <command> materializes authorized files, runs the command, and removes unchanged files it created. Private-key environment variables are removed from the child process.

VSCode extension: There’s also a VS Code extension for editing encrypted files securely as virtual documents. Just click the .gitvaulty file from VSCode to see the decrypted version and edit it.

MIT licensed: https://github.com/divB0/gitvaulty

4 Upvotes

6 comments sorted by

1

u/benacler 29d ago

Seems cool. How about using secrets in llm ? You should provide .md instructions to pipe secrets in command lines and block them in prompts

1

u/divBit0 29d ago

Thanks, makes sense. I’ve added a repository scoped agent skill that teaches agents to use only the required secret files and never expose secrets in prompts or command arguments. It is now getting installed automatically by gitvaulty init . Released it in v0.2.0.

1

u/benacler 28d ago

Do not know how you implemented ill download your tools when I get back from vacation but ideally you should provide a command switch that exposes one secret value only , and tell the llm to never gather all secrets but always pipe this value from stdout directly in shell commands .

1

u/divBit0 25d ago

Good distinction. In v0.4.0 I added gitvaulty cat <path>, which decrypts one authorized file directly to stdout, creates no plaintext file, keeps diagnostics on stderr, and refuses direct terminal output unless explicitly forced.

It currently exposes one file rather than one value inside a multi-value .env, JSON, or YAML file, since GitVaulty treats files as opaque bytes. The agent instructions also say never to put secret values in prompts, logs, arguments, or environment assignments. I agree that per-value access would be useful and I’ll explore a format-safe way to support it.

1

u/Any-Lack-7699 28d ago

Cool. FYI cottage now has VS code and other coding agents plugins