func init() {
	log.SetFlags(log.Lshortfile)
	runtime.GOMAXPROCS(runtime.NumCPU())
}
init sets runtime settings.
package main
import (
	"fmt"
	"log"
	"os"
	"path/filepath"
	"runtime"
	"strings"
	"github.com/blue-jay/core/env"
	"github.com/blue-jay/core/file"
	"github.com/blue-jay/core/find"
	"github.com/blue-jay/core/generate"
	"github.com/blue-jay/core/jsonconfig"
	"github.com/blue-jay/core/replace"
	"github.com/blue-jay/core/storage"
	mysqlMigration "github.com/blue-jay/core/storage/migration/mysql"
	"gopkg.in/alecthomas/kingpin.v2"
)
var (
	app = kingpin.New("jay", "A command-line application to build faster with Blue Jay.")
	flagConfigFile = app.Flag("config", "Path to the env.json file.").Short('c').String()
	cFind          = app.Command("find", "Search for files containing matching text.")
	cFindFolder    = cFind.Arg("folder", "Folder to search").Required().String()
	cFindText      = cFind.Arg("text", "Case-sensitive text to find.").Required().String()
	cFindExtension = cFind.Arg("extension", "File name or extension to search in. Use * as a wildcard. Directory names are not valid.").Default("*.go").String()
	cFindRecursive = cFind.Arg("recursive", "True to search in subfolders. Default: true").Default("true").Bool()
	cFindFilename  = cFind.Arg("filename", "True to include file path in results if matched. Default: false").Default("false").Bool()
	cReplace          = app.Command("replace", "Search for files containing matching text and then replace it with new text.")
	cReplaceFolder    = cReplace.Arg("folder", "Folder to search").Required().String()
	cReplaceFind      = cReplace.Arg("find", "Case-sensitive text to replace.").Required().String()
	cReplaceText      = cReplace.Arg("replace", "Text to replace with.").String()
	cReplaceExtension = cReplace.Arg("extension", "File name or extension to search in. Use * as a wildcard. Directory names are not valid.").Default("*.go").String()
	cReplaceRecursive = cReplace.Arg("recursive", "True to search in subfolders. Default: true").Default("true").Bool()
	cReplaceFilename  = cReplace.Arg("filename", "True to include file path in results if matched. Default: false").Default("false").Bool()
	cReplaceCommit    = cReplace.Arg("commit", "True to makes the changes instead of just displaying them. Default: true").Default("true").Bool()
	cEnv          = app.Command("env", "Manage the environment config file.")
	cEnvMake      = cEnv.Command("make", "Create a new env.json file.")
	cEnvKeyshow   = cEnv.Command("keyshow", "Show a new set of session keys.")
	cEnvKeyUpdate = cEnv.Command("keyupdate", "Update env.json with a new set of session keys.")
	cMigrateMySQL         = app.Command("migrate:mysql", "Migrate MySQL to different states using 'up' and 'down' files.")
	cMigrateMySQLMake     = cMigrateMySQL.Command("make", "Create a migration file.")
	cMigrateMySQLMakeDesc = cMigrateMySQLMake.Arg("description", "Description for the migration file. Spaces will be converted to underscores and all characters will be make lowercase.").Required().String()
	cMigrateMySQLAll      = cMigrateMySQL.Command("all", "Run all 'up' files to advance the database to the latest.")
	cMigrateMySQLReset    = cMigrateMySQL.Command("reset", "Run all 'down' files to rollback the database to empty.")
	cMigrateMySQLRefresh  = cMigrateMySQL.Command("refresh", "Run all 'down' files and then 'up' files so the database is fresh and updated.")
	cMigrateMySQLStatus   = cMigrateMySQL.Command("status", "View the last 'up' file performed on the database.")
	cMigrateMySQLUp       = cMigrateMySQL.Command("up", "Apply only the next 'up' file to the database to advance the database one iteration.")
	cMigrateMySQLDown     = cMigrateMySQL.Command("down", "Apply only the current 'down' file to the database to rollback the database one iteration.")
	cGenerate     = app.Command("generate", "Generate files from template pairs.")
	cGenerateTmpl = cGenerate.Arg("folder/template", "Template pair name. Don't include an extension.").Required().String()
	cGenerateVars = stringList(cGenerate.Arg("key:value", "Key and value required for the template pair."))
)