Repository navigation
v0.1.0
First release.
cred moves a credential from your fingers to a file — a standalone mode-600 file, or one key inside a .env — without the value passing through argv, shell history, or an AI agent's transcript.
Why it's a command
An agent that needs you to place a credential can hand you shell text or a command. Shell text is dialect-specific: a pasteable built from read -sp/umask/printf is written in your interactive shell's dialect, and a bash snippet silently breaks in fish. A bare command has no dialect to get wrong.
What's in it
cred set <path>— hidden prompt, one●per rune so you can see your input registered, mode-600 write, and a receipt reporting path, mode, byte count and a short fingerprint. Never the value.--name KEY— target one key inside a.env, preserving comments, ordering and every other key.--expect-prefix— refuse a wrong paste before it lands.--value-from '<cmd>'— take the value from another command's stdout. The command must fetch the value, never contain it.cred show— report on a stored credential (including a fingerprint that matches the onesetprinted) without revealing it.cred rm— delete a file, or remove one.envkey.
Deliberate omissions
There is no cred get. Printing a credential to stdout is how it reaches a shell history, a log, or a transcript. For running a command with a secret in its environment use gopass env; for encryption at rest use sops or dotenvx; for password management use pass, gopass, or the 1Password CLI.
Behaviour worth knowing
- Duplicate
.envkeys are refused, not guessed. Which occurrence a loader honours isn't portable, soset --nameandshow --nameerror rather than risk acting on a value that isn't in effect.rm --nameremoves every occurrence and is the escape hatch. set,showandrmall refuse a destination that isn't a plain file — a directory, or a symlink even when it points at a real credential.--modealways applies to a standalone file so a credential stays tight; an existing.envkeeps the mode it has, since other tooling reads it.- Values are byte-identical to what you type or paste, including non-UTF-8 input.