Fork me on GitHub
Phraseanet Documentation

Console

Phraseanet provides two command line tools: bin/console and bin/setup. Command console can be executed once Phraseanet has been installed, whereas command bin/setup can be executed at any moment, for example before installing or upgrading or for any troubleshooting purposes.

Konsole Kommander

Konsole Kommander is a commandline tool to manage Phraseanet. It is simple to use, from the Phraseanet installation directory type:

php bin/console

Previous example displays the available commands:

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
  list                                      Lists commands
 about
  about:authors                             Lists authors and contributors
  about:license                             Displays this program license
 check
  check:config                              Performs a check against the environment and configuration. Give some advices for production settings.
 collection
  collection:create                         Creates a collection in Phraseanet
 compile
  compile:configuration                     Compiles YAML configuration to plain PHP
 fields
  fields:delete                             Deletes a documentation field from a Databox
  fields:list                               Lists all databoxes documentation fields
  fields:merge                              Merges databox documentation fields
  fields:rename                             Renames a documentation field from a Databox
 h264-pseudo-streaming
  h264-pseudo-streaming:dump-configuration  Dump the virtual host configuration depending on Phraseanet configuration
  h264-pseudo-streaming:generate-mapping    Generates Phraseanet H264 pseudo streaming mapping configuration depending on databoxes configuration
 mail
  mail:test                                 Sends an email to a given address to test mail-server configuration
 plugins
  plugins:add                               Installs a plugin to Phraseanet
  plugins:list                              Lists installed plugins
  plugins:remove                            Removes a plugin given its name
 records
  records:add                               Adds a record to Phraseanet
  records:build-missing-subdefs             Builds subviews that previously failed to be generated / did not exist when records were added
  records:build-subdefs                     Build subviews for given subview names and record types
  records:rescan-technical-datas            Rescans records for technical datas
 searchengine
  searchengine:index:create                 Creates search index
  searchengine:index:drop                   Deletes the search index
  searchengine:index:populate               Populate search index
  searchengine:mapping:update               Update index mapping
  searchengine:query:parse                  Debug a search query
  searchengine:query:sample                 Generate sample queries from grammar
 system
  system:backup-db                          Backups Phraseanet Databases
  system:clear-cache                        Empties cache directories and cache-server data
  system:export                             Exports all phraseanet records to a given directory
  system:mail-check                         Checks if email addresses are uniques (mandatory since 3.5)
  system:upgrade-datas                      Upgrades Phraseanet datas, useful after migrations
 task-manager
  task-manager:scheduler:pause-tasks        Pause scheduler started tasks jobs
  task-manager:scheduler:resume-tasks       Resume scheduler started tasks jobs
  task-manager:scheduler:run                Run the scheduler
  task-manager:scheduler:state              Returns scheduler state
  task-manager:task:list                    Lists tasks
  task-manager:task:run                     Runs a task
  task-manager:task:start                   Starts a task
  task-manager:task:state                   Returns the state of a task
  task-manager:task:stop                    Stops a task
 thesaurus
  thesaurus:find:concepts                   Infer concepts using thesaurus
 xsendfile
  xsendfile:dump-configuration              Dump the virtual host configuration depending on Phraseanet configuration
  xsendfile:generate-mapping                Generates Phraseanet xsendfile mapping configuration depending on databoxes configuration

Every command provides its own help with the help argument:

php bin/console help CommandName

Please refer to these helps for the use of available commands.

Note

Every command returns an exit code that can be used for automated scripts.

task-manager:scheduler:state exit codes

This command returns an exit code given the state of the task scheduler.

State Exit code
setup error 1
bad_argument 2
fatal error 3
started 10
stopped 11
to stop 13
to start 14
to restart 15
to delete 16
task unknown 20
state unknown 21

Setup

Phraseanet provides a setup command line utility. From the Phraseanet install directory type:

php bin/setup

This command displays available commands in Setup:

Available commands:
  help                   Displays help for a command
  list                   Lists commands
about
  about:authors          Lists authors and contributors
  about:license          Displays this program license
check
  check:system           Performs a check against the environment
crossdomain
  crossdomain:generate   Generate crossdomain.xml file according to configuration
plugins
  plugins:add            Installs a plugin to Phraseanet
  plugins:list           Lists installed plugins
  plugins:remove         Removes a plugin given its name
  plugins:reset          Reset plugins in case a failure occured
system
  system:install         Installs Phraseanet
  system:upgrade         Upgrades Phraseanet to the latest version
  system:upgrade-datas   Upgrades Phraseanet datas, useful after migrations

Every command provides its own help with the help argument:

php bin/setup help CommandName

Please refer to these helps for the use of available commands.

Note

The whole commands available through the Setup utility are executable whenever Phraseanet is installed or not.

check:system exit codes

This command returns an exit code.

State Exit code
System is correctly configured 0
System is correctly configured, Adjustments can be done 1
System is not correctly configured. Errors must be fixed before continue. 2