Git Product home page Git Product logo

shopify-cli's Introduction

Shopify CLI 2.0

Shopify Latest Version GitHub forks GitHub stars Commit Activity Contributors Latest Commits Twitter Followers License Powered by Ruby

Shopify CLI 2.0 is a command line to help you build on Shopify. It's available as a Ruby gem and can be run and installed on Mac, Linux, and Windows systems.

CLI Deprecation & Sunset

Note that Shopify 2.0 is deprecated and will be sunset on May 31, 2023. We encourage using Shopify CLI 3.0 to develop apps, custom storefronts, and themes.

Contributing πŸ‘©β€πŸ’»

Shopify CLI is an open source tool and everyone is welcome to help the community by contributing to the project.

Help πŸ–

If you encounter issues using the CLI or have feedback you'd like to share with us, below are some options:

  • Open a GitHub issue - To report bugs or request new features, open an issue in the Shopify CLI repository.

  • Shopify Community Forums - Visit our forums to connect with the community and learn more about Shopify CLI development.

shopify-cli's People

Contributors

amcaplan avatar andrewhassan avatar andyw8 avatar ayronshopify avatar catlee avatar davekilljoy avatar duncanuszkay1 avatar fredriculrich avatar gfscott avatar gonzaloriestra avatar haeky avatar hannachen avatar iaserrat avatar isaacroldan avatar jacobsteves avatar jbourassa avatar jplhomer avatar karreiro avatar lopert avatar macournoyer avatar mkevinosullivan avatar mllemango avatar ow avatar paulomarg avatar pepicrft avatar saulecabrera avatar spencerhaan avatar t6d avatar thenura avatar tylerball avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shopify-cli's Issues

Create page on help for CLI

@LizCouto suggested that we should have a small page on the docs mentioning basic info about the CLI (how to install, how to use, how to get help) for discoverability and marketing purposes, even if its some of the same content as the Github Pages site.

Add `serve` command

Will probably require a some form of "project" context so that the tool can be aware of what the command needs to run underneath.

Add `populate` command

Should generate example data on a given dev store.

  • products
  • collections
  • customers
  • orders

Uninstall script

Would be good to provide an easy way for people to uninstall it, or maybe just instructions to do so.

Add prerequisite_task infrastructure

Commands should be able to compose themselves from a group of smaller tasks, and specifying these tasks as a prerequisite for running should be simple, like:

class Command
  prerequsite_task :tunnel

  def call
    do_stuff
  end
end

what this is

see Technical Design.

shell infrastructure

  • add coverage
  • build in auto updates and update command
  • solution for contributing/development like dev load-dev/dev canary.
  • install in home directory instead of /opt/shopify-cli. Linux doesn't like world writable things there.
  • add instructions for scripting. users should be able to do something like <shopify-cli-dir>/bin/shopify task foo bar from a script to automate business tasks.
  • detect yarn or npm usage for a project. figure out what the default should be.
  • build a nicer output for ugly tasks like yarn, whose output doesn't make much sense and 90% of the time isn't useful.

Create sales data for the POS sales channel

Retail Product Marketing and Retail Sales would love if this CLI could create orders across multiple sales channels (specifically POS) rather than just online to give a better sense of our platforms multi-channel capabilities.

When creating demo stores for sales/marketing purposes, there isn't an easy way for us to simulate the volume of POS orders across many locations that a merchant would typically see. We currently use the Shopify Developer Tools data generator to simulate data, but this only populates online orders, skewing information.

Please contact @brian for further information if necessary, thanks!

Build `auth` command

Should have two subcommands to allow a user to authenticate out-of-band from a task that requires auth:

  • login
  • whoami

Internationalization

If we can serialize all the help text into translated YAML we could probably provide a configuration setting for language and read from it based on that. I think command names and arguments will have to remain in English since these are defined in code and I think would be too confusing otherwise anyway.

Add "Project" metaphor

In order to keep track of things that change from stack to stack we need to store some metadata by AppType in the users codebase. We'll generate a shopify-cli.yml that, for now, just contains an app_type: key to keep track of this. This will allow us to run the different commands for server, generate, etc based on the project's language/framework.

This also sets us up to allow users to override these behaviours in the future.

create fails if npm isn’t installed

need to check for it and warn or install

dnewton@newtron-mbp ~/src/github.com/Shopify  πŸ‘  shopify create test-heroku-node
βœ“ Installing ngrok...
βœ”οΈŽ ngrok tunnel running at https://6672b37c.ngrok.io
? What type of app would you like to create? (You chose: node embedded app)
┏━━ Cloning into test-heroku-node... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃                                                                                                                                        100%
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ (3.47s) ━━
┏━━ Installing dependencies with npm... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ (0.0s) ━━
This command ran with ID: 35500
Please include this information in any issues/report along with relevant logs
Traceback (most recent call last):
	31: from /Users/dnewton/src/github.com/Shopify/shopify-cli/bin/shopify:36:in `<main>'
	30: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:20:in `call'
	29: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:74:in `handle_abort'
	28: from /Users/dnewton/src/github.com/Shopify/shopify-cli/bin/shopify:37:in `block in <main>'
	27: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/entry_point.rb:11:in `call'
	26: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/executor.rb:16:in `call'
	25: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:14:in `call'
	24: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:45:in `with_traps'
	23: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:57:in `twrap'
	22: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:46:in `block in with_traps'
	21: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:57:in `twrap'
	20: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:47:in `block (2 levels) in with_traps'
	19: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:15:in `block in call'
	18: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:37:in `with_logging'
	17: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-ui/lib/cli/ui.rb:143:in `log_output_to'
	16: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:38:in `block in with_logging'
	15: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb:164:in `with_id'
	14: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:39:in `block (2 levels) in with_logging'
	13: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/executor.rb:17:in `block (2 levels) in call'
	12: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/command.rb:14:in `call'
	11: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/commands/create.rb:23:in `call'
	10: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/app_type_registry.rb:11:in `build'
	 9: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/task.rb:7:in `call'
	 8: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/app_types.rb:24:in `call'
	 7: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/app_types/node.rb:38:in `build'
	 6: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/task.rb:7:in `call'
	 5: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/tasks/js_deps.rb:14:in `call'
	 4: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-ui/lib/cli/ui/frame.rb:82:in `open'
	 3: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/tasks/js_deps.rb:15:in `block in call'
	 2: from /Users/dnewton/src/github.com/Shopify/shopify-cli/lib/shopify-cli/tasks/js_deps.rb:29:in `install_progress'
	 1: from /Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/system.rb:114:in `system'
/Users/dnewton/src/github.com/Shopify/shopify-cli/vendor/deps/cli-kit/lib/cli/kit/system.rb:114:in `spawn': No such file or directory - npm (Errno::ENOENT)

UX for how devs share apps or scaffolding tasks

Issue summary

How does handoff and sharing work?

If I make a PHP scaffold and need to share that with another partner, how do I do that?

More from Dave

  1. app dev transfers app to someone else to work on (new team, or someone on same team). will the new dev be able to install shopify cli and start using it? i think this scenario is fine and doesn’t need work
  2. same scenario, but the app dev has built a custom php app scaffolder that they’ve integrated into shopify app cli and used this to scaffold their app. new dev needs this php thing. what’s the process for sharing here? create a fork? create a branch? have some sort of plugin system?
  3. same scenario as 2, but not sharing an app. dev who created php scaffold wants to share it with another dev to start a new project.

Implement `tunnel` command

  • make it work
  • refactor PIDFile/Logger out of task
  • [ ] make it work cross platform #68
  • add other implementations other than ngrok

Node versions?

In create command we need to keep versioning consistent .

Create minimal app to handle getting tokens for Admin API tasks

After discussion and discovery we've determined that many of our tasks require interaction with the Admin API directly, such as consuming the GraphQL schema to generate code for webhooks and creating example shop data on a dev store. In order to do we need an access token.

Our MVP implementation for this will be to deploy a simple web app that the CLI will open before these tasks and ask the user to install it on their dev shop. After authentication we will display an access token in a copyable text field to paste back into the CLI. The CLI will cache the token on disk and use it to make requests to the Admin API.

Don't print the secret key to STDERR

Currently we prompt for api key and secret on create but CLI::Prompt prints this back out. We should try to ****** it out like in the Partners Dash

Update command

  • An update command that pulls the CLI source from github.
  • A configuration option to opt in to auto updates

Global configuration

Add a global configuration mechanism to track user preferences across projects, such as auto-updating of the CLI.

Add `connect` command

Should auth with Partners as necessary and insert credentials into current project and install onto dev store.

Create command refactoring

Currently this command class consolidates too much logic.

Things to isolate:

  • app types should be individual classes placed into a registry like Commands and Tasks
  • repository cloning should be moved to its own task #7
  • env file construction should be moved to its own task #22
  • yarn should be moved to its own task

Add `billing` subcommand to `generate`

These are the most common charges:

  1. Recurring charges, with and without trials
  2. Usage charges that are posted daily, or even per usage (can include a $0 monthly fee or more)
  3. Usage charges that are posted at the end of the billing cycle (we don’t usually recommend this, though)
  4. OneTime charges for actual one-time purchases
  5. OneTime charges for annual billing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.