Cette traduction est en retard : la version française a été modifiée depuis. Voir la version française

Configuration

DOLPATH environment variable

Dolicli needs to know the path to the htdocs/ folder of your Dolibarr installation. This path is defined by the DOLPATH environment variable.

One-off use

Prefix each command with the variable:

DOLPATH=/var/www/dolibarr/htdocs/ ./dolibarr user list

Permanent use (session)

Export the variable for the current session:

export DOLPATH=/var/www/dolibarr/htdocs/
./dolibarr user list

Permanent use (profile)

Add the following line to your ~/.bashrc or ~/.zshrc file:

export DOLPATH=/var/www/dolibarr/htdocs/

Then reload your profile:

source ~/.bashrc

Default path

If DOLPATH is not defined, Dolicli looks for an htdocs/ folder in the current directory. This behavior suits you if you place Dolicli at the root of your Dolibarr installation.

Verification

To check that the connection works, run:

./dolibarr

If the configuration is correct, Dolicli displays the detected Dolibarr version and the list of available commands.

Warning: the path must point to the htdocs/ folder that contains Dolibarr's master.inc.php file. If the file is not found, Dolicli displays an error message and stops.

Debug mode

Debug mode is enabled by default in the application configuration (config/app.php). It allows displaying detailed error messages in case of a problem.