Problem
infisical secrets set and infisical secrets delete apply changes to the backend immediately — there's no way to preview exactly what will be created, updated, or deleted first. This matters most in CI/scripted secret-rotation pipelines, where a preview step (à la terraform plan) is a standard safety net before mutating state.
Proposal
Add a --dry-run flag to infisical secrets set and infisical secrets delete (and optionally folders create/folders delete) that:
- Computes the exact set of operations that would be performed (create / update / delete, with masked values) using the existing logic that already separates "compute operations" from "execute + print" in
packages/cmd/secrets.go.
- Prints the same table/JSON output the real run would produce, but skips the actual
SetRawSecrets/CallDeleteSecretsRawV3 API call.
- Exits 0 without mutating anything.
Scope
Since secrets.go already builds a secretOperations-style list before calling the API and before printing results, this should be a small, additive change: gate the actual API call behind if !dryRun, and note in the output that it was a dry run. No changes needed to the API client or other commands. Happy to open a PR.
Problem
infisical secrets setandinfisical secrets deleteapply changes to the backend immediately — there's no way to preview exactly what will be created, updated, or deleted first. This matters most in CI/scripted secret-rotation pipelines, where a preview step (à laterraform plan) is a standard safety net before mutating state.Proposal
Add a
--dry-runflag toinfisical secrets setandinfisical secrets delete(and optionallyfolders create/folders delete) that:packages/cmd/secrets.go.SetRawSecrets/CallDeleteSecretsRawV3API call.Scope
Since
secrets.goalready builds asecretOperations-style list before calling the API and before printing results, this should be a small, additive change: gate the actual API call behindif !dryRun, and note in the output that it was a dry run. No changes needed to the API client or other commands. Happy to open a PR.