Skip to content
/ taz Public

Command Line Interface (CLI) for Silverstripe, to help and speed up development process

License

Notifications You must be signed in to change notification settings

goldfinch/taz

Repository files navigation

🦅 Taz CLI for Silverstripe

Silverstripe Version Package Version Total Downloads License

Taz

Taz 🌪️ is the command line interface (CLI) that can assist you with the development of your Silverstripe application and save time.

Install

  1. Install module
composer require goldfinch/taz
  1. Copy taz file to the root of your project
cp vendor/goldfinch/taz/taz taz

Usage

Call Taz via console php taz 💨

List of available commands

php taz dev/build

php taz display:version
php taz display:theme
php taz display:routes
php taz display:members
php taz display:admins

php taz generate:base64-key
php taz generate:crypto-key
php taz generate:password
php taz generate:app-key

php taz make:admin # --template=(full/plain)
php taz make:command
php taz make:command-template
php taz make:config # --template=(full/plain) --plain --after=* --before=*
php taz make:controller
php taz make:extension # --fielder
php taz make:form
php taz make:helper
php taz make:include
php taz make:model # --template=(full/plain/full-fielder/plain-fielder)
php taz make:page # --template=(full/plain/full-fielder/plain-fielder)
php taz make:page-controller
php taz make:page-template
php taz make:provider
php taz make:service
php taz make:task
php taz make:trait
php taz make:view

# Commands for external modules (each command depends on its module, make sure the module is installed in your project before using the dependent command below)

# (lekoala/silverstripe-encrypt)
php taz generate:encryption-key

# (jonom/silverstripe-someconfig)
php taz make:adminconfig # --template=(full/full-fielder)

# (silverstripe/silverstripe-elemental)
php taz make:element # --template=(full/plain/full-fielder/plain-fielder)

# (silverstripe/silverstripe-elemental)
php taz make:element-template

# (silverstripe/silverstripe-crontask)
php taz make:crontask

Run dev/build in CLI

Runing php taz dev/build can throw MySQL errors. If this is your case, you probably need to specify the path to your MySQL socket. Here is how you can do that.

// you can place it to app/_config.php

use SilverStripe\Core\Environment;
use SilverStripe\Control\Director;

if (Director::isDev() && Environment::hasEnv('SS_DATABASE_SOCKET')) {
    ini_set('mysqli.default_socket', Environment::getEnv('SS_DATABASE_SOCKET'));
}

and add the var to your .env

SS_DATABASE_SOCKET="/path/to/mysql/mysql.sock"

Create custom commands

You can create your own custom commands for your application. They can be widely stored across separate modules.

php taz make:command MyCustom

Preview

Screenshot

License

The MIT License (MIT)

About

Command Line Interface (CLI) for Silverstripe, to help and speed up development process

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages