Kirby CLI installation doesn't work

Hi. Want to use CLI in future. Composer installed, kirby cli installed.
That’s the result with “kirby install”… any ideas?

p386329:/home/www/p386329/html > kirby install
Kirby CLI 1.6.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help               Displays help for a command
  install            Creates a new Kirby installation
  list               Lists commands
  uninstall          Removes the Kirby installation
  update             Updates a Kirby CMS installation
  version            Prints the current versions of the core, the toolkit and the panel of your installation
 clear
  clear:cache        Flushes the cache
  clear:thumbs       Flushes the thumbs folder
 delete
  delete:blueprint   Deletes a blueprint
  delete:controller  Deletes a controller
  delete:plugin      Deletes a plugin
  delete:snippet     Deletes a snippet
  delete:tag         Deletes a tag
  delete:template    Deletes a template
  delete:user        Deletes a user
 install
  install:core       Installs the Kirby core
  install:htaccess   Installs the default .htaccess in the current directory
  install:index.php  Installs the default index.php in the current directory
  install:panel      Installs the Kirby panel
  install:toolkit    Installs the Kirby toolkit
 make
  make:blueprint     Creates a new blueprint
  make:controller    Creates a new controller
  make:plugin        Creates a new plugin
  make:snippet       Creates a new snippet
  make:tag           Creates a new Kirbytext tag
  make:template      Creates a new template
  make:user          Creates a new user account
 plugin
  plugin:install     Installs a new Kirby plugin from Github
  plugin:uninstall   Removes a Kirby plugin
  plugin:update      Updates a Kirby plugin
 uninstall
  uninstall:panel    Deletes the panel
Content-type: text/html; charset=UTF-8

<br />
<b>Notice</b>:  Undefined index: argv in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>55</b><br />
<br />
<b>Warning</b>:  array_shift() expects parameter 1 to be array, null given in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>59</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>268</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
p386329:/home/www/p386329/html > 

-Alex

You have to tell the CLI what you want to install, just typing Kirby install is not enough, I’m afraid. Please check out the CLI documentation. Example:

kirby install --kit starterkit

Here https://github.com/getkirby/cli the documentation says “Creates a new Kirby installation. --kirby install-- By default the starterkit will be installed in a new directory called kirby. You can specify the directory with the second argument” and “You can also install any other official Kirby kit (starterkit, plainkit, langkit) with the --kit option”

So i tried both. The same:

p386329:/home/www/p386329/html > kirby install --kit starterkit
Kirby CLI 1.6.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help               Displays help for a command
  install            Creates a new Kirby installation
  list               Lists commands
  uninstall          Removes the Kirby installation
  update             Updates a Kirby CMS installation
  version            Prints the current versions of the core, the toolkit and the panel of your installation
 clear
  clear:cache        Flushes the cache
  clear:thumbs       Flushes the thumbs folder
 delete
  delete:blueprint   Deletes a blueprint
  delete:controller  Deletes a controller
  delete:plugin      Deletes a plugin
  delete:snippet     Deletes a snippet
  delete:tag         Deletes a tag
  delete:template    Deletes a template
  delete:user        Deletes a user
 install
  install:core       Installs the Kirby core
  install:htaccess   Installs the default .htaccess in the current directory
  install:index.php  Installs the default index.php in the current directory
  install:panel      Installs the Kirby panel
  install:toolkit    Installs the Kirby toolkit
 make
  make:blueprint     Creates a new blueprint
  make:controller    Creates a new controller
  make:plugin        Creates a new plugin
  make:snippet       Creates a new snippet
  make:tag           Creates a new Kirbytext tag
  make:template      Creates a new template
  make:user          Creates a new user account
 plugin
  plugin:install     Installs a new Kirby plugin from Github
  plugin:uninstall   Removes a Kirby plugin
  plugin:update      Updates a Kirby plugin
 uninstall
  uninstall:panel    Deletes the panel
Content-type: text/html; charset=UTF-8

<br />
<b>Notice</b>:  Undefined index: argv in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>55</b><br />
<br />
<b>Warning</b>:  array_shift() expects parameter 1 to be array, null given in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>59</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>268</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/files/swm2/composer/.composer/vendor/symfony/console/Input/ArgvInput.php</b> on line <b>284</b><br />
p386329:/home/www/p386329/html >

What do you get if you type composer -v?

p386329:~ > composer -V
Composer version 1.5-dev (2e9dbb79ef63036090d01b07d005428e05c8a5fc) 2017-03-11 16:11:59

Also tried:

Composer version 1.4.1

Hm, I found some sources that hint to console not working when running PHP in CGI? But honestly, I have too little knowledge with this regard.

These are in another context, but still…


hmm… ok thx… at first I will test it with another PHP configuration

Aaaand again. Thank You for Your inspiration :smiley:
Yes: composer won’t work with php cgi. I have to write this code to get it work:

php_cli kirby install

Some server configurations are different. You can also try / test:

php-cli kirby install