Skip to content

v0.1.0

Choose a tag to compare

@Lockyc Lockyc released this 28 Aug 00:51
· 30 commits to main since this release

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 one set printed) without revealing it.
  • cred rm — delete a file, or remove one .env key.

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 .env keys are refused, not guessed. Which occurrence a loader honours isn't portable, so set --name and show --name error rather than risk acting on a value that isn't in effect. rm --name removes every occurrence and is the escape hatch.
  • set, show and rm all refuse a destination that isn't a plain file — a directory, or a symlink even when it points at a real credential.
  • --mode always applies to a standalone file so a credential stays tight; an existing .env keeps the mode it has, since other tooling reads it.
  • Values are byte-identical to what you type or paste, including non-UTF-8 input.