.. include:: ./refs.rst

===================
sphinxcontrib-typer
===================

A Sphinx directive for auto generating docs for Typer_ (and :doc:`Click <click:index>` commands!)
using the rich console formatting available in Typer_. This package generates concise command
documentation in text, html or svg formats out of the box, but if your goal is to greatly customize
the generated documentation :doc:`sphinx-click:index` may be more appropriate and will also work for
Typer_ commands.

See the `github <https://github.com/sphinx-contrib/typer>`_ repository for issue tracking and source
code and install from :pypi:`sphinxcontrib-typer` with ``pip install sphinxcontrib-typer``.

For example, commands and subcommands are renderable separately in four different formats:

* svg
* html
* text
* png

.. typer:: examples.example.app
   :convert-png: latex
   :preferred: html

|

.. typer:: examples.example.app:foo
   :width: 70
   :preferred: html
   :convert-png: latex

|

.. typer:: examples.example.app:bar
   :width: 92
   :preferred: text
   :convert-png: latex


The ``typer`` directive has options for generating docs for all subcommands as well and optionally
generating independent sections for each. There are also mechanisms for passing options to the
underlying console and svg generation functions. See table of contents for more information.


.. toctree::
   :maxdepth: 3
   :caption: Contents:

   installation
   howto
   themes
   reference/index
   changelog
