.. _cli_usage: Scrape and upload documents or a website ######################################## You use PyMeilisearch to scrape and upload documents or a website to Meilisearch. When starting this command-line interface (CLI) tool, you supply the template to use for content scraping, the Meilisearch index to use for identifying content, and the format type and location of the source documents. .. note:: You must declare two environment variables before using PyMeilisearch: - ``MEILISEARCH_HOST_URL``: Registry endpoint for Meilisearch - ``MEILISEARCH_API_KEY``: API key (admin) for creating indexes in the search registry Start PyMeilisearch =================== To start PyMeilisearch, open a command prompt or your terminal and run the ``pymeilisearch`` command followed by the desired subcommand and options. Here is the general syntax for the ``pymeilisearch`` command: .. code-block:: console $ pymeilisearch [options] [arguments] **Subcommands** The ``pymeilisearch`` command supports these subcommands: - ``upload``: Upload documents or a website to Meilisearch. - ``version``: Get the current version of PyMeilisearch. Upload documents or a website ============================= The ``upload`` subcommand uploads documents or a website to Meilisearch, creating indexes on the Meilisearch instance. Here is the general syntax for the ``upload`` subcommand: .. code-block:: console $ pymeilisearch upload --template