#Insightly cli
- Clone the repository.
- Run
cd app && composer install
- Copy
config-sample.php
toconfig.php
and add the Insightly API key. See here on how to find it. - If you want to use every aspect of the
guess
command, you need the other APIs as well.
From the root folder of the project:
sudo ./build.sh
Or as a Windows user, run the following and follow the end-stage instruction:
build.bat
You can now access the script from anywhere through the command isc
.
git pull
cd app
composer install
cd ..
sudo ./build.sh
isc rebuild-cache
To get information on available commands, run isc help
.
To avoid having to wait for cache rebuilding - cache is invalidated every hour - rebuild it in a cronjob by adding this to your crontab:
*/30 * * * * isc rebuild-cache
To make a new command, create it in the directory includes/src/commands
. It must be a class extending the Command
base class.
Implement all required methods, and then add it to the core in insightly-cli.php. To do that, add it to the array in the instantiation of the Core class in insightly-cli.php.
Example:
$core = new \Dekode\InsightlyCli\Core( [ new \Dekode\InsightlyCli\Commands\Find(), new \Dekode\InsightlyCli\Commands\MyNewCommand() ] );