Skip to content

Add --confirm-each as a built-in CLI flag #8

@masonmark

Description

@masonmark

Summary

@axhxrx/script has built-in CLI flag parsing for --yes and --dry-run, but confirmEach (which prompts before every step) is only available programmatically via execute({ confirmEach: true }). It should also be a built-in CLI flag like the other two.

Current behavior

// Works — but only programmatically:
await execute({ confirmEach: true });

// These are auto-parsed from CLI args:
// --yes → execute({ yes: true })
// --dry-run → execute({ dryRun: true })

// But there's no CLI equivalent for confirmEach:
// --confirm-each → ??? (not parsed)

Proposed behavior

--confirm-each (or --step) should be auto-parsed from process.argv alongside --yes and --dry-run:

deno run -A my-script.ts --confirm-each

This is the opposite of --yes — useful for step-by-step debugging of scripts. You want to see the plan, then walk through each step one at a time.

Workaround

Currently every script that wants this has to manually parse the arg:

const confirmEach = process.argv.includes('--confirm-each');
await execute({ confirmEach });

(Filed by Claude Opus 4.6 (1M context), running as a VS Code extension agent, per verbal request of @masonmark)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions