[[install-tools]]

=== Concept: Additional Tools

[role="summary"]
Overview of additional tools that help site builders conveniently create sites.

(((Tool,Coder)))
(((Tool,Devel)))
(((Tool,Drush)))
(((Tool,Composer)))
(((Tool,Git)))
(((Tool,Drupal Console)))
(((Coder tool,overview)))
(((Devel tool,overview)))
(((Drush tool,overview)))
(((Composer tool,overview)))
(((Git tool,overview)))
(((Drupal Console tool,overview)))

// ==== Prerequisite knowledge

==== What tools are available for site builders?

There are several additional tools available that help you create sites faster,
more accurately and with less effort.

Drush and Drupal Console::
  See below for more about command-line tools.
Git::
  See below for more about version control tools.
Composer::
  See below for more about Composer.
Devel::
  The https://www.drupal.org/project/devel[contributed Devel module] helps with
  development tasks such as debugging and inspecting code, analyzing database
  queries, and generating dummy content.

==== What are command-line tools?

Command-line tools provide an alternative to using the administrative interface
for various operations on your site. Many site builders and maintainers have
invested the time to install and learn a command-line tool, because:

* Administrative tasks are typically faster and less tedious when performed at
the command line than in the user interface.

* You can write scripts that combine site-related commands with other commands
on the server, to automate more complicated tasks.

* Command-line tools provide additional functionality not available via the
administrative interface; for example, running database queries.

The most popular tools are http://www.drush.org[Drush] and
https://drupalconsole.com[Drupal Console]. Drush has been available longer, and
has commands for both the core software and contributed modules; Drupal Console
started as a tool for module programmers, but has a growing list of commands for
site builders. This guide documents commands from the latest stable version of
Drush for many tasks; it does not document Drupal Console commands or commands
for older versions of Drush, but you can look them up in the Drupal Console and
Drush documentation.

To use these tools, you will need to have command-line terminal access to the
server where your website will be hosted, and you will need to install Composer
first in order to install either the Drush or Drupal Console tool.

==== What is a version control system?

A version control system is software that keeps copies of files and revision
history in a _repository_, and allows you to add, delete, and update files. For
a web site project, revision control software can help you:

* Test locally before deploying files on the live site

* Look at, compare with, and revert to previous versions of files

* Look at the added, changed, or deleted files before you _commit_ the changes
(update the repository)

* Merge changes from different team members together

* Keep files and configuration synchronized between local and live sites

There are many proprietary and open-source version control systems to choose
from; a popular choice is https://git-scm.com/[Git], which is open-source
software that runs on most computer platforms. Git is a _distributed_ version
control system that allows you to have one or more copies of your repository,
which allows you to commit changes to a copy and then only _push_ them to the
repository you've designated as _canonical_ when you're ready to share them with
others. The canonical git repository can be hosted on your local computer or a
server at your company, but many software projects and individuals host their
Git repositories using third-party services provided by
https://about.gitlab.com/[GitLab] or https://github.com/[GitHub].


==== What is Composer used for?

https://getcomposer.org/[Composer] is a tool for managing PHP dependencies,
where the developer specifies what version of each external library is needed,
and Composer manages the process of downloading and installing the libraries.

The core software is a primary user of Composer, because it makes use of several
externally-developed software libraries, which must be downloaded and installed
in order for the core software to work. When you install the core software, you
either need to download an archive that contains compatible versions of the
external libraries, or you need to run Composer to download the external
libraries after the initial download. The Drush and Drupal Console command-line
tools are also downloaded using Composer.

Some contributed modules also make use of externally-developed software
libraries; for example, a Facebook integration module might require Facebook's
integration library to be installed for the module to work, and a geographical
module might make use of a standard library of geographical functions. To
install a module with external dependencies, you will need to run Composer.

==== What tools are available for module and theme developers?

In addition to the site builder tools mentioned above, the following tools are
useful for module and theme developers.

Drupal Console::
  https://drupalconsole.com[Drupal Console] is a command-line tool that
  generates boilerplate code and interacts with a Drupal site. It can generate,
  for example, block or form code, install modules and themes, and create dummy
  content. Drupal Console makes use of the Symfony Console.
Coder::
  https://www.drupal.org/project/coder[Coder] is a command-line tool that checks
  if your modules and themes comply with coding standards and other best
  practices. It can also fix coding standard violations.
Browser debugging tools::
  Web browsers such as Firefox and Chrome include tools that allow viewing,
  editing, debugging, and monitoring CSS, HTML, and JavaScript. You can open the
  debugging pane or window by right-clicking the mouse in an area of your
  window, and choosing "Inspect" or "Inspect element".

==== Related topics

<<install-composer>>

==== Additional resources

* https://www.drupal.org/node/147789[_Drupal.org_ community documentation page "Development tools"]

* https://www.drupal.org/docs/develop/using-composer/using-composer-with-drupal[_Drupal.org_ community documentation page "Using Composer with Drupal"]

* https://en.wikipedia.org/wiki/Distributed_version_control[Wikipedia article "Distributed version control"]


*Attributions*

Written and edited by https://www.drupal.org/u/batigolix[Boris Doesborg]
and https://www.drupal.org/u/jhodgdon[Jennifer Hodgdon]. Some text adapted from
https://www.drupal.org/node/991716["Introduction to Git"],
copyright 2000-2019 by the individual contributors to the
https://www.drupal.org/documentation[Drupal Community Documentation].
