From be64b4959a39b492ba669eeb2e4c2b24ba9e7330 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 13 Feb 2026 15:18:53 -0600 Subject: [PATCH] docs: add basic docs for CLI commands --- docs/conf.py | 1 + docs/index.rst | 1 + docs/narr/cli.rst | 39 +++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 docs/narr/cli.rst diff --git a/docs/conf.py b/docs/conf.py index 3caa6e3..f3fd9e2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,6 +21,7 @@ extensions = [ "sphinx.ext.intersphinx", "sphinx.ext.viewcode", "sphinx.ext.todo", + "sphinxcontrib.programoutput", ] templates_path = ["_templates"] diff --git a/docs/index.rst b/docs/index.rst index a68b748..be04bee 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -27,6 +27,7 @@ include: narr/install narr/auth narr/features + narr/cli .. toctree:: diff --git a/docs/narr/cli.rst b/docs/narr/cli.rst new file mode 100644 index 0000000..70b7c1e --- /dev/null +++ b/docs/narr/cli.rst @@ -0,0 +1,39 @@ + +======================== + Command Line Interface +======================== + +WuttaFarm ships with the following commands. + +For more general info about CLI see +:doc:`wuttjamaican:narr/cli/index`. + + +.. _wuttafarm-install: + +``wuttafarm install`` +--------------------- + +Run the WuttaFarm app installer. + +This will create the :term:`app dir` and initial config files, and +create the schema within the :term:`app database`. + +Defined in: :mod:`wuttafarm.cli.install` + +.. program-output:: wuttafarm install --help + + +.. _wuttafarm-import-farmos: + +``wuttafarm import-farmos`` +--------------------------- + +Import data from the farmOS API into the WuttaFarm :term:`app +database`. + +Defined in: :mod:`wuttafarm.cli.import_farmos` + +.. program-output:: wuttafarm import-farmos --help + + diff --git a/pyproject.toml b/pyproject.toml index 4c3d4d2..04b1d05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ [project.optional-dependencies] -docs = ["Sphinx", "furo"] +docs = ["Sphinx", "furo", "sphinxcontrib-programoutput"] [project.scripts]