Command Line Interface

WuttaFarm ships with the following commands.

For more general info about CLI see Command Line.

wuttafarm install

Run the WuttaFarm app installer.

This will create the app dir and initial config files, and create the schema within the app database.

Defined in: wuttafarm.cli.install

                                                                                
 Usage: wuttafarm install [OPTIONS]                                             
                                                                                
 Install the WuttaFarm app                                                      
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                  │
╰──────────────────────────────────────────────────────────────────────────────╯

wuttafarm import-farmos

Import data from the farmOS API into the WuttaFarm app database.

Defined in: wuttafarm.cli.import_farmos

                                                                                
 Usage: wuttafarm import-farmos [OPTIONS] [MODELS]...                           
                                                                                
 Import data from farmOS API to WuttaFarm                                       
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   models      [MODELS]...  Target model(s) to process.  Specify one or more, │
│                            or omit to process default models.                │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --list-models     -l                          List available target models   │
│                                               and exit.                      │
│ --create              --no-create             Allow new target records to be │
│                                               created.  See aso              │
│                                               --max-create.                  │
│                                               [default: create]              │
│ --update              --no-update             Allow existing target records  │
│                                               to be updated.  See also       │
│                                               --max-update.                  │
│                                               [default: update]              │
│ --delete              --no-delete             Allow existing target records  │
│                                               to be deleted.  See also       │
│                                               --max-delete.                  │
│                                               [default: no-delete]           │
│ --fields                             TEXT     List of fields to process.     │
│                                               See also --exclude and --key.  │
│ --exclude                            TEXT     List of fields *not* to        │
│                                               process.  See also --fields.   │
│ --key,--keys                         TEXT     List of fields to use as       │
│                                               record key/identifier.  See    │
│                                               also --fields.                 │
│ --max-create                         INTEGER  Max number of target records   │
│                                               to create (per model).  See    │
│                                               also --create.                 │
│ --max-update                         INTEGER  Max number of target records   │
│                                               to update (per model).  See    │
│                                               also --update.                 │
│ --max-delete                         INTEGER  Max number of target records   │
│                                               to delete (per model).  See    │
│                                               also --delete.                 │
│ --max-total                          INTEGER  Max number of *any* target     │
│                                               record changes which may occur │
│                                               (per model).                   │
│ --warn            -W                          Expect no changes; warn (email │
│                                               the diff) if any occur.        │
│ --recip,--recips                     TEXT     Override the recipient(s) for  │
│                                               diff warning email.            │
│ --max-diffs                          INTEGER  Max number of record diffs to  │
│                                               show (per model) in warning    │
│                                               email.                         │
│                                               [default: 15]                  │
│ --dry-run                                     Go through the motions, but    │
│                                               rollback the transaction.      │
│ --help                                        Show this message and exit.    │
╰──────────────────────────────────────────────────────────────────────────────╯