.gitignore keeps a secret out of Git. Not out of your workspace.
The familiar setup is simple. Create .env, put production-like credentials in it and make sure nobody commits the file.
But the plaintext value is still there on every developer machine. Editors, local scripts and coding agents with workspace access can read it. Every copied file must be created, protected, updated and eventually removed.
- The project contains reusable credentials even when Git does not.
- A tool which can read the code can often read the secrets beside it.
- When a value changes, every local copy can become stale.
- Once a secret has been read into output, logs or agent context, it cannot be unread.
The application needs the value while it runs. The workspace does not need to store it.
Keep the names with the code. Keep the values in Kimen.
Kimen does not require an application library or a new configuration API. Your application continues to read normal environment variables and files.
Store the value
Kimen prompts without putting the value in shell history or a plaintext project file.
kimen secret set dev.database_url
Declare what the project needs
The committed map contains the environment-variable name and its Kimen reference, not the secret value.
env DATABASE_URL=dev.database_url
.kimen/profiles/dev.kmap
Start the application
Kimen resolves the map and gives DATABASE_URL only to the application process.
kimen run --profile dev -- ./app
The project describes what it needs. The local environment supplies the values.
The secret appears inside the application's runtime, not inside the project.
The code and committed Kimen map remain useful to developers, scripts and agents without containing plaintext values. Kimen prepares a runtime environment containing the application and the selected configuration.
Use the same stored values for the programs which need them.
Run a local application or test. Render a private file for software which requires one. Prepare an envfile for a process manager.
- Run an application
kimen run --profile dev -- ./app- Run a test suite
kimen run --profile test -- ./test- Render required files
kimen render --dir ./runtime --profile staging- Prepare an envfile
kimen envfile --out .env.runtime --profile worker
By default, every command which opens the vault asks for its passphrase. Several runs ahead? Open a short session with kimen session start --ttl 15m, then close it with kimen session lock.