Craft CLI


Craft is the command line interface shipped with Supercharge. The framework provides a handful of handy console commands that help you build your application. The console application executing the commands is called Craft.

If you’re in a Supercharge application, you’ll find a file called craft. This file includes the logic to start a console application. Start a console instance and print the list of available commands:

node craft

Craft provides a “help” overview for every command. It shows the command’s details and describes the arguments and options. Append -h to a command to display the help overview:

$ node craft make:route -h
  make:route <filename> [options]

  filename   Name of your route file


  Scaffold a new route

Creating Commands

At this point, you can’t create and register your own Craft commands.

There’s an open issue asking for your help to add this functionality. Please feel welcome to join the conversation in the issue or submit a pull request.