Documentation Menu
Spark provides a custom command line interface to improve your developer experience.
To install the Spark CLI, simply run the following command:
dotnet tool install -g Spark.CLI
The Spark CLI is constantly being updated. To update to the newest version, simply uninstall and reinstall it.
dotnet tool uninstall -g Spark.CLI
dotnet tool install -g Spark.CLI
Install the Spark Templates. This must be ran 1 time before creating your first Spark project.
spark install
Update the installed Spark Templates. It’s recommended to run this before creating new projects as Spark is being improved constantly.
spark update
Create a Spark project.
spark new [projectName]
Opens a Spark solution with your default editor.
spark open
Create a EF Core migration.
spark make migration [migrationName]
The new migration will be under Application/Database/Migrations
.
Runs outstanding migrations.
spark migrate
Create an new Razor component.
spark make component [ComponentName]
The new component will be under Pages/Components
.
The command accepts subfolders as well. For instance, spark make component Profile/ProfileDetails
would make a new component at Pages/Components/Profile/ProfileDetails.razor
.
Create an new Blazor page.
spark make page [PageName]
The new page will be under Pages
.
The command accepts subfolders as well. For instance, spark make page Profile/Index
would make a new Blazor page at Pages/Profile/Index.razor
.
Create an new Event and Listener.
spark make event [eventName] [listenerName]
The new event will be under Application/Events
. The new listener will be under ./Application/Events/Listeners
Create an new mailable.
spark make mail [mailableName]
The new mailable will be under Application/Mail
.
Create an new database model.
spark make model [modelName]
The new mailable will be under Application/Models
.
Create an new Service.
spark make service [serviceName]
The new service will be under Application/Services
.
Create an new Invocable Job.
spark make job [jobName]
The new Job will be under Application/Jobs
.