Download the PHP package nyt/sugarcli-nyt without Composer
On this page you can find all versions of the php package nyt/sugarcli-nyt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sugarcli-nyt
SugarCli
SugarCli is a command line tool to install and manage SugarCRM installations.
Installing
Get the phar archive at http://apt.inetprocess.fr/pub/sugarcli.phar
. Allow the execution and run it.
Or clone this git repository and use ./bin/sugarcli
.
Building
Clone the git repository and run php -dphar.readonly=0 bin/compile
.
It will build the sugarcli.phar
at the top of the git project.
Configuration
You can save some configurations options in different location. The latter one will override the previous one:
/etc/sugarclirc
$HOME/.sugarclirc
./.sugarclirc
Command line parameters will override these configurations.
Example
Usage
./sugarcli.phar --help
: This will give you the help and list of available commands.
Development
Run tests
Copy the file phpunit.xml.dist
to phpunit.xml
and edit the environment variables.
Run the full test suite with bin/phpunit
or exclude groups to avoid required external resources bin/phpunit --exclude-group inventory,sugarcrm-db
Available groups:
- inventory
- sugarcrm-db
- sugarcrm-path
- sugarcrm-url
Commands
- Clean language files
- Install a SugarCRM
- Manage
fields_meta_data
andrelationships
tables - Inventory
- User Management
- System
- Logic Hooks
- Vardefs Extractor
- Code Generator
Clean language files
The main command is ./sugarcli.phar clean:langfiles
Parameters
Test run
./sugarcli.phar clean:langfiles --test path/to/sugar
This will parse the custom languages files from sugar. It should return the files as is.
Clean without sorting.
./sugarcli.phar clean:langfiles --no-sort path/to/sugar
This will clean the lang files by removing unecessary whitespaces and remove duplicates in variables definitions.
Clean and sort
./sugarcli.phar clean:langfiles path/to/sugar
This will clean and sort the language files. All defined variables will be sorted by name.
Install a SugarCRM
The main command is ./sugarcli.phar install
Subcommands are :
Configure your installation
./sugarcli.phar install:config:get
will create a config_si.php
in the current directory.
This provides default settings for the installer. You will need to complete some require parameters like db information, usernames and passwords. Required fields are in the form <VALUE>
.
install:config:get
- Parameters
install:check
- Parameters
Run the installer
./sugarcli.phar install:run [-f|--force] [-s|--source[="..."]] [-c|--config[="..."]] path url
You need to specify an installation path and the public url for your sugar installation.
The installer will extract a SugarCRM installation package named sugar.zip or specified with the --source
option.
It will use the --config
option to use for the installation.
install:run
- Parameters
Examples
Use -v
or -vv
to add more verbose output.
Manage fields_meta_data
and relationships
tables
Two groups of commands are available to export and sync the content of the fields_meta_data table (custom fields from studio) and relationships (default and custom relationships).
The first has metadata
as a prefix and the second has rels
By default the metadata definition file will be <sugar_path>/../db/fields_meta_data.yaml
and the relationships will be <sugar_path>/../db/relationships.yaml
.
You can override it with the --metadata-file
parameter for all the metadata
sub-commands and --file
parameter for all the rels
subcommands.
The main command are then ./sugarcli.phar metadata
and ./sugarcli.phar rels
Subcommands are :
The following explanations are made for metadata
but are similar for rels
Load definition to the database
sugarcli {type}:loadfromfile
Load fields defined in the meta data file to update the database.
metadata:loadfromfile
Parameters
rels:loadfromfile
Parameters
Write definition to a file
sugarcli {type}:dump
You can dump the current DB fields_meta_data (or relationships) contents into the definition file.
You can also use the --add
, --del
, --update
flags to only add, delete or update fields (or relationships).
The fields specified after the command line will allow you to act only on specific fields (or relationships).
metadata:dumptofile
Parameters
rels:dumptofile
Parameters
Get the Status
sugarcli {type}:status -p path/to/sugar
This will show which fields are differing between the definition file and the database.
metadata:status
Parameters
rels:status
Parameters
Inventory
The main command is ./sugarcli.phar inventory
Subcommands are :
Get Facts about your environment.
./sugarcli.phar inventory:facter --path <sugracrm_path> --format yml
will give you a yaml file with various information about
the system and the sugarcrm instance.
inventory:facter
Parameters
Report information to an inventory server.
./sugarcli.phar inventory:agent --path <sugarcrm_path> --account-name 'Name of client' <inventory_url> <username> <password>
This will send all the gathered facts to the inventory server.
inventory:agent
Parameters
User management
The main command is ./sugarcli.phar user
Subcommands are :
Update a user
./sugarcli.phar user:update --path <sugarcrm_path> --first-name=Admin --last-name='Test' myNewLogin
will update the user
myNewLogin and set the first and last name.
user:update
Parameters
Create a new user
./sugarcli.phar user:create --path <sugarcrm_path> --password=mypasword --admin=yes myNewLogin
will create a new admin user
with login myNewLogin and password mypasword.
user:create
Parameters
List users of an instance.
./sugarcli.phar user:list --path <sugarcrm_path>
will give you a nice output of the users.
You can also limit the result to a specific username (--username
) and change the output format (--format
) to json, yml or xml.
user:list
Parameters
System
The main command is ./sugarcli.phar system
Subcommands are:
Do a Quick Repair & Rebuild
./sugarcli.phar system:quickrepair --path <sugarcrm_path>
will do a basic Quick Repair & Rebuild of your SugarCRM instance.
You can also use --database
to see if Vardefs are synchronized with the Database.
If they are not in sync you can run the queries by adding --force
.
Finally, if you want to have the full output from SugarCRM, add the verbose (--verbose
) option.
system:quickrepair
Parameters
Example:
The command ./sugarcli.phar system:quickrepair --database
has that type of output:
Logic Hooks
The main command is ./sugarcli.phar hooks
Subcommands are:
List the existing logic hooks for a module
./sugarcli.phar hooks:list --path <sugarcrm_path> --module <module>
will generate of list of hooks for the specified module.
That command lists the hooks with, for each, its Weight, description, the file where the class is defined, the method called, and where it's defined.
You can also use --compact
to have the basic informations about hooks (Weight / Description / Method).
Parameters
Example
The command ./sugarcli.phar hooks:list --module Contacts --compact
gives that type of output, for a module with no Hooks:
Vardefs Extractor
Extract fields and relationships for a module
./sugarcli.phar extract:fields --path <sugarcrm_path> --module <module>
will extract all the fields defined for a module, with theirs parameters (Label, content of dropdowns, dbType, etc ...) and write 2 csv files containing the data.
Parameters
Code Generator
The main command is ./sugarcli.phar code
Subcommands are:
Execute a php file from the SugarCRM context
./sugracli.phar code:execute:file --path <sugarcrm_path> [--user-id='1'] <test.php>
will execute the file test.php
by loading
first the sugarcrm environment. So the script can directly use the classes and db from sugar.
You can also set the user_id from the command line to have another one than the default administrator.
All versions of sugarcli-nyt with dependencies
ext-curl Version *
ext-reflection Version *
csanquer/colibri-csv Version 1.1.*
guzzle/guzzle Version ~3.9
inetprocess/libinventoryclient Version ^1.0
inetprocess/libsugarcrm Version ^1.2
inetprocess/neuralyzer Version ~0.6
jms/serializer Version ~0.16
padraic/phar-updater Version ^1.0
symfony/config Version ^2.8
symfony/console Version ^2.8
symfony/dependency-injection Version ^2.8
symfony/filesystem Version ^2.8
symfony/finder Version ^2.8
symfony/process Version ^2.8
symfony/stopwatch Version ^2.8
symfony/yaml Version ^2.8