Built-in Commands

WuttJamaican comes with one top-level command, and some subcommands.

It uses Typer for the underlying CLI framework.

wutta

This is the top-level command. Its purpose is to expose subcommands pertaining to WuttJamaican.

It is installed to the virtual environment in the bin folder (or Scripts on Windows):

cd /path/to/venv
bin/wutta --help

Defined in: wuttjamaican.cli

                                                                                
 Usage: wutta [OPTIONS] COMMAND [ARGS]...                                       
                                                                                
 Wutta Software Framework                                                       
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --config              -c      <path>  Config path (may be specified more     │
│                                       than once)                             │
│ --runas                       <str>   Username responsible for running the   │
│                                       command (where applicable).            │
│ --comment             -m      <str>   Comment to apply to the transaction    │
│                                       (where applicable).                    │
│ --install-completion                  Install completion for the current     │
│                                       shell.                                 │
│ --show-completion                     Show completion for the current shell, │
│                                       to copy it or customize the            │
│                                       installation.                          │
│ --help                                Show this message and exit.            │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ cleanup      Run cleanup tasks to remove stale data/files                    │
│ make-appdir  Make the app dir for virtual environment                        │
│ make-uuid    Generate a new UUID                                             │
│ problems     Find and report on problems with the data or system             │
│ runner       Run a command as subprocess, and email the result/output        │
╰──────────────────────────────────────────────────────────────────────────────╯

wutta cleanup

Run cleanup tasks to remove stale data/files.

This instantiates the cleanup handler and calls cleanup_everything().

Defined in: wuttjamaican.cli.cleanup

                                                                                
 Usage: wutta cleanup [OPTIONS]                                                 
                                                                                
 Run cleanup tasks to remove stale data/files                                   
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --dry-run          Go through motions and log actions, but do not commit the │
│                    result.                                                   │
│ --help             Show this message and exit.                               │
╰──────────────────────────────────────────────────────────────────────────────╯

wutta make-appdir

Make the app dir for the current virtual environment.

Defined in: wuttjamaican.cli.make_appdir

                                                                                
 Usage: wutta make-appdir [OPTIONS]                                             
                                                                                
 Make the app dir for virtual environment                                       
                                                                                
 See also https://docs.wuttaproject.org/wuttjamaican/glossary.html#term-app-dir 
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --path        <path>  Path to desired app dir; default is (usually) `app` in │
│                       the root of virtual environment.                       │
│ --help                Show this message and exit.                            │
╰──────────────────────────────────────────────────────────────────────────────╯

wutta make-uuid

Print a new universally-unique identifier to standard output.

Defined in: wuttjamaican.cli.make_uuid

                                                                                
 Usage: wutta make-uuid [OPTIONS]                                               
                                                                                
 Generate a new UUID                                                            
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                  │
╰──────────────────────────────────────────────────────────────────────────────╯

wutta problems

Find and report on problems with the data or system.

Defined in: wuttjamaican.cli.problems

                                                                                
 Usage: wutta problems [OPTIONS]                                                
                                                                                
 Find and report on problems with the data or system                            
                                                                                
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --system   -s      <str>  System for which to perform checks; can be         │
│                           specified more than once. If not specified, all    │
│                           systems are assumed.                               │
│ --problem  -p      <str>  Identify a particular problem check; can be        │
│                           specified more than once. If not specified, all    │
│                           checks are assumed.                                │
│ --list     -l             List available problem checks; optionally filtered │
│                           per --system and --problem                         │
│ --help                    Show this message and exit.                        │
╰──────────────────────────────────────────────────────────────────────────────╯

wutta runner

Run a command as subprocess, and email the result/output.

Defined in: wuttjamaican.cli.runner

                                                                                
 Usage: wutta runner [OPTIONS] {command}                                        
                                                                                
 Run a command as subprocess, and email the result/output                       
                                                                                
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    command      <str>  Command to run, the result of which will be         │
│                          emailed.                                            │
│                          [required]                                          │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --subject         -S      <str>  Override value for email subject.           │
│ --skip-if-empty                  Skip sending email if the command generates │
│                                  no output.                                  │
│ --keep-exit-code                 Exit with same return code as subprocess.   │
│                                  If not specified, exits with code 0 despite │
│                                  command failure.                            │
│ --help                           Show this message and exit.                 │
╰──────────────────────────────────────────────────────────────────────────────╯