{"id":28926778,"url":"https://github.com/chamilo/chash","last_synced_at":"2025-06-22T12:12:57.648Z","repository":{"id":6740772,"uuid":"7986995","full_name":"chamilo/chash","owner":"chamilo","description":"Chamilo Shell","archived":false,"fork":false,"pushed_at":"2024-03-13T10:44:53.000Z","size":1843,"stargazers_count":16,"open_issues_count":14,"forks_count":10,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-06-12T09:27:55.751Z","etag":null,"topics":["chamilo","cli","phar","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chamilo.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}},"created_at":"2013-02-03T05:57:12.000Z","updated_at":"2025-04-09T10:09:27.000Z","dependencies_parsed_at":"2024-04-14T23:21:57.043Z","dependency_job_id":"d2b7f0ca-1caa-4ed0-9f76-683eeeca0b56","html_url":"https://github.com/chamilo/chash","commit_stats":{"total_commits":573,"total_committers":8,"mean_commits":71.625,"dds":"0.31064572425828973","last_synced_commit":"3d9aaa9a8829f7f773ad2d428b98b7c8f45eef99"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/chamilo/chash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilo%2Fchash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilo%2Fchash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilo%2Fchash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilo%2Fchash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chamilo","download_url":"https://codeload.github.com/chamilo/chash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chamilo%2Fchash/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261075419,"owners_count":23105867,"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":["chamilo","cli","phar","php"],"created_at":"2025-06-22T12:12:05.327Z","updated_at":"2025-06-22T12:12:57.628Z","avatar_url":"https://github.com/chamilo.png","language":"PHP","readme":"Chamilo Shell script\n====================\n\n[![Latest Stable Version](https://poser.pugx.org/chamilo/chash/v/stable.png)](https://packagist.org/packages/chamilo/chash) [![Total Downloads](https://poser.pugx.org/chamilo/chash/downloads.png)](https://packagist.org/packages/chamilo/chash) [![Latest Unstable Version](https://poser.pugx.org/chamilo/chash/v/unstable.png)](https://packagist.org/packages/chamilo/chash) [![License](https://poser.pugx.org/chamilo/chash/license.png)](https://packagist.org/packages/chamilo/chash)\n\nThe Chamilo Shell (\"Chash\") is a command-line PHP tool meant to speed up the management of (multiple)\nChamilo portals under Linux.\n\nInstallation\n====================\n\n    git clone https://github.com/chamilo/chash.git\n    cd chash\n    composer install\n\nNote: If you don't have Composer installed, check http://getcomposer.org/download/\nNote: To use Chash with PHP 7.4 and Chamilo 1.11, please use branch 0.1: `git clone -b 0.1 https://github.com/chamilo/chash.git`\n\nUsage\n====================\n\nHere are a few examples of how you can use Chash:\n\nIn a Chamilo installation folder located in \"/var/www/chamilo\"\n\n    cd /var/www/chamilo\n    php /path/chash/chash.php chamilo:status\n\n    Chamilo $_configuration info:\n    Chamilo $_configuration[root_web]: http://localhost/chamilo-1.11.26-stable/\n    Chamilo $_configuration[root_sys]: /var/www/chamilo-1.11.26-stable/\n    Chamilo $_configuration[main_database]: chamilo11126_chamilo_main\n    Chamilo $_configuration[db_host]: localhost\n    Chamilo $_configuration[db_user]: root\n    Chamilo $_configuration[db_password]: root\n    Chamilo $_configuration[single_database]:\n    Chamilo $_configuration[db_glue]: `.`\n    Chamilo $_configuration[table_prefix]:\n\n    Chamilo database settings:\n    Chamilo setting_current['chamilo_database_version']: 1.11.0.12345\n    Chamilo $_configuration[system_version]: 1.11.26\n\n\nInside a chamilo folder execute `db:sql_cli` (or `dbc` for shorts) in order to enter to the SQL client of the Chamilo database:\n\n    php /path/chash.php dbc --conf=main/inc/conf/configuration.php\n\nIf you have configured Chash globally (see below), from any Chamilo directory:\n\n    chash translation:disable french\n\n\nBuilding the chash.phar file\n====================\n\nThis procedure is only required once, and is generally for developers. If you update chash frequently, you'll have to go through this each time you update, but never more than that.\n\nYou need to have curl and PHP-CLI (in order to download packages and build chash.phar)\n\n    apt-get install php-curl php-cli\n\nIf you don't have composer installed on your computer, you can just do the following to download and install it and run the command above. Check https://getcomposer.org/download/ for updated versions:\n\n    curl -sS https://getcomposer.org/installer | php\n    php composer.phar update --no-dev --prefer-dist\n\nIn order to generate the executable chash.phar file. You have to set first this php setting (in your cli php configuration file).\n\nFor example in Ubuntu /etc/php/7.4/cli/php.ini\n\n    phar.readonly = Off\n\n(or you can also use the \"-d phar.readonly=0\" option as described below)\n\nYou need to download the required third parties libraries via composer (this might take a few minutes):\n\n    cd chash\n    composer update --no-dev --prefer-dist\n\nThen you can call the php createPhar.php file. A new chash.phar file will be created.\n\nIn detail:\n\n    cd chash\n    composer update --no-dev\n    php -d phar.readonly=0 createPhar.php\n\nIf you're using php with suhosin, the phar might not be executed. You can try this:\n\n    php -d suhosin.executor.include.whitelist=\"phar\" chash.phar\n\nor you can change this setting in your /etc/php/7.4/cli/conf.d/suhosin.ini file\n(look for \"executor\"), although this might increase the vulnerability of your\nsystem. The location of the file may vary depending on your operating system.\n\n\nMake it global\n====================\n\nTo get the most out of Chash, you should move the chash.phar file to\n(or link from) your /usr/local/bin directory. You can do this getting inside\nthe directory where you put chash.phar and doing:\n\n    chmod +x chash.phar\n    sudo ln -s /path/to/chash.phar /usr/local/bin/chash\n\nThen you can launch chash by moving into any Chamilo installation directory and\ntyping\n\n    chash\n\nIt will give you the details of the commands you can use to run it properly.\n\nThe most useful command to us until now has been the \"chash db:sql_cli\" command,\nwhich puts you directly into a MySQL client session.\n\nAvailable commands:\n====================\n\n    Available commands:\n      ccf                                   Shortcut to files:clean_course_files\n      dbc                                   Shortcut to db:sql_cli\n      dbcli                                 Shortcut to db:sql_cli\n      fct                                   Shortcut to files:clean_temp_folder\n      fsdu                                  Shortcut to files:show_disk_usage\n      fudms                                 Shortcut to files:update_directory_max_size\n      help                                  Displays help for a command\n      list                                  Lists commands\n      selfupdate                            Updates chash to the latest version\n      tasl                                  Shortcut to translation:add_sub_language\n      tdl                                   Shortcut to translation:disable\n      tel                                   Shortcut to translation:enable\n      tl                                    Shortcut to translation:list\n      tpl                                   Shortcut to translation:platform_language\n      urla                                  Shortcut to user:url_access\n      usl                                   Shortcut to user:set_language\n\n    chash\n      chash:chamilo_install                 Execute a Chamilo installation to a specified version.\n      chash:chamilo_status                  Show the information of the current Chamilo installation\n      chash:chamilo_upgrade                 Execute a chamilo migration to a specified version or the latest available version\n      chash:chamilo_wipe                    Prepares a portal for a new installation\n      chash:self-update                     Updates chash to the latest version\n      chash:setup                           Setups the migration.yml\n\n    db\n      db:drop_databases                     Drops all databases from the current Chamilo install\n      db:dump                               Outputs a dump of the database\n      db:full_backup                        Generates a .tgz from the Chamilo files and database\n      db:restore                            Allows you to restore an SQL dump right into the active database of a given Chamilo installation (which will also erase all previous data in that database)\n      db:show_conn_info                     Shows database connection credentials for the current Chamilo install\n      db:sql_cli                            Enters to the SQL command line\n      db:sql_count                          Count the number of rows in a specific table\n\n    dbal\n      dbal:import                           Import SQL file(s) directly to Database.\n      dbal:run-sql                          Executes arbitrary SQL directly from the command line.\n\n    files\n      files:clean_config_files              Cleans the config files to help you re-install\n      files:clean_course_files              Cleans the courses directory\n      files:clean_deleted_documents         Cleans the documents that were deleted but left as _DELETED_\n      files:clean_temp_folder               Cleans the temp directory.\n      files:convert_videos                  Converts all videos found in the given directory (recursively) to the given format, using the ffmpeg command line\n      files:delete_courses                  Given an ID, code or category code, deletes one or several courses completely\n      files:delete_multi_url                Deletes one URL out of a multi-url campus\n      files:generate_temp_folders           Generate temp folder structure: twig\n      files:replace_url                     Cleans the config files to help you re-install\n      files:set_permissions_after_install   Set permissions\n      files:show_disk_usage                 Shows the disk usage vs allowed space, per course\n      files:show_mail_conf                  Returns the current mail config\n      files:update_directory_max_size       Increases the max disk space for all the courses reaching a certain threshold.\n    \n    info\n      info:which                            Tells where to find code for Chamilo tools\n\n    migrations\n      migrations:diff                       Generate a migration by comparing your current database to your mapping information.\n      migrations:execute                    Execute a single migration version up or down manually.\n      migrations:generate                   Generate a blank migration class.\n      migrations:migrate                    Execute a migration to a specified version or the latest available version.\n      migrations:status                     View the status of a set of migrations.\n      migrations:version                    Manually add and delete migration versions from the version table.\n\n    translation\n      translation:add_sub_language          Creates a sub-language\n      translation:disable                   Disables a (enabled) language\n      translation:enable                    Enables a (disabled) language\n      translation:export_language           Exports a Chamilo language package\n      translation:import_language           Import a Chamilo language package\n      translation:list                      Gets all languages as a list\n      translation:platform_language         Gets or sets the platform language\n      translation:terms_package             Generates a package of given language terms\n\n    user\n      user:change_pass                      Updates the user password to the one given\n      user:disable_admins                   Makes the given user admin on the main portal\n      user:make_admin                       Makes the given user admin on the main portal\n      user:reset_login                      Outputs login link for given username\n      user:set_language                     Sets the users language to the one given\n      user:url_access                       Show the access per Url\n\nLicensing\n=========\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\nMail: info@chamilo.org\n\nMisc\n====\n\n[![Build Status](https://api.travis-ci.org/chamilo/chash.png)](https://travis-ci.org/chamilo/chash)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchamilo%2Fchash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchamilo%2Fchash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchamilo%2Fchash/lists"}