2017 © Pedro Peláez
 

library elgg-cli

A set of CLI tools for Elgg

image

hypejunction/elgg-cli

A set of CLI tools for Elgg

  • Wednesday, August 16, 2017
  • by hypeJunction
  • Repository
  • 1 Watchers
  • 1 Stars
  • 538 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

CLI Tools for Elgg

Elgg 2.2, (*1)

Installation

Project Scope

cd /path/to/elgg/
composer require hypejunction/elgg-cli:~1.0
vendor/bin/elgg-cli --help

Global Scope

composer global require hypejunction/elgg-cli:~1.0
cd /path/to/elgg
# if you have composer bin in your environment variables use the shortcut
elgg-cli --help

Run Commands

cd /path/to/elgg/

# Get help
vendor/bin/elgg-cli --help

# List all commands
vendor/bin/elgg-cli list

# Install Elgg
vendor/bin/elgg-cli install

# Flush caches
vendor/bin/elgg-cli site:flush_cache

# Run upgrades
vendor/bin/elgg-cli site:upgrade

# Activate plugins
vendor/bin/elgg-cli plugins:activate [--all]

# Deactivate plugins
vendor/bin/elgg-cli plugins:deactivate [--all]

# Add a new user
vendor/bin/elgg-cli user:add [--admin] [--notify]

# Display or change site URL
vendor/bin/elgg-cli site:url <new_url>

# Display or change root path
vendor/bin/elgg-cli config:path <new_path>

# Display or change data directory path
vendor/bin/elgg-cli config:dataroot <new_path>

# Request a page
vendor/bin/elgg-cli route <uri> <method> [--tokens] [--export] [--as]

# Execute an action
vendor/bin/elgg-cli action <action_name> [--as]

# Run cron
vendor/bin/elgg-cli route cron/run

# List/search entities
vendor/bin/elgg-cli entities:get [--guid] [--type] [--subtype] [--limit] [--offset] [--keyword] [--full-view]

Custom Commands

Plugins can add their commands to the CLI application, by adding command class name via 'commands','cli' hoook. Command class must extend \Symfony\Component\Console\Command\Command., (*2)

class MyCommand extends \Symfony\Component\Console\Command\Command {}

elgg_register_plugin_hook_handler('commands', 'cli', function($hook, $type, $return) {
    $return[] = MyCommand::class;
    return $return;
});

The Versions

16/08 2017

dev-master

9999999-dev

A set of CLI tools for Elgg

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

06/07 2017

1.2.1

1.2.1.0

A set of CLI tools for Elgg

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

07/08 2016

1.2.0

1.2.0.0

A set of CLI tools for Elgg

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

03/08 2016

1.1.0

1.1.0.0

A set of CLI tools for Elgg

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

29/07 2016

1.0.0

1.0.0.0

A set of CLI tools for Elgg

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov