Skip to content

feat(encrypt): add raw output format - #1321

Open
jsskeen-utah wants to merge 1 commit into
dmno-dev:mainfrom
jsskeen-utah:encrypt-raw-output
Open

jsskeen-utah wants to merge 1 commit into
dmno-dev:mainfrom
jsskeen-utah:encrypt-raw-output

Conversation

@jsskeen-utah

@jsskeen-utah jsskeen-utah commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

varlock encrypt --format raw writes only the varlock("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=varlock and bun run --filter varlock typecheck: passed.
  • Piped-input CLI checks passed on Debian Linux and Windows in Bash and PowerShell. The TTY rejection is covered by command tests.
  • The latest website build retry was blocked by an external Iconify fetch for 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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pretty and raw, preserves the default output, and rejects raw with --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.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add raw output mode to varlock encrypt

1 participant