Need an help on cake bake

I installed PHP CLI (7.2) then I installed bake plugin by composer. In my root/bin have 3 files cake, cake.bat and cake.php.
If I run cake bake terminal echo

Command 'cake' not found, did you mean:

  command 'rake' from snap ruby (2.5.3)
  command 'cmake' from deb cmake
  command 'chake' from deb chake
  command 'rake' from deb rake
  command 'fake' from deb fake
  command 'care' from deb care
  command 'jake' from deb node-jake
  command 'make' from deb make
  command 'make' from deb make-guile

See 'snap info <snapname>' for additional versions.

If i run php cli in root/bin this is the message

emilio@emilio-System-Product-Name:/var/www/html/foods_chile/bin$ php cake bake
################################################################################
#
# Cake is a shell script for invoking CakePHP shell commands
#
# CakePHP(tm) :  Rapid Development Framework (https://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
#
# Licensed under The MIT License
# For full copyright and license information, please see the LICENSE.txt
# Redistributions of files must retain the above copyright notice.
#
# @copyright     Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
# @link          https://cakephp.org CakePHP(tm) Project
# @since         1.2.0
# @license       https://opensource.org/licenses/mit-license.php MIT License
#
################################################################################

# Canonicalize by following every symlink of the given name recursively
canonicalize() {
    NAME="$1"
    if [ -f "$NAME" ]
    then
        DIR=$(dirname -- "$NAME")
        NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME")
    fi
    while [ -h "$NAME" ]; do
        DIR=$(dirname -- "$NAME")
        SYM=$(readlink "$NAME")
        NAME=$(cd "$DIR" > /dev/null && cd "$(dirname -- "$SYM")" > /dev/null && pwd)/$(basename -- "$SYM")
    done
    echo "$NAME"
}

# Find a CLI version of PHP
findCliPhp() {
    for TESTEXEC in php php-cli /usr/local/bin/php
    do
        SAPI=$(echo "cli" | $TESTEXEC 2>/dev/null)
        if [ "$SAPI" = "cli" ]
        then
            echo $TESTEXEC
            return
        fi
    done
    echo "Failed to find a CLI version of PHP; falling back to system standard php executable" >&2
    echo "php";
}

# If current path is a symlink, resolve to real path
realname="$0"
if [ -L "$realname" ] 
then
	realname=$(readlink -f "$0")
fi

CONSOLE=$(dirname -- "$(canonicalize "$realname")")
APP=$(dirname "$CONSOLE")

# If your CLI PHP is somewhere that this doesn't find, you can define a PHP environment
# variable with the correct path in it.
if [ -z "$PHP" ]
then
    PHP=$(findCliPhp)
fi

if [ "$(basename "$realname")" != 'cake' ]
then
    exec "$PHP" "$CONSOLE"/cake.php "$(basename "$realname")" "$@"
else
    exec "$PHP" "$CONSOLE"/cake.php "$@"
fi

exit

Where am I wrong?
Thank in advance

bin/cake is a shell script, not PHP code. You should typically invoke it as bin/cake bake from the Cake root folder.

I know, but with command cake bake doesn’t work and seems plugin isn’t in my project

Add a ./
So your command screen should look like:

/var/www/html/foods_chile/bin$ ./cake bake

Thank You for your help but it is the result (maybe I am still wrong)
emilio@emilio-System-Product-Name:/var/www/html/foods_chile$ bin$ ./cake bake

Command ‘bin$’ not found, did you mean:

command ‘bino’ from deb bino
command ‘bing’ from deb bing

Try: sudo apt install

I forgot to say I am using Ubuntu 18.04 and cakephp rel 3.8, php 7.2.19

Thank You very much, now it works, U were very gentle

Glad it helped :slight_smile: