Skip to content
forked from laravel/lumen

You can use box2 and this modified version of laravel's lumen to pack the artisan file into a standalone command line tool(box) that you can put into your shell's search path. So you can call inspire wherever you are!

Notifications You must be signed in to change notification settings

svrnm/artisonly

 
 

Repository files navigation

Artisan + Phar = Artisonly (Standalone Commandline Toolbox)

You can use box2 and this modified version of laravel's lumen to pack the artisan file into a standalone command line tool(box) that you can put into your shell's search path. So you can call inspire wherever you are!

Installation

  1. clone this project:
# https://github.com/svrnm/artisonly artisonly
  1. Call composer from within the newly created directory:
# composer update
  1. If not available, install box2 globally:
composer global require kherge/box --prefer-source
  1. Create the artisan.phar binary:
# box build
  1. If the build process succeeds, test if you can call inspire:
# ./artisan.phar inspire
  1. Finally, if you like you can install it globally and call inspire:
# sudo cp ./artisan.phar /usr/local/bin/artisonly
# sudo ln /usr/local/bin/artisan.phar /usr/local/bin/inspire
# inspire

Usage

By default the (modified) artisan command does only provide a simple version of inspire. Unlikey laravel there is (currently) no convenient php artisan make:console command, but you can just copy (or rename) the inspire example:

# cp app/Console/Commands/Inspire.php app/Console/Commands/HelloWorld.php

Edit this file as you like and provide a unique signature:

protected $signature = 'hello-world';

Next you can build the artisan.phar using box build and if you like you can install your tools globally:

# sudo cp ./artisan.phar /usr/local/bin/artisonly
# sudo ln /usr/local/bin/artisan.phar /usr/local/bin/hello-world
# hello-world

License

This is open-sourced software licensed under the MIT license

About

You can use box2 and this modified version of laravel's lumen to pack the artisan file into a standalone command line tool(box) that you can put into your shell's search path. So you can call inspire wherever you are!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%