Skip to content

Add --no-input to all commands - #8407

Open
gonzaloriestra wants to merge 2 commits into
mainfrom
gonzalo/no-input
Open

Add --no-input to all commands#8407
gonzaloriestra wants to merge 2 commits into
mainfrom
gonzalo/no-input

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Closes shop/issues-develop#23696

Scripts and agents need to disable interactive behavior independently from output format.

WHAT is this pull request doing?

  • Adds --no-input alongside the existing global flags.
  • Disables prompts, browser launches, keypress handling, and REPL input.
  • Returns actionable errors when required input is unavailable.
  • Keeps piped input available.

How to test your changes?

  1. Run shopify app deploy --help and confirm --no-input is listed.
  2. Run shopify app deploy --no-input and confirm it shows the expected error.
image

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type and added a changeset

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Aug 26, 2026
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260831073953

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/no-input branch 2 times, most recently from 3d4a0ca to 9a6f009 Compare August 31, 2026 10:21
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260831104246

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@github-actions

Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

packages/cli-kit/dist/public/node/no-input.d.ts
export declare const noInputFlag: {
    'no-input': import("@oclif/core/interfaces").BooleanFlag<boolean>;
};
/**
 * Returns whether the current process explicitly disabled user input.
 *
 * @param argv - Process arguments to inspect.
 * @param environment - Environment variables to inspect.
 * @returns True when `--no-input` is active.
 */
export declare function isInputDisabled(argv?: string[], environment?: NodeJS.ProcessEnv): boolean;

Existing type declarations

packages/cli-kit/dist/public/node/cli.d.ts
@@ -35,6 +35,7 @@ export declare function runCreateCLI(options: RunCLIOptions, launchCLI?: (option
 export declare const globalFlags: {
     'no-color': import("@oclif/core/interfaces").BooleanFlag<boolean>;
     verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
+    'no-input': import("@oclif/core/interfaces").BooleanFlag<boolean>;
 };
 export declare const jsonFlag: {
     json: import("@oclif/core/interfaces").BooleanFlag<boolean>;

@gonzaloriestra
gonzaloriestra marked this pull request as ready for review August 31, 2026 11:10
@gonzaloriestra
gonzaloriestra requested review from a team as code owners August 31, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant