Skip to content

Conversation

@ericlee878
Copy link
Contributor

@ericlee878 ericlee878 commented Nov 7, 2025

Resolves: https://github.com/shop/issues-api-foundations/issues/1064

Background

Creating the new shopify app execute CLI command.
This is just the bare bones outline of the CLI command that is basically empty. We will be implementing the command logic into this.

To Test
Use pnpm shopify app execute to test commands during development. This builds and runs the CLI from source without needing to install it globally.

Why regenerate the manifest:

I had to run the pnpm refresh-manifests command to regenerate the manifest. This is because:

  • The oclif manifest and README must be updated when adding new commands.
  • They contain command metadata for discovery, help documentation, and public docs.

What it added:

  • Registered app:execute in oclif.manifest.json with flags and descriptions
  • Updated README.md with command documentation
  • Without this, the command exists in code but isn't discoverable by the CLI.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ericlee878 ericlee878 marked this pull request as ready for review November 7, 2025 00:28
@ericlee878 ericlee878 requested review from a team as code owners November 7, 2025 00:28
@ericlee878 ericlee878 force-pushed the 11-06-make_new_package_for_app_execute branch from 18e3efd to 5a2ca96 Compare November 7, 2025 00:32
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.25% (-0.03% 🔻)
13608/17171
🟡 Branches
73.15% (+0.01% 🔼)
6652/9094
🟡 Functions
79.34% (-0.02% 🔻)
3507/4420
🟡 Lines
79.61% (-0.03% 🔻)
12853/16145
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / execute.ts
0% 100% 0% 0%

Test suite run success

3358 tests passing in 1372 suites.

Report generated by 🧪jest coverage report action from 53131b7

@ericlee878 ericlee878 force-pushed the 11-06-make_new_package_for_app_execute branch from 5a2ca96 to f71b978 Compare November 7, 2025 00:43
Copy link
Contributor

@jordanverasamy jordanverasamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks pretty good, just some Qs

@ericlee878 ericlee878 force-pushed the 11-06-make_new_package_for_app_execute branch 2 times, most recently from 58cd95b to 74280ce Compare November 7, 2025 01:05
@ericlee878 ericlee878 force-pushed the 11-06-make_new_package_for_app_execute branch from 74280ce to 53131b7 Compare November 7, 2025 01:21
Copy link
Contributor

@jordanverasamy jordanverasamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice changes ty :)

Copy link
Contributor

@jordanverasamy jordanverasamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still looks good :P

body: 'Placeholder command. Add execution logic here.',
})

return {app: undefined as unknown as AppInterface}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing context on what this execute command is intended to do, but scaffolding looks good! Asking about the command intention, because that will change your app return value, ie AppUnlinkedCommand or AppLinkedCommand. Regardless, since it should be run within the context of an app (whether thats authenticated or not), you can probably just return the actual resolved app for now.

Suggested change
return {app: undefined as unknown as AppInterface}
const {flags} = await this.parse(Build)
// ...
const app = await localAppContext({
directory: flags.path,
userProvidedConfigName: flags.config,
})
// ...
return {app}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The execute command is basically doing this. But thanks for the feedback, will keep that in mind!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be AppLinkedCommand and the app should be obtained using linkedAppContext (as most other commands)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I realized this in my next PR! Will fix this then.

Copy link
Contributor

@alexanderMontague alexanderMontague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scaffolding looks good, and thanks for making it hidden!

@ericlee878 ericlee878 added this pull request to the merge queue Nov 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2025
@ericlee878 ericlee878 added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit 2a60aef Nov 7, 2025
30 checks passed
@ericlee878 ericlee878 deleted the 11-06-make_new_package_for_app_execute branch November 7, 2025 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants