Download the PHP package laravel-shift/cli without Composer

On this page you can find all versions of the php package laravel-shift/cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cli

Build Status Latest Stable Version License

Shift CLI

A tool by Shift to run automated tasks for refactoring and modernizing your Laravel projects.

The Shift CLI replaces the Shift Workbench desktop app - allowing you to run the same tasks conveniently in your local PHP environment. No Electron. No Docker. Similar to the Workbench, the free tasks are available to run immediately. Premium tasks are available with a license.

Installation

The Shift CLI is bundled as a PHAR, so it has no dependencies and can be installed without conflicts. To use the Shift CLI in your Laravel project, you may install it locally by running:

To easily use the Shift CLI for all your Laravel projects, you may install it globally by running:

Basic Usage

The recommended way to use the Shift CLI is to simply run the shift-cli command from the root of your Laravel project. This will run the default set of automated tasks. The default tasks are based on conventions found in the latest version of Laravel and its documented examples.

To run an individual task, or multiple tasks, you may pass them by name to the run command. For example, to run the anonymous-migrations and facades-aliases tasks, you may run:

By default, the automation is run against all PHP files under your current path. To limit the automation to a path or file, you may set the --path option. For example, to run the anonymous-migrations task against only the database/migrations directory, you may run:

You may also use the --dirty option to only run the automation against files which have changed since your last commit. For example, to run the anonymous-migrations task against only the uncommitted PHP files, you may run:

Automated Tasks

To see a list of all available tasks, you may run: shift-cli --tasks

Below is a list of the free tasks included with this package:

Advanced Usage

The Shift CLI is meant to be integrated into your development workflow. Its focus is refactoring your code and ensuring consistency across your projects. As such, it pairs well with a code formatter. Shift recommends using Laravel Pint as it is a first-party package which applies the Laravel code style by default. It also uses PHP CS Fixer underneath, so you may easily configure it with all the same options. You may, of course, use PHP CS Fixer directly, or another code formatter like PHP CodeSniffer.

For example, to run the Shift CLI and Pint together, you may run:

Taking this farther, you may automate this by setting up your own Composer script. For example, to run the Shift CLI and Pint together, you may add the following to your composer.json file:

You may optimize this script by passing the --dirty option to both the Shift CLI and Pint. Once you have added this script, you may run: composer lint

Additionally, you may add the shift-cli command to a pre-commit hook to ensure the automation is always run before making a commit.

Finally, you are encouraged to add the shift-cli to your CI workflows. For example, you may run the shift-cli as part of every Pull Request to ensure all merged code consistently follows Laravel conventions.

Examples of setting up Composer scripts and pre-commit hooks may be found in the Shift CreatorSeries on Laracasts.

Additional Commands

The Shift CLI comes with two additional commands: publish and discover.

The publish command generates a Shift CLI configuration file - shift-cli.json. The generated configuration file includes all of the defaults. You may customize the configuration file to specify which tasks to run by default, additional paths to ignore, and options for individual tasks.

The discover command regenerates the Shift CLI task manifest. This is done automatically anytime the Shift CLI is updated. However, you may need to run this command if you have included other packages which provide Shift CLI tasks.

Support Policy

The automated tasks within the Shift CLI prioritize the latest stable version of Laravel (currently Laravel 10). While there will be a grace period when new versions of Laravel are released, you are encouraged to keep your application upgraded (try using Shift).

Contributing

Contributions are welcome in the form of opening an issue or submitting a pull request. For issues to be considered, they should follow one of the templates. For PRs to be considered, they should have tests and all checks should pass.


All versions of cli with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laravel-shift/cli contains the following files

Loading the files please wait ....