Flynt CLI (flynt-cli)
CLI tool for the WordPress Flynt framework
Table of Contents
This CLI tool takes care of multiple tasks when working with the Flynt framework for WordPress.
It helps you create a new project based on Flynt, facilitates a multi-environment WordPress development setup and offers shortcuts for running external dependencies of the build process.
Theoretically only the
create command is Flynt specific. All other tasks could be used with any WordPress project that uses
deploy commands are especially useful if you follow the proposed multi-environment development setup. This means a developer always works on his local environment and has everything running on his machine (i.e. Apache, MySQL, etc). In addition there is a 'public' development server. This server is the single point of truth for the local environment. While you can make any changes during development on your local environment, you should always do a
flynt clone before you start working on something new, or when you want to revert your local changes. When you are done with a new feature, run
flynt build && flynt deploy to publish the changes to the development server. The
deploy command is just a wrapper for rsync, so that you do not need to remember the exact command yourself. You can also use
deploy for other environments (e.g. staging or production) but it is recommended that you use a more sophisticated approach at least for production.
To use all features of the CLI there are a couple of OS dependencies. There are checks with feedback for all required binaries when you run a command.
create command uses Root's Bedrock composer package to set the foundation for a new Flynt project.
The used node version should be
^6. If you use a node version manager (e.g. nave), use
npm to install globally:
$ npm i -g @flyntwp/flynt-cli
Otherwise you can use yarn as well:
$ yarn global add @flyntwp/flynt-cli
flynt-cli consists of several commands. A command is a collection of subcommands that are executed. If you do not specify a subcommand, all subcommands are executed in the pre-defined order. It is also possible to execute a single subcommand.
--help flag displays a general help or help for a specific command, including all subcommands in the correct order.
By default almost all messages from the executed scripts are surpressed. To enable the verbose mode use the
To display instructions on how to use a certain command use
$ flynt [<command>] --help
These following commands are currently available:
$ flynt --help Usage: flynt <command> [<subcommand>] [options] Commands: create create a new flynt project setup setup an existing flynt project install install flynt dependencies (composer, yarn) upgrade upgrade flynt dependencies (composer, yarn) start run yarn start for flynt theme build run yarn build for flynt theme clone clone database and media files between environments deploy deploy source code from local to any environment Options: --skipReadConfig Do not read config from file [boolean] --skipWriteConfig Do not write config to file [boolean] --configPath File to read from and save config to. [string] [default: "./.flynt.json"] -e, --env, --environment Specify current environment [string] [default: "local"] -f, --force Force execution in current directory [boolean] -v, --verbose Use verbose mode [boolean] --version Show version number [boolean] --help Show help [boolean]
This project is maintained by bleech.
Main people in charge of the repo are:
If editing the README, please conform to the standard-readme specification.
MIT © bleech