A command line interface for working with MAMP. It can start and stop your MAMP, but also easily switch the document root so that you can switch projects easily by using a favorite list.
Please backup your httpd.conf file of your MAMP before using this script. It can be found here:
/Applications/MAMP/conf/apache/httpd.conf
- MAMP (tested with 3.0.7.3)
- Node.js
- it uses the MAMP bash scripts in /Applications/MAMP/bin to start and stop the server
- it overwrites the httpd.conf to change the document root
- it creates a ~/.mamp-cli file to track a favorite list of document roots
$ npm install -g mamp-cli
Depending on your setup you might need sudo in front of this command.
Use this to print the help:
$ mamp
$ mamp start
// start the server
$ mamp stop
// stop the server
$ mamp restart
// restart the Apache, run with sudo
$ mamp list
// list your favorite shortcuts
$ mamp add <shortcut>
// add the current directory to your favorites
$ mamp remove <shortcut>
// remove a shortcut
$ mamp switch <shortcut|path>
// switch the document root to the one of your shortcuts or directly pass a path
$ mamp cwd
// set the current working directory as document root
- added
mamp restart
that runsapachectl -k graceful
in background (run with sudo)
- updated
mamp add
command to log error if<shortcut>
argument is missing. (@jrmykolyn)
- added the possibility to pass a path to
mamp switch
- added the command
mamp cwd
to set the current working directory as document root
- Bugfix, thanks to PR from @cnrk
- coffee-script does not need to installed globally any morem
- added git repo to package.json
- mamp switch: set delay time to 10 secs instead of 5 secs
- started this version history
- npm settings
- npm settings
- initial commit
See file LICENSE