webdev is a CLI tool written in PHP that automates much of the ground-work your your web development projects require - so you can get to work asap.
Imagine typing a single command like and having the following done in milliseconds:
- Creates a directory like
/var/www/new-site
orC:\wamp64\www\new-site
orD:/websites/new-site
- Creates an appropriate configuration for your web server (virtualhost directives for apache etc)
- Adds these lines to your
hosts
file: -
127.0.0.1 new-site.dev
-
127.0.0.1 www.new-site.dev
- Creates a database on your MySQL Server
- Perhaps creates a folder for your non-code stuff
/home/John/Dropbox/Projects/new-site
.
October 19th, 2017
- Can now use
webdev config
to list entire config.
here's how it looks to both set it up and create your first site
- Composer
- Your composer vendor directory in your PATH
Before you use it, remember that this tool is in alpha and isn't TDD'ed or anything. Don't blame me if you accidentally delete your projects!
Grab it via packagist.org:
composer global require "arakash92/webdev=dev-master"
The first time you run it, it should automatically do the init
command, which is interactively sets up webdev in your particular environment.
legend:
[abc] | Argument |
---|---|
[abc?] | Optional argument |
Configure webdev by getting or setting values.
Examples:
webdev config web.providers.wamp.web_root C:/wamp/www
sets the web root directory where your new projects will be created when using the "apache" web server.webdev config database.default
tells you the current value of the default database provider.webdev config web
prints the value of all the keys and values in that array (If it is an array. In this case, it is).webdev config mysql.username "root"
sets the mysql username
Create a new website
It's written in PHP, built on Composer and leverages Symfony/Console as well as Illuminate/Config. The configuration is stored as a PHP array in the installation directory (composers's global vendor dir).
feel free to send a pull request. It would be nice to clean up the code a bit, add support for more things and make better abstractions and maybe also support a more modular approach.
MIT. See LICENSE file.