PHPackages                             chamilo/chash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. chamilo/chash

ActiveLibrary[CLI &amp; Console](/categories/cli)

chamilo/chash
=============

Chamilo Shell

v0.1.3(7y ago)1644.9k↓100%10[14 issues](https://github.com/chamilo/chash/issues)GPL-3.0PHPPHP &gt;=5.4CI failing

Since Dec 1Pushed 2y ago11 watchersCompare

[ Source](https://github.com/chamilo/chash)[ Packagist](https://packagist.org/packages/chamilo/chash)[ Docs](http://www.chamilo.org)[ RSS](/packages/chamilo-chash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (18)Versions (8)Used By (0)

Chamilo Shell script
====================

[](#chamilo-shell-script)

[![Latest Stable Version](https://camo.githubusercontent.com/0331ded64236f15f464468f64d88e3ba5e2b1d9e75a1283739ba4f2e6176562d/68747470733a2f2f706f7365722e707567782e6f72672f6368616d696c6f2f63686173682f762f737461626c652e706e67)](https://packagist.org/packages/chamilo/chash) [![Total Downloads](https://camo.githubusercontent.com/6bc3659e3e421554503230b76f524c1b615d97c26a690b1887a0ea66879d8db7/68747470733a2f2f706f7365722e707567782e6f72672f6368616d696c6f2f63686173682f646f776e6c6f6164732e706e67)](https://packagist.org/packages/chamilo/chash) [![Latest Unstable Version](https://camo.githubusercontent.com/aa94b2f37848f598bf50269203dfc69d42d1448261354ee354b45e4ab1bc32fa/68747470733a2f2f706f7365722e707567782e6f72672f6368616d696c6f2f63686173682f762f756e737461626c652e706e67)](https://packagist.org/packages/chamilo/chash) [![License](https://camo.githubusercontent.com/18ded1d2966e85f06ebfb90d1beba110322f86352f1fdb0e480ded41c02d2344/68747470733a2f2f706f7365722e707567782e6f72672f6368616d696c6f2f63686173682f6c6963656e73652e706e67)](https://packagist.org/packages/chamilo/chash)

The Chamilo Shell ("Chash") is a command-line PHP tool meant to speed up the management of (multiple) Chamilo portals under Linux.

Installation
============

[](#installation)

```
git clone https://github.com/chamilo/chash.git
cd chash
composer install

```

Note: If you don't have Composer installed, check Note: 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`

Usage
=====

[](#usage)

Here are a few examples of how you can use Chash:

In a Chamilo installation folder located in "/var/www/chamilo"

```
cd /var/www/chamilo
php /path/chash/chash.php chamilo:status

Chamilo $_configuration info:
Chamilo $_configuration[root_web]: http://localhost/chamilo-1.11.26-stable/
Chamilo $_configuration[root_sys]: /var/www/chamilo-1.11.26-stable/
Chamilo $_configuration[main_database]: chamilo11126_chamilo_main
Chamilo $_configuration[db_host]: localhost
Chamilo $_configuration[db_user]: root
Chamilo $_configuration[db_password]: root
Chamilo $_configuration[single_database]:
Chamilo $_configuration[db_glue]: `.`
Chamilo $_configuration[table_prefix]:

Chamilo database settings:
Chamilo setting_current['chamilo_database_version']: 1.11.0.12345
Chamilo $_configuration[system_version]: 1.11.26

```

Inside a chamilo folder execute `db:sql_cli` (or `dbc` for shorts) in order to enter to the SQL client of the Chamilo database:

```
php /path/chash.php dbc --conf=main/inc/conf/configuration.php

```

If you have configured Chash globally (see below), from any Chamilo directory:

```
chash translation:disable french

```

Building the chash.phar file
============================

[](#building-the-chashphar-file)

This 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.

You need to have curl and PHP-CLI (in order to download packages and build chash.phar)

```
apt-get install php-curl php-cli

```

If 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  for updated versions:

```
curl -sS https://getcomposer.org/installer | php
php composer.phar update --no-dev --prefer-dist

```

In order to generate the executable chash.phar file. You have to set first this php setting (in your cli php configuration file).

For example in Ubuntu /etc/php/7.4/cli/php.ini

```
phar.readonly = Off

```

(or you can also use the "-d phar.readonly=0" option as described below)

You need to download the required third parties libraries via composer (this might take a few minutes):

```
cd chash
composer update --no-dev --prefer-dist

```

Then you can call the php createPhar.php file. A new chash.phar file will be created.

In detail:

```
cd chash
composer update --no-dev
php -d phar.readonly=0 createPhar.php

```

If you're using php with suhosin, the phar might not be executed. You can try this:

```
php -d suhosin.executor.include.whitelist="phar" chash.phar

```

or you can change this setting in your /etc/php/7.4/cli/conf.d/suhosin.ini file (look for "executor"), although this might increase the vulnerability of your system. The location of the file may vary depending on your operating system.

Make it global
==============

[](#make-it-global)

To get the most out of Chash, you should move the chash.phar file to (or link from) your /usr/local/bin directory. You can do this getting inside the directory where you put chash.phar and doing:

```
chmod +x chash.phar
sudo ln -s /path/to/chash.phar /usr/local/bin/chash

```

Then you can launch chash by moving into any Chamilo installation directory and typing

```
chash

```

It will give you the details of the commands you can use to run it properly.

The most useful command to us until now has been the "chash db:sql\_cli" command, which puts you directly into a MySQL client session.

Available commands:
===================

[](#available-commands)

```
Available commands:
  ccf                                   Shortcut to files:clean_course_files
  dbc                                   Shortcut to db:sql_cli
  dbcli                                 Shortcut to db:sql_cli
  fct                                   Shortcut to files:clean_temp_folder
  fsdu                                  Shortcut to files:show_disk_usage
  fudms                                 Shortcut to files:update_directory_max_size
  help                                  Displays help for a command
  list                                  Lists commands
  selfupdate                            Updates chash to the latest version
  tasl                                  Shortcut to translation:add_sub_language
  tdl                                   Shortcut to translation:disable
  tel                                   Shortcut to translation:enable
  tl                                    Shortcut to translation:list
  tpl                                   Shortcut to translation:platform_language
  urla                                  Shortcut to user:url_access
  usl                                   Shortcut to user:set_language

chash
  chash:chamilo_install                 Execute a Chamilo installation to a specified version.
  chash:chamilo_status                  Show the information of the current Chamilo installation
  chash:chamilo_upgrade                 Execute a chamilo migration to a specified version or the latest available version
  chash:chamilo_wipe                    Prepares a portal for a new installation
  chash:self-update                     Updates chash to the latest version
  chash:setup                           Setups the migration.yml

db
  db:drop_databases                     Drops all databases from the current Chamilo install
  db:dump                               Outputs a dump of the database
  db:full_backup                        Generates a .tgz from the Chamilo files and database
  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)
  db:show_conn_info                     Shows database connection credentials for the current Chamilo install
  db:sql_cli                            Enters to the SQL command line
  db:sql_count                          Count the number of rows in a specific table

dbal
  dbal:import                           Import SQL file(s) directly to Database.
  dbal:run-sql                          Executes arbitrary SQL directly from the command line.

files
  files:clean_config_files              Cleans the config files to help you re-install
  files:clean_course_files              Cleans the courses directory
  files:clean_deleted_documents         Cleans the documents that were deleted but left as _DELETED_
  files:clean_temp_folder               Cleans the temp directory.
  files:convert_videos                  Converts all videos found in the given directory (recursively) to the given format, using the ffmpeg command line
  files:delete_courses                  Given an ID, code or category code, deletes one or several courses completely
  files:delete_multi_url                Deletes one URL out of a multi-url campus
  files:generate_temp_folders           Generate temp folder structure: twig
  files:replace_url                     Cleans the config files to help you re-install
  files:set_permissions_after_install   Set permissions
  files:show_disk_usage                 Shows the disk usage vs allowed space, per course
  files:show_mail_conf                  Returns the current mail config
  files:update_directory_max_size       Increases the max disk space for all the courses reaching a certain threshold.

info
  info:which                            Tells where to find code for Chamilo tools

migrations
  migrations:diff                       Generate a migration by comparing your current database to your mapping information.
  migrations:execute                    Execute a single migration version up or down manually.
  migrations:generate                   Generate a blank migration class.
  migrations:migrate                    Execute a migration to a specified version or the latest available version.
  migrations:status                     View the status of a set of migrations.
  migrations:version                    Manually add and delete migration versions from the version table.

translation
  translation:add_sub_language          Creates a sub-language
  translation:disable                   Disables a (enabled) language
  translation:enable                    Enables a (disabled) language
  translation:export_language           Exports a Chamilo language package
  translation:import_language           Import a Chamilo language package
  translation:list                      Gets all languages as a list
  translation:platform_language         Gets or sets the platform language
  translation:terms_package             Generates a package of given language terms

user
  user:change_pass                      Updates the user password to the one given
  user:disable_admins                   Makes the given user admin on the main portal
  user:make_admin                       Makes the given user admin on the main portal
  user:reset_login                      Outputs login link for given username
  user:set_language                     Sets the users language to the one given
  user:url_access                       Show the access per Url

```

Licensing
=========

[](#licensing)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see .

Mail:

Misc
====

[](#misc)

[![Build Status](https://camo.githubusercontent.com/8e189f59895df6e04ca07dfd7a05392008923d1de3136bf6264ee39ef1a50cf9/68747470733a2f2f6170692e7472617669732d63692e6f72672f6368616d696c6f2f63686173682e706e67)](https://travis-ci.org/chamilo/chash)

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance3

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~218 days

Recently: every ~267 days

Total

6

Last Release

1989d ago

PHP version history (3 changes)v0.1.0PHP &gt;=5.4

0.1.x-devPHP &gt;=5.6

0.2.x-devPHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7466ac117bd89350ce152badae783792f23b4865174610ed39994b8c62ba0cb4?d=identicon)[jmontoya](/maintainers/jmontoya)

---

Top Contributors

[![jmontoyaa](https://avatars.githubusercontent.com/u/158935?v=4)](https://github.com/jmontoyaa "jmontoyaa (413 commits)")[![ywarnier](https://avatars.githubusercontent.com/u/609839?v=4)](https://github.com/ywarnier "ywarnier (185 commits)")[![aigualada](https://avatars.githubusercontent.com/u/2330870?v=4)](https://github.com/aigualada "aigualada (2 commits)")[![AngelFQC](https://avatars.githubusercontent.com/u/1697880?v=4)](https://github.com/AngelFQC "AngelFQC (1 commits)")[![cesarperales](https://avatars.githubusercontent.com/u/79233?v=4)](https://github.com/cesarperales "cesarperales (1 commits)")

---

Tags

chamiloclipharphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chamilo-chash/health.svg)

```
[![Health](https://phpackages.com/badges/chamilo-chash/health.svg)](https://phpackages.com/packages/chamilo-chash)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
