{"id":15173068,"url":"https://github.com/theodorosploumis/drec","last_synced_at":"2025-10-01T10:31:20.686Z","repository":{"id":151061419,"uuid":"57311335","full_name":"theodorosploumis/drec","owner":"theodorosploumis","description":"drec (DRupal Eight Commands) - A collection of Drupal 8.x scripts used for development.","archived":true,"fork":false,"pushed_at":"2017-09-04T20:36:07.000Z","size":35,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-27T10:41:10.275Z","etag":null,"topics":["cli","command-line","command-line-tool","drupal","drupal8"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theodorosploumis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-28T15:12:55.000Z","updated_at":"2023-09-08T17:09:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc5b8f5e-9c2a-42ec-b353-759779a55e68","html_url":"https://github.com/theodorosploumis/drec","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"046385e77c46c50343da3a4800c5188b40b08d0f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theodorosploumis","download_url":"https://codeload.github.com/theodorosploumis/drec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234858829,"owners_count":18897817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","command-line-tool","drupal","drupal8"],"created_at":"2024-09-27T10:40:32.833Z","updated_at":"2025-10-01T10:31:15.428Z","avatar_url":"https://github.com/theodorosploumis.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"drec-logo.png\" align=\"right\" alt=\"drec logo\"\u003e\n\n## drec\n\nDRupal Eight Commands (DR.E.C.)\n\nDrupal 8.x development scripts.\n\n### About\nA collection of basic bash scripts that work together to accomplish common\ndevelopment tasks for **Drupal 8.x** projects.\n\nYou could probably use `drec` locally or on a development environment\nand not on a production server.\n\nYour local (or other development) UNIX environment should be consisted of:\n - apache\n - mysql-server\n - php\n - [drupalconsole](http://drupalconsole.com)\n - drush\n - composer\n - git\n - [virtualhost script](https://github.com/RoverWire/virtualhost)\n - docker\n\nWorks (hopefully) on UNIX systems.\n\n### Install\n - Download project (prefer with git)\n - Create an alias to file `drec.sh`\n - Test it on the cli `drec`\n\n### Running commands\n\n - You should run usually more that 2 commands together.\n - Some commands need some other in order to work properly.\n - The order of the commands is the order of execution.\n - You can run `drec` from any location.\n - The configuration file has a suffix of `.drecfile` and it is a plain text.\n\n#### See available help\n\n```\n// Simply run:\ndrec\n```\n\n#### Basic commands (more to be added)\n\n| Command | Description |\n|---------|-------------|\n| git-clone | Clone a site from a git repo |\n| create-folder | Create the project folder |\n| delete-folder | Delete the project folder |\n| create-vhost | Create a virtualhost for project's domain |\n| delete-vhost | Create a virtualhost |\n| install-drupal | Install Drupal using drush |\n| prepare-install | Prepare a Drupal site for installation (public files, writable settings etc) |\n| create-docker | Create a docker container |\n| delete-docker | Delete a docker container |\n| create-drush | Create a drush alias |\n| delete-drush | Delete a drush alias |\n| composer-install | Run `composer install` on the project folder |\n| composer-project | Run `composer create-project ...` on the project folder |\n| create-db | Create a mysql database |\n| download-db | Download a mysql database |\n| delete-db | Delete a mysql database |\n| askme | Asks user to continue or exit |\n| init | Create a *.drecfile settings file on the ~/.drec folder |\n| delete-project | Delete all project files, database, container, drush alias etc |\n| projects | Show all *.drecfile filenames inside ~/.drec folder |\n| debug | Show variables on cli |\n\n\n#### Usage examples\n\n```\n// Clone a project and start a docker container with mapping folders\ndrec init,git-clone,create-docker\n\n// Clone a project from a git repo, create a virtualhost and create a new configuration file\ndrec init,git-clone,create-vhost\n\n// Create a new database, clone from git repo, prepare for Drupal installation and install Drupal\ndrec init,create-db,git-clone,prepare-install,install-drupal\n\n// Just debug a configuration file and read its values\ndrec debug /path/to/MYFILE.drecfile\ndrec debug filename/of/.drecfile\n```\n\n### Extend the commands (TBD, not working at the moment!)\n  - Copy the default file default.command.txt inside the folder `commands`.\n  - Add your commands on it (read the docs inside).\n  - Change it to be a `.sh` file.\n  - Make it executable (`chmod +x /path/to/command`)\n  - Source it to the file `drec.commands` (read the docs inside)\n  - Test it `drec \u003cnew_command\u003e`\n  - Add the new command to the command help on `drec.sh` file\n  - Update the README.md\n  - Is the command so cool, create a pull request to add this on the default commands\n\n### Configuration file\n`drec` creates or reads any file with suffix `.drecfile`.\nExample `myProject.drecfile`.\n\nHere is an example of such a file. See the default file at [settings/default.drecfile](settings/default.drecfile)\n\n```\nPROJECT_TITLE=\"drec - This is my title\"\nREPO=\"git@github.com:drupal/drupal.git\"\nROOT=\"/var/www/html\"\nPROFILE=\"minimal\"\nBRANCH=\"8.0.5\"\nDOMAIN=\"drec-example.local\"\nPROJECT_PATH=\"/var/www/html/drec-example.local\"\nHOST_PORT_HTTP=\"8098\"\nHOST_PORT_SSH=\"8012\"\nDOCKER_IMAGE=\"drupal:8.0.5-apache\"\nCONTAINER_NAME=\"minimal_8098_8012\"\nDATABASE=\"mydatabasename\"\nVHOST=\"drec-example.local\"\nMYSQL_USER=\"root\"\nMYSQL_PASS=\"root\"\nMYSQL_PORT=\"3306\"\nPROJECT_SETTINGS=\"~/.drec/drecexamplelocal.drecfile\"\n```\n### Roadmap and future plans\n\n  - Add validation and checks per variable (eg on input)\n  - Add validation or reformat of the .drecfile (structure)\n  - Make separated setups (files) for each variable\n  - Make commands more independent\n  - Create an installation script for the whole repo (shortcut)\n  - Add better description/docs for the commands\n  - Create a docker-compose.yml file from the settings\n\n### Similar tools\n\nSee a more complete list at [Drupal (local) development tools](http://goo.gl/ucwWdt).\n\n - [Dropcat - Deploy tool for Drupal](https://gitlab.wklive.net/wk-public/dropcat)\n - [drush fetcher](https://www.drupal.org/project/fetcher)\n - [druleton/druleton](https://github.com/druleton/druleton)\n - [popstas/drupal-scripts](https://github.com/popstas/drupal-scripts)\n - [cul-it/drupal-scripts](https://github.com/cul-it/drupal-scripts)\n - [jazio/drustalls](https://github.com/jazio/drustalls)\n - [electrickite/damp](https://github.com/electrickite/damp)\n - [geraldvillorente/drupaltools](https://github.com/geraldvillorente/drupaltools)\n - [anavarre/drupal-8-tools](https://github.com/anavarre/drupal-8-tools)\n - [unb-libraries/pushback](https://github.com/unb-libraries/pushback)\n - [psynaptic/bash_kit](https://github.com/psynaptic/bash_kit)\n - [reactivestudio/SH](https://github.com/reactivestudio/SH)\n - [rafaqz/drupal_build_scripts](https://github.com/rafaqz/drupal_build_scripts)\n - [alexharries/drupal-scripts-of-usefulness](https://github.com/alexharries/drupal-scripts-of-usefulness)\n - [felloe/drupal8installer](https://github.com/felloe/drupal8installer)\n - [meosch/localdevsetup](https://github.com/meosch/localdevsetup)\n - [acquia/blt](https://github.com/acquia/blt)\n\n\n### License\n\n[MIT](LICENSE)\n\nDrupal is a [registered trademark](http://drupal.com/trademark) of [Dries Buytaert](http://buytaert.net/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorosploumis%2Fdrec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodorosploumis%2Fdrec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorosploumis%2Fdrec/lists"}