Skip to content

Add flags for non-interactive use #11

Closed

Description

@egrace479

This could be important for cautious-robot, which uses sum-buddy to checksum a download.

Activity

  1. thompsonmj commented on Apr 27, 2026

    @thompsonmj
    Collaborator

    So the cautious-robot usage auto-overwrites the output file using from sumbuddy import get_checksums. The interruption happens in sum-buddy's CLI, the interruption happens as a check before get_checksums is called. So using Python, this does not interrupt a script. If someone used the CLI command in a script though, that would get in the way. A few redesign options:

    1. CLI keeps prompt, add a -y / --yes in the command to skip.
      Smallest change. Existing interactive UX preserved; scripted CLI users pass -y. Library untouched. Closes Add flags for non-interactive use #11 with the narrowest possible scope. CLI/library inconsistency remains.

    2. CLI refuse by default + -f / --force to overwrite.
      Replace the prompt with a clear error message and a flag. Always non-interactive: either it works, or it exits with "use --force." Library untouched, no breaking change. CLI/library inconsistency remains but the CLI itself is cleaner.

    3. Full unification, refuse-to-overwrite-by-default everywhere.
      CLI and library both refuse by default. Library adds force=False parameter; CLI gets -f / --force. Breaking library API change. Requires 2.0.0 + cautious-robot one-line patch (force=True). I think this is maybe the cleanest end state.

  2. egrace479 commented on Apr 28, 2026

    @egrace479
    MemberAuthor

    I think 3 makes the most sense in the context of this package. For one, the "force" behavior models git, as we've endeavored to do throughout development (e.g., .sbignore). Secondly, it makes sense to keep behavior consistent between CLI and Python to try to avoid unexpected outcomes should a user switch between the two.

  3. thompsonmj commented on Jul 29, 2026

    @thompsonmj
    Collaborator

    Closed by #47

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

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