Emulates DBUS with a Secret Service to manage secrets for apps that need it on Linux platforms without full-blown DBUS (Like Termux on Android)
Find a file
2026-06-20 11:50:01 -04:00
auth.go Vibe coded everything, beware 2026-06-20 10:52:07 -04:00
go.mod Vibe coded everything, beware 2026-06-20 10:52:07 -04:00
keychain-emulator Vibe coded everything, beware 2026-06-20 10:52:07 -04:00
main.go Vibe coded everything, beware 2026-06-20 10:52:07 -04:00
marshal.go Vibe coded everything, beware 2026-06-20 10:52:07 -04:00
README.md Add readme 2026-06-20 11:50:01 -04:00
server.go Vibe coded everything, beware 2026-06-20 10:52:07 -04:00
service.go Vibe coded everything, beware 2026-06-20 10:52:07 -04:00
store.go Vibe coded everything, beware 2026-06-20 10:52:07 -04:00

keychain-emulator

A D-Bus Secret Service emulator for Linux systems without D-Bus. Secrets are stored in a JSON file instead of a real keychain.

Build

go build -o keychain-emulator .

Usage

Wrapper mode

Runs a command with the emulator active for its lifetime:

keychain-emulator my-cli-tool --args

Daemon mode

Starts a background daemon and prints the environment variables to set:

eval $(keychain-emulator)
my-cli-tool --args

Stop it when done:

keychain-emulator stop

Running eval $(keychain-emulator) multiple times is safe — it returns the existing daemon's address if one is already running.

Storage

Secrets are persisted to ~/.local/share/keychain-emulator/secrets.json (mode 0600).