Configuration & Command Line ============================ Facio can be configured using a file called ``~/.facio.cfg`` and how Facio runs can also be defined by the command line interface, we will take a look at the command line first. Command Line Options -------------------- Facio is a command line application. Here is how you use it: .. note:: Throughout this document ``$`` represents a terminal prompt. Required Arguments ~~~~~~~~~~~~~~~~~~ The first argument you pass to the ``facio`` command must always be a project name. For example: .. code-block:: none $ facio hello_world If no additional optional arguments are supplied then Facio will use its default template to create the project. Optional Arguments ~~~~~~~~~~~~~~~~~~ Template ******** For Facio to use a different template than its default you must pass either of the following arguments: * ``--template | -t`` or ``--select | -s`` ``--template`` ^^^^^^^^^^^^^^ The ``--template`` or its short hand equivalent ``-t`` takes a string which can be either of the following: * A file system path the template, for example ``/home/me/template/template1`` * A ``git`` or ``mercurial`` repository, for examople: * ``git+git@github.com:me/template.git`` * ``git+/path/to/local/template`` * ``hg+user@someremote.com:me/template`` * ``hg+/path/to/local/template`` * A template name defined in ``~/.facio.cfg``, see :ref:`configuration-file-label`. For example: .. code-block:: none $ facio foo -t /my/local/template $ facio bar -t git+git@github.com:krak3n/Facio-Django-Template.git $ facio baz -t django ``--select`` ^^^^^^^^^^^^ The ``--select`` or it's ``-s`` short hand is used for selecting a template which is defined in the ``'.facio.cfg`` configuration file, see the :ref:`configuration-file-label` section for more information on how to define multiple templates. For example: .. code-block:: none $ facio foo --select You will be given a prompt asking you to choose a template, once chosen ``facio`` will process the selected template. Variables ********* You may also need to define more variables to be used when rendering your template. You can do this using the :ref:`vars-label` argument. .. _vars-label: ``--vars`` ^^^^^^^^^^ You can add extra variables to the context using ``--vars`` optional argument. This argument takes a string which should contain a comma delimited list of key value pairs separated by an ``=`` operator. For example: .. code-block:: none $ facio foo -t bar --vars x=1,y=2,z=3 This above example would define 3 new context variables when rendering the template with the fllowing values: * x = 1 * y = 2 * z = 3 And could be used in templates as follows: .. code-block:: html