Open Source · Go · KeePass · AWS · Windows Credential Manager · dotenv

Keep secrets out of
your .env files.

Plaintext credentials in .env files leak onto hard drives, into backups, and through careless commits. DesktopSecrets replaces them with references your team can safely commit — and resolves them at runtime from your own vault, with no cloud service involved.

Build Go MIT

Everything a plaintext .env gets wrong, fixed.

No secrets on disk. No cloud middleman. No friction.

🚫

No secrets on your hard drive

Your .env.tpl contains only references, never real values. Secrets are resolved in memory at runtime and injected directly into your process — nothing written to disk.

📂

Check templates into git. Share with your team.

A .env.tpl without real credentials is safe to commit. Your whole team works from the same template — each person's local vault provides their own credentials.

🔑

KeePass — battle-tested, open-source, yours

KeePass has been audited for decades. It's offline, open-source, and your data stays exactly where you put it. No subscription, no vendor lock-in, no data sovereignty concerns.

Cached unlocks. No nagging.

A background daemon caches unlocked vaults for a configurable TTL. Enter your master password once — it stays available for the rest of your session without repeated prompts.

🪟

Windows Credential Manager — zero setup

On Windows, use the built-in credential store you already have. wincred(target) retrieves passwords and usernames stored via cmdkey or the Credential Manager GUI — no extra tools, no master password.

🧩

Built for extensibility

The provider interface is open. Add your own — HashiCorp Vault, AWS Secrets Manager, 1Password — with a small Go interface. Multiple providers can be mixed freely in a single template.

🤖

Safe secret injection for AI agents

AI coding agents and automation pipelines need API keys. tplenv run injects secrets into the agent process without writing them to disk or leaking them into the agent's file context.

One command. Secrets injected.

Write a template, run your tool through tplenv run — that's the whole workflow.

01

Write a .env.tpl

Replace every credential with a secret reference. The file contains no real values — it's safe to commit and share.

02

Run your tool through tplenv run

DesktopSecrets connects to the background daemon, which unlocks your KeePass vault (prompting only when the cache is cold) and resolves every reference from the template.

03

Your process starts with secrets already in its environment

Resolved values are injected as environment variables into the child process. Nothing is written to disk. The .env file your tool "sees" never exists as a file.

.env.tpl — commit this
DATABASE_URL=keepass(&personal|/Dev/postgres|Notes)
AWS_ACCESS_KEY_ID=keepass(&cloud|/AWS/Prod/access-key)
AWS_SECRET_ACCESS_KEY=keepass(&cloud|/AWS/Prod/secret-key)
DEPLOY_TOKEN=user(Enter deploy token)
APP_ENV=production
Terminal — run anything through it
# Start your app with secrets injected
$ tplenv run -- npm start

# Run a database migration
$ tplenv run -- flyway migrate

# Launch an AI agent with its API keys
$ tplenv run -- claude --dangerously-skip-permissions

✔ vault unlocked (cached 3h)
✔ 4 secrets resolved
✔ process started

Pick your secret source.

Mix and match providers freely in a single template. Each reference resolves independently.

🔑

keepass(...) — KeePass

Retrieve secrets from .kdbx vaults. Supports absolute paths, wildcards, attribute selection, aliases, and chained vault unlocking.

keepass(vault.kdbx|/AWS/Prod/key)

🪟

wincred(...) — Windows Credential Manager

Retrieve passwords and usernames from the built-in Windows Credential Manager. No master password, no TTL — transparent once logged in. Windows only.

wincred(MyApp/DBPassword|username)

☁️

awssm(...) — AWS Secrets Manager

Retrieve secrets from AWS Secrets Manager. Supports raw string secrets and JSON field extraction. Uses the standard AWS credential chain — env vars, ~/.aws, instance roles.

awssm(MyApp/DB|password)

📄

awsps(...) — AWS Parameter Store

Retrieve parameters from AWS Systems Manager Parameter Store. SecureString parameters are always decrypted. Supports JSON field extraction.

awsps(/myapp/prod/api-key)

💬

user(...) — Interactive Prompt

Show a GUI prompt and ask the user to type a secret. Useful for one-off tokens, OTPs, or anything that shouldn't be stored at all.

user(Enter deploy token)

Simple references. Powerful resolution.

A compact expression language for retrieving secrets from any provider.

Secret references — .env.tpl
# KeePass vault entry
API_KEY=keepass(vault.kdbx|/AWS/Prod/api-key)

# Wildcard matching
DB_PASS=keepass(vault.kdbx|/DB/**/password)

# Windows Credential Manager
DB_PASS=wincred(MyApp/DBPassword)
DB_USER=wincred(MyApp/DBPassword|username)

# AWS Secrets Manager
API_KEY=awssm(MyApp/ApiKey)
DB_PASS=awssm(MyApp/DB|password)

# AWS Parameter Store
DB_HOST=awsps(/myapp/prod/db|host)

# Interactive prompt
TOKEN=user(Enter deploy token)
Aliases — aliases.yaml
# Simple file alias
personal: C:\Vaults\personal.kdbx

# Alias with chained master password
cloud:
  file: C:\Vaults\cloud.kdbx
  master: keepass(&personal|Cloud Master)

# Usage in .env.tpl
SECRET=keepass(&cloud|/Prod/api-key)
Full syntax docs →

One command to get started.

Downloads the latest release, verifies SHA256 checksums, and adds the tools to your PATH.

Windows PowerShell
irm https://it-atelier-gn.github.io/desktop-secrets/install.ps1 | iex
Linux bash
curl -fsSL https://it-atelier-gn.github.io/desktop-secrets/install.sh | bash

Binaries are built by GitHub Actions from source. Browse releases · inspect install.ps1 · inspect install.sh

Get DesktopSecrets.

All builds are produced by GitHub Actions from source. SHA256-verified.

Windows

getsec & tplenv

.exe · x64
↓ Download
Linux

getsec & tplenv

binary · x64
↓ Download
Go Module

Use as library

go get github.com/it-atelier-gn/desktop-secrets
Docs →

Built by Georg Nelles — freelance software engineer specializing in automation, modernization, and pragmatic tooling. DesktopSecrets is open-source. Your secrets stay on your machine.