Pixel Everywhere

There are only 10 types of people in this world. Those who know binary and those who don't.

Useful CLI Commands — June 16, 2015

Useful CLI Commands

There are infinite commands out there but it’s a good to write a small amount of them. My world usually revolves around these commands when inside a project folder:

Composer

  • Installing: $ curl -sS https://getcomposer.org/installer | php
  • Using: $ composer install[, require, remove, search] [package]
  • Updating: $ composer update (after deleting or updating lock file)
  • Creating $ composer init
  • For any PHAR or JSON issues, re-install Cygwin

PHPDoc

  • File: $ php phpDocumentor.phar  -f path/to/an/additional/file -t path/to/my/api/docs
  • Directory: $ php phpDocumentor.phar -d path/to/my/project -t path/to/my/api/docs

cURL

  • $  curl -X DELETE  –data “id=1” -H “Accept:application/json” http://localhost/project/user

Git

  • $ git add .
  • $ git commit -m ‘Message.’ -a
  • $ git tag -a 1.0.0.0 -m ‘Major release.’
  • $ git push origin master
  • $ git push origin –tags

NodeJS

  • $ taskkill /IM node.exe (if an app/server is stuck, use this command)
  • $ npm ls -g –depth=0 (remove depth to list all dependencies)
Advertisements