.. _couchapp-usage: Command Line Usage =============================================================================== .. toctree:: .. highlight:: shell .. warning:: There are many undocumented commands. We need your help! Full command line usage ---------------------------------------------------------------------- .. literalinclude:: usage.txt Commands ---------------------------------------------------------------------- .. _cmd-generate: ``generate`` ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. versionchanged:: 1.1 Remove the ability to generate a whole app, use :ref:`cmd-init` instead. Allows you to generate one of CouchApp components from a :ref:`template `. There are two type of components: #. Functions #. Vendor If the template name do not be provide by user, we will use the ``default`` :ref:`template `. For example, we can generate a ``show`` function:: $ cd /path/to/app $ couchapp generate show hello 2016-06-18 17:36:21 [INFO] enjoy the show function, "hello"! $ tree shows shows └── hello.js 0 directories, 1 file .. _cmd-init: ``init`` ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. versionchanged:: 1.1 Introduce different level of init. Initialize a CouchApp. We provide three levels of initialization: #. `The minimal init`_, with the ``-e`` command line option. #. `The basic skeleton`_. This is the default level. #. `Init from template`_, with the ``-t TEMPLATE`` command line option. The Minimal Init ************************************************** We add an option ``-e`` for ``init``. The ``e`` stands for *empty*. If you just want to start from scratch, please choose this init level. :: $ couchapp init -e myapp $ cd myapp $ tree -a . ├── .couchappignore └── .couchapprc 0 directories, 2 files .. note:: The file ``.couchapprc`` is required for ``couchapp``. The Basic Skeleton ************************************************** This is the default level of ``init`` command. We will prepare some dir skeleton for you. :: $ couchapp init myapp $ cd myapp $ tree -a . ├── .couchappignore ├── .couchapprc ├── _attachments ├── _id ├── filters ├── lists ├── shows ├── updates └── views 6 directories, 3 files Init from Template ************************************************** We can create our CouchApp from a :ref:`template `. The :ref:`template