Personal code generators for Laravel, Svelte, NuxtJS and more.
Written in Ruby & Thor, using Thor's patch functionality for greater flexibility.
$ git clone https://github.com/kematzy/kzen-generate.git
Then run the following Rake command:
$ rake kzen:install
And you should be good to go.
The kzen:install
command essentially does this:
# symlink executable to ~/bin directory
ln -s path/2/kzen-generate/bin/kzen.rb $HOME/bin/kzen
chmod +x $HOME/bin/kzen
# symlink the generators folder to ~/.kzen
ln -s path/2/kzen-generate/generators $HOME/.kzen
There are two basic ways that this works:
To create a new Laravel project, just use the following command:
$ kzen laravel project:new
This command will initially ask a number of configuration questions, and then, depending upon your answers, generate a new Laravel install with the required code features already setup and with each step saved in easily followed git commits.
You can also use this to add features / functionality to existing projects like this:
# inside an existing Laravel project
$ kzen laravel inertiajs
Which will install and setup the Inertia JS suite and common settings
The following generators are available for use:
Full listing of Generators specifically for Laravel related projects:
project:raw
-- generate a new project directory with a prefilled config .yml file that you can easily edit and then use to generate your project.
project:new
-- generate a new Laravel project with the correct setups. Depends upon:
db
, telescope
, git
, github
, tailwind
, mailtrap
db
-- add or reset your database support within a project. Depends upon:
db:sqlite
, db:pgsql
, db:mysql
db:sqlite
-- adds or resets SQLite support to a project.
db:pgsql
-- adds or resets PostgreSQL support to a project.
db:mysql
-- adds or resets MySQL support to a project.
db:sessions
-- adds database support for Sessions in a project.
tailwind
-- adds Tailwind CSS support
stylelint
-- adds Stylelint support
inertiajs
-- adds Inertia JS support with setups. Depends upon:
inertiajs:svelte
, inertiajs:vue
stylelint
-- adds Stylelint support
telescope
-- adds Telescope support. Depends upon:
telescope:toolbar
telescope:toolbar
-- adds Telescope Toolbar support. Depends upon:
telescope
ray
-- adds Ray support.
Full listing of Generators specifically for Svelte related projects or parts. Examples:
Full listing of Generators specifically for Nuxt JS related projects. Examples:
Full listing of Generators specifically for Hasura based projects. Examples:
Full listing of Generators specifically for Vue JS related projects or parts. Examples:
Full listing of Generators that can be used for any chosen solution. Examples: