Maskey is a macOS app and command line (mk) that let scripts and coding agents use credentials without putting their values in prompts or project files. Keep entries in iCloud Keychain to sync them across Macs on the same Apple Account, or connect a Bitwarden Secrets Manager project to share them across accounts.
mk run gives a command just the API keys, tokens, or passwords you select, as environment variables. If the command prints an exact value to stdout or stderr, mk shows a marker such as ***.
mk set github/GITHUB_TOKEN # prompts without echoing the value
mk run github/GITHUB_TOKEN -- gh auth statusFor an SSH Key entry, the command gets a public key and an SSH agent. The private key stays in mk's process. During the run, the command can request any signature with that key. The agent ends with the command.
Create, search, and edit entries in the macOS window. Reveal or copy a value when you need it. Program access lets a credential helper obtain a raw value after you grant the entry access.
mk activity shows which programs used or changed entries through Maskey on this Mac. The record contains no values, notes, command arguments, or environment variables.
You need an Apple silicon Mac running macOS 13 or later and Apple's Command Line Tools or Xcode.
brew install --cask entwining/tap/maskey
xattr -dr com.apple.quarantine /Applications/Maskey.app
mk setupMaskey is signed ad hoc and is not notarized. The xattr command removes Gatekeeper's quarantine. You can also install with a script or build from source.
For coding agents, run mk skill install to install the shipped skill. Sandboxed commands that use the Maskey service need access to its Unix socket.
Wrap only the tool that needs the credential. A whole coding agent can write logs outside mk's output. Give credentials only to commands you trust with them, since a command can transform, save, or send a value beyond Maskey's masking.
Maskey is written in Go with MyGo. Run the repository checks before submitting a change.
Maskey is available under the MIT license.