CLI Reference#

This page is auto-generated from the Typer application. Every command, option, and argument is rendered directly from the source code.

gyoza#

                                                                           
 Usage: gyoza [OPTIONS] COMMAND [ARGS]...                                  
                                                                           
 CLI for interacting with the Gyoza ecosystem.                             
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --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 ──────────────────────────────────────────────────────────────╮
│ version        Print the installed gyoza version.                       │
│ run            Execute a @gyoza_op function from a Python file.         │
│ build          Build the Docker image defined in gyoza.yml.             │
│ deploy         Build, push, and register a gyoza operation on the gyoza │
│                server.                                                  │
│ run-container  Run a gyoza operation inside its Docker container.       │
│ worker         Manage gyoza workers.                                    │
│ server         Manage the gyoza server.                                 │
╰─────────────────────────────────────────────────────────────────────────╯

version#

                                                                           
 Usage: gyoza version [OPTIONS]                                            
                                                                           
 Print the installed gyoza version.                                        
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                             │
╰─────────────────────────────────────────────────────────────────────────╯

run#

                                                                           
 Usage: gyoza run [OPTIONS]                                                
                                                                           
 Execute a @gyoza_op function from a Python file.                          
                                                                           
 Three input modes are supported:                                          
                                                                           
 1. ``--inline-input``  — parse input directly from the CLI string.        
 2. ``--input``         — read input from a JSON file at the given path.   
 3. default             — read input from the path in $GYOZA_INPUT_PATH.   
                                                                           
 In all modes the output dict is written as JSON to ``--output`` or        
 $GYOZA_OUTPUT_PATH.                                                       
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --file          -f      TEXT  Python file that defines one @gyoza_op    │
│                               function.                                 │
│ --function      -F      TEXT  Name of the @gyoza_op function to         │
│                               execute. Defaults to the first one found  │
│                               in the file.                              │
│ --input         -i      TEXT  JSON input file path. Falls back to       │
│                               $GYOZA_INPUT_PATH. Ignored when           │
│                               --inline-input is provided.               │
│ --output        -o      TEXT  JSON output file path. Falls back to      │
│                               $GYOZA_OUTPUT_PATH.                       │
│ --inline-input          TEXT  Inline JSON dict string for inputs, e.g.  │
│                               '{"a": 1, "b": 2}'. Mutually exclusive    │
│                               with --input.                             │
│ --help                        Show this message and exit.               │
╰─────────────────────────────────────────────────────────────────────────╯

build#

                                                                           
 Usage: gyoza build [OPTIONS] PATH                                         
                                                                           
 Build the Docker image defined in gyoza.yml.                              
                                                                           
╭─ Arguments ─────────────────────────────────────────────────────────────╮
│ *    path      TEXT  Path to the project directory containing           │
│                      gyoza.yml.                                         │
│                      [required]                                         │
╰─────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                             │
╰─────────────────────────────────────────────────────────────────────────╯

deploy#

                                                                           
 Usage: gyoza deploy [OPTIONS] PATH                                        
                                                                           
 Build, push, and register a gyoza operation on the gyoza server.          
                                                                           
╭─ Arguments ─────────────────────────────────────────────────────────────╮
│ *    path      TEXT  Path to the project directory containing           │
│                      gyoza.yml.                                         │
│                      [required]                                         │
╰─────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                             │
╰─────────────────────────────────────────────────────────────────────────╯

run-container#

                                                                           
 Usage: gyoza run-container [OPTIONS] IMAGE [DOCKER_ARGS]...               
                                                                           
 Run a gyoza operation inside its Docker container.                        
                                                                           
 Wraps ``docker run`` with automatic volume mounts for input/output        
 files. Any arguments after ``--`` are forwarded directly to               
 ``docker run``.                                                           
                                                                           
 Execution modes:                                                          
                                                                           
 1. ``--inline-input``  — parse input from the CLI string.                 
 2. ``--input``         — read input from a JSON file on the host.         
 3. default             — let the container use its built-in env defaults. 
                                                                           
 By default, string values in the input that point to existing local       
 files or directories are bind-mounted and rewritten transparently.        
 Use ``--no-map-paths`` to disable this.                                   
                                                                           
╭─ Arguments ─────────────────────────────────────────────────────────────╮
│ *    image            TEXT              Docker image to run (e.g.       │
│                                         'myregistry/my-op:latest').     │
│                                         [required]                      │
│      docker_args      [DOCKER_ARGS]...  Extra arguments forwarded       │
│                                         verbatim to 'docker run'. Place │
│                                         them after '--', e.g.: gyoza    │
│                                         run-container myimage -- --gpus │
│                                         all --network host              │
╰─────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --input         -i      TEXT  Host path to the input JSON file. Mounted │
│                               read-only into the container. Ignored     │
│                               when --inline-input is provided.          │
│ --output        -o      TEXT  Host path where the container writes its  │
│                               output JSON file.                         │
│ --inline-input          TEXT  Inline JSON dict string for inputs, e.g.  │
│                               '{"a": 1, "b": 2}'. Serialised to a temp  │
│                               file and mounted as input. Mutually       │
│                               exclusive with --input.                   │
│ --no-map-paths                Disable automatic path mapping. By        │
│                               default, string values in the input JSON  │
│                               that point to local files/directories are │
│                               automatically mounted into the container. │
│ --help                        Show this message and exit.               │
╰─────────────────────────────────────────────────────────────────────────╯

worker#

                                                                           
 Usage: gyoza worker [OPTIONS] COMMAND [ARGS]...                           
                                                                           
 Manage gyoza workers.                                                     
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                             │
╰─────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────╮
│ start  Start the worker heartbeat and execution loop.                   │
╰─────────────────────────────────────────────────────────────────────────╯

start#

                                                                           
 Usage: gyoza worker start [OPTIONS]                                       
                                                                           
 Start the worker heartbeat and execution loop.                            
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --worker-id                 TEXT     Unique identifier for this worker. │
│                                      Defaults to worker-<uuid>.         │
│                                      [env var: GYOZA_WORKER_ID]         │
│ --working-directory         TEXT     Directory used to stage op run     │
│                                      data.                              │
│                                      [env var: GYOZA_WORKING_DIRECTORY] │
│                                      [default: /tmp/gyoza/]             │
│ --heartbeat-interval        INTEGER  Seconds between heartbeat ticks.   │
│                                      [env var:                          │
│                                      GYOZA_HEARTBEAT_INTERVAL]          │
│                                      [default: 10]                      │
│ --help                               Show this message and exit.        │
╰─────────────────────────────────────────────────────────────────────────╯

server#

                                                                           
 Usage: gyoza server [OPTIONS] COMMAND [ARGS]...                           
                                                                           
 Manage the gyoza server.                                                  
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                             │
╰─────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────╮
│ start  Start the gyoza server.                                          │
│ list   List resources on the gyoza server.                              │
╰─────────────────────────────────────────────────────────────────────────╯

start#

                                                                           
 Usage: gyoza server start [OPTIONS]                                       
                                                                           
 Start the gyoza server.                                                   
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --port                       INTEGER  Port the server listens on.       │
│                                       [env var: GYOZA_PORT]             │
│                                       [default: 5555]                   │
│ --worker-timeout             INTEGER  Seconds before a worker is        │
│                                       considered inactive.              │
│                                       [env var: GYOZA_WORKER_TIMEOUT]   │
│                                       [default: 60]                     │
│ --scheduling-strategy        TEXT     Scheduling strategy for           │
│                                       allocating runs to workers.       │
│                                       [env var: SCHEDULING_STRATEGY]    │
│                                       [default: direct]                 │
│ --help                                Show this message and exit.       │
╰─────────────────────────────────────────────────────────────────────────╯

list#

                                                                           
 Usage: gyoza server list [OPTIONS] COMMAND [ARGS]...                      
                                                                           
 List resources on the gyoza server.                                       
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                             │
╰─────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────╮
│ definitions  List all OpDefinitions registered on the server.           │
╰─────────────────────────────────────────────────────────────────────────╯
definitions#
                                                                           
 Usage: gyoza server list definitions [OPTIONS]                            
                                                                           
 List all OpDefinitions registered on the server.                          
                                                                           
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --json          Output full JSON instead of a table.                    │
│ --help          Show this message and exit.                             │
╰─────────────────────────────────────────────────────────────────────────╯