Skip to content

Releases

v0.1.4

Choose a tag to compare

@Lockyc Lockyc released this 07 Nov 09:28

Fixes

  • sudo cred set on a file owned by a service account (or a shared 640 file) no longer changes its owner or group and locks the service out. If cred can't keep the owner, it writes nothing.
  • set --name quotes values so godotenv, python-dotenv and . ./.env all read back exactly what was typed — python-dotenv could previously read some generated passwords back differently.
  • set --name refuses a value combining $ or a backtick with ' or \, and writes nothing, since no quoting reads back identically in every reader.

v0.1.3

Choose a tag to compare

@Lockyc Lockyc released this 28 Oct 05:15

Fixes

  • cred set --name keeps a replaced line's indentation and export prefix, so a sourced .env keeps exporting the credential to child processes.
  • --mode refuses anything beyond 0777 (setuid, setgid, sticky, or out-of-range values) with exit 2, instead of silently applying a different mode than asked.

v0.1.2

Choose a tag to compare

@Lockyc Lockyc released this 16 Oct 05:22

Fixes

  • set --name quotes every POSIX shell metacharacter (; & | < > ( ) * ? [ ] { } ~ !) in a .env value, so a file written by cred is safe to . ./.env without running any part of the value.
  • show --name reads an unquoted .env value without its trailing # comment, matching sh, python-dotenv and godotenv.
  • --name matches a KEY = value line with whitespace before the =; set updates it instead of appending a duplicate, and show/rm find it.
  • set, show and rm reject a --name that is not a valid .env key (A=B, spaces, newlines, a leading digit or dash) with exit 2, before touching the file.

Changes

  • Internal refactor of the show/rm path checks; no behaviour change.
  • GitHub Actions CI removed; just gate (gofmt check, go vet, go test) is the gate.

Docs

  • README rewritten to state behaviour plainly, including the .env file-mode rule; Release and License badges added.
  • Development section documents the build, test, fmt, gate and install recipes.

v0.1.1

Choose a tag to compare

@Lockyc Lockyc released this 11 Sep 06:04

Patch release: fail before the prompt when the destination can't be written.

Fixed

  • cred set now refuses an unwritable destination before acquiring the value. os.Lstat's error was ignored wholesale, so only ENOENT — the normal create case — was meant to fall through, but EACCES on a parent directory, ENOTDIR and ELOOP fell through too: at an interactive prompt you typed a credential in full and only then learned it could never land. show and rm already surfaced these.
  • Dropped an unreachable pend-drain in the key reader's CR/LF branch, and recorded why an incomplete escape sequence typed before Enter still survives.

Docs

  • docs/roadmap.md — the durable home for deliberately-deferred work, each entry with its rationale and unlock condition.

v0.1.0

Choose a tag to compare

@Lockyc Lockyc released this 28 Aug 00:51

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.