Skip to content

CLI: Add --no-prompt option to prevent interactive prompts during secretspec check #55

@nosnibor89

Description

@nosnibor89

When running secretspec check, the CLI lists secrets defined in secretspec.toml and shows whether each secret is set or unset.

Right now, if any secret is unset, the CLI immediately prompts for a value. This is fine locally, but it causes the command to hang/block in non-interactive contexts (CI/CD, scripts, piped commands, etc.).

We should add a non-interactive mode so secretspec check can fail fast when secrets are missing, without prompting.

Motivation / Use cases

  • CI/CD validation (fail if secrets are missing)
  • Bash scripting / automation
  • Any non-interactive environment where prompts will block indefinitely

Current behavior

  • secretspec check prompts for missing secret values.
  • There is no option to disable prompting.

Expected behavior

Add an option like:

secretspec check --no-prompt

With --no-prompt:

  • Do not prompt for any secret values.
  • If any secret is missing/unset:
  • print a clear message listing missing secrets
  • exit with a non-zero status code

Acceptance criteria

  • Default behavior remains the same (interactive prompting).
  • secretspec check --no-prompt:
    - exits 0 when all secrets are set
    - exits non-zero when one or more secrets are missing
    - does not hang waiting for stdin

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions