Each PHP app you create also comes with a number of development tools you can use. Remember that these development tools run inside of their own containers so the experience will be slightly different than running the same tools natively. Please see the documentation below for some the differences for each command.
If you are interested in read more about how this all works, check out the core Kalabox docs on tooling.
Here are a couple of small things to take into consideration for all your commands.
- Your entire app directory is mounted inside each container at
- Your entire
HOMEdirectory is mounted inside each container at
Here are a few examples of how these can be used:
# Export your database with drush to a files called dump.sql in your app root kbox drush sql-dump --result-file=/src/test.sql # Use an alternate SSH key with rsync kbox rsync -Pav -e 'ssh -i /user/.ssh/mykey.rsa' username@hostname:/from/dir/ /to/dir/
Runs bower commands.
# Install bower packages kbox bower install # Get the bower version kbox bower --version
Runs composer commands.
# Install dependencies with composer kbox composer install # Get the composer version kbox composer --version
Runs drush commands.
- We user either Drush 8 or Drush for Backdrop
config/drushdirectory in your app will map to
~/.drushinside the container.
- You can add custom command files or aliases in
- There is a
drushrc.phpyou can configure in
# Get the status of your drupal site kbox drush status # See all my Pantheon and custom aliases kbox drush sa # Download views kbox drush dl views -y # Get the drush version kbox drush --version
Runs git commands.
# Check the status of my git repo kbox git status # Stage all changes kbox git add --all # Commit all changes kbox git commit -m "My amazing commit" # Push master branch changes to some remote called origin kbox git push origin master # Get the git version kbox git --version
Can I use my normal git?
We only officially support using
kbox git but you may find it faster and more convenient to run your own local
Runs grunt commands.
# Run a grunt task called "grunt harder" kbox grunt harder # Get the grunt version kbox grunt --version
Runs gulp commands.
# Run a gulp task called "gulp quietly" kbox gulp quietly # Get the gulp version kbox gulp --version
Drops you into a mysql shell.
- This command actually runs against the
- By default we run commands as the
rootmysql user and against your application database.
# Drop into a mysql shell kbox mysql # Get the mysql version kbox mysql --version
Runs node commands.
- We use node 4+
# Run an arbitrary node script located locally at `~/myscript.js` kbox node /src/myscript.js # Get the node version kbox node --version
Runs npm commands.
# Install dependencies kbox npm install # Get the npm version kbox npm --version
Runs php commands.
# Print out a list of enabled php modules kbox php -m # Run an arbitrary php script located in your code root # We assume you are actually in your code root for this kbox php hamsterdance.php # Get the php version kbox php --version
Runs rysnc commands on your files directory.
- This command always runs relative to your
# Get the rsync version kbox rsync --version # Sync down pantheon files manually kbox rsync -rlvz --size-only --ipv4 --progress -e 'ssh -p 2222' email@example.com:code/sites/default/files/ /media