Repository navigation
feat(encrypt): add raw output format - #1321
Open
jsskeen-utah wants to merge 1 commit into
Open
jsskeen-utah wants to merge 1 commit into
jsskeen-utah wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Important
Raw mode still captures terminal prompt output when stdin is interactive, corrupting the value used by scripts.
Approach: The opt-in format and stderr routing fit the request, but the routing needs to include interactive prompts.
Reviewed changes cover the CLI option, output routing, tests, and documentation.
- Output format: Adds
prettyandraw, preserves the default output, and rejectsrawwith--file. - Coverage: Adds three command tests; the build and focused tests pass, and piped CLI output is clean.
- Documentation: Documents raw output and command substitution, with a minor release entry.
gpt-6.1-sol | 𝕏
jsskeen-utah
force-pushed
the
encrypt-raw-output
branch
from
November 28, 2026 13:33
d76c92c to
f4307a1
Compare
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Approach: Requiring piped or redirected stdin in raw mode keeps script output clean without changing interactive pretty mode.
Reviewed changes cover the updates since c2b150c.
- Required stdin: Rejected interactive raw mode before key creation or prompting.
- Updated coverage: Added TTY rejection coverage, exercised piped input, and preserved pretty-mode prompt output. All four focused tests and the CLI build passed; a real PTY invocation confirmed empty stdout and a nonzero exit.
- Clarified usage: Documented the stdin requirement in CLI help and the encryption reference.
gpt-6.1-sol | 𝕏
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
varlock encrypt --format rawwrites only thevarlock("local:...")expression to stdout and status messages to stderr. Raw mode requires a value on stdin and exits with an error on TTY input rather than prompting. The existing interactive output remains the default, and raw mode is not available with--file.Closes #1320.
Evidence
bun run --filter varlock test:ci: 148 files passed, 2,608 tests passed, 13 skipped.bunx turbo run build --filter=varlockandbun run --filter varlock typecheck: passed.simple-icons:vercel. An earlier build passed before the final docs clarification.Merge Danger
Door: two-way
Blast Radius: low
The new format is opt-in. Existing interactive output remains unchanged.