3.B. Reference: Command Line Tools
- 3.B.1. help
- 3.B.2. connect
- 3.B.3. install
- 3.B.4. server
- 3.B.5. update
- 3.B.6. deploy
- 3.B.7. deploy production
- 3.B.8. deploy s3
- 3.B.9. elastic
- 3.B.10. elastic flush
- 3.B.11. elastic map
- 3.B.12. elastic populate
- 3.B.13. package
- 3.B.14. package install
- 3.B.15. package list
- 3.B.16. package remove
- 3.B.17. package search
- 3.B.18. package update
- 3.B.19. redis
- 3.B.20. redis
- 3.B.21. sql
- 3.B.22. sql flush
- 3.B.23. sql build
- 3.B.24. sql populate
Command line tools are used to better control the stack of your project.
3.B.1. help
General help menu
Usage
$ cradle help
3.B.2. connect
Connects to a server. see: config/deploy.php
Usage
$ cradle connect app-1
3.B.3. install
Connects to a server. see: config/deploy.php
Parameters
-f | --force
- Installs Cradle force overriding files--skip-sql
- Installs Cradle, but skips the SQL part--skip-versioning
- Installs Cradle but skips updating the packages--skip-mkdir
- Installs Cradle but skips the making of cache folders--skip-chmod
- Installs Cradle but skips the permission settings-h
- Database Host-u
- Database user-p
- Database password
Usage
$ cradle install
$ cradle install -f
$ cradle install --force
$ cradle install --skip-sql
$ cradle install --skip-versioning
$ cradle install -h 127.0.0.1 -u root -p 123
3.B.4. server
Starts a PHP server
Parameters
-h
- Server Host-p
- Server Port
Usage
$ cradle server -h 127.0.0.1 -p 8888
3.B.5. update
Updates all packages to their latest version
Usage
$ cradle update
3.B.6. deploy
Deploy Commands
Usage
$ cradle deploy
$ cradle deploy help
3.B.7. deploy production
Deploys code to server see: config/deploy.php
Usage
$ cradle deploy production
3.B.8. deploy s3
Uploads static assets to S3. see: config/services.php
Parameters
--include-yarn
- Uploads static assets to S3 including Yarn folder--include-upload
- Uploads static assets to S3 including upload folder
Usage
$ cradle deploy s3
$ cradle deploy s3 --include-yarn
$ cradle deploy s3 --include-upload
3.B.9. elastic
ElasticSearch Commands
Usage
$ cradle elastic
$ cradle elastic help
3.B.10. elastic flush
Truncates the entire index
Usage
$ cradle elastic flush
$ cradle elastic flush foo/bar
3.B.11. elastic map
Submits the ElasticSearch schema
Usage
$ cradle elastic map
$ cradle elastic map foo/bar
3.B.12. elastic populate
Submits the ElasticSearch schema related to given package
Usage
$ cradle elastic populate
$ cradle elastic populate foo/bar
3.B.13. package
Package Commands
Usage
$ cradle package
$ cradle package help
3.B.14. package install
Installs a package from packagist
Usage
$ cradle package install foo/bar
$ cradle package install foo/bar 1.0.0
3.B.15. package list
Lists out all the available packages
Usage
$ cradle package list
3.B.16. package remove
Removes a package
Usage
$ cradle package remove foo/bar
3.B.17. package search
Searches packagist for a particular package
Usage
$ cradle package search foobar
3.B.18. package update
Updates a package to its latest version
Usage
$ cradle package update foo/bar
$ cradle package update foo/bar 1.0.0
3.B.19. redis
Redis Commands
Usage
$ cradle redis
$ cradle redis help
3.B.20. redis flush
Truncates the entire cache
Usage
$ cradle redis flush
$ cradle redis flush foo/bar
3.B.21. sql
SQL Commands
Usage
$ cradle sql
$ cradle sql help
3.B.22. sql flush
Truncates the entire database
Usage
$ cradle sql flush
$ cradle sql flush foo/bar
3.B.23. sql build
Rebuilds the database schema
Usage
$ cradle sql build
$ cradle sql build foo/bar
3.B.24. sql populate
Populates all the tables of every package
Usage
$ cradle sql populate
$ cradle sql populate foo/bar