Fiatlight command line utility#

The fiatlight command line utility is a powerful tool that allows you to explore the available widgets and types in Fiatlight. It can be used to list the available types, to print the GUI info for a given type, and to run a GUI demo for a given type.

Here is the help message for the fiatlight command line utility (ignore the %%bash magic command, it is used to run bash commands in Jupyter notebooks):

%%bash
fiatlight --help
INFO: Showing help with the command 'fiatlight -- --help'.

NAME
    fiatlight

SYNOPSIS
    fiatlight COMMAND

COMMANDS
    COMMAND is one of the following:

     types
       List registered types, with a possible query to filter them. Add an optional query to filter the types.

     gui
       Print the GUI info for a given type. Add the GUI type name as an argument (if not provided, all Gui widgets names are printed)

List registered types#

The types command lists the registered types in Fiatlight. You can filter the types by adding an optional query.

In the example below, we will run the fiatlight types str command to list all the types that contain the string “str”.

%%bash
fiatlight types str
+----------------------------------------------------+-----------------------------------------------------------------------+
| Data Type                                          | Gui Type                                                              |
+====================================================+=======================================================================+
| str                                                | fiatlight.fiat_togui.str_with_gui.StrWithGui                          |
|                                                    |   A Gui for a string with resizable input text, with a popup for      |
|                                                    | multiline editing.                                                    |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.fiat_number_types.PositiveFlo | fiatlight.fiat_togui.primitives_gui.FloatWithGui                      |
| at                                                 |   A highly customizable float widget.                                 |
|   synonym for float > 0 (strictly greater than 0)  |                                                                       |
| (NewType)                                          |                                                                       |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.FilePath           | fiatlight.fiat_togui.file_types_gui.FilePathWithGui                   |
|   synonym for str, describing a file path          |   A Gui that enable to select a filename via a file dialog.           |
| (NewType)                                          |                                                                       |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.TextPath           | fiatlight.fiat_togui.file_types_gui.TextPathWithGui                   |
|   synonym for str, describing a text file path     |   A Gui that enable to select a text filename via a file dialog.      |
| (NewType)                                          |                                                                       |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.ImagePath          | fiatlight.fiat_togui.file_types_gui.ImagePathWithGui                  |
|   synonym for str, describing an image file path   |   A Gui that enable to select an image filename via a file dialog.    |
| (NewType)                                          |                                                                       |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.AudioPath          | fiatlight.fiat_togui.file_types_gui.AudioPathWithGui                  |
|   synonym for str, describing an audio file path   |   A Gui that enable to select an audio filename via a file dialog.    |
| (NewType)                                          |                                                                       |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.VideoPath          | fiatlight.fiat_togui.file_types_gui.VideoPathWithGui                  |
|   synonym for str, describing a video file path    |   A Gui that enable to select a video filename via a file dialog.     |
| (NewType)                                          |                                                                       |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.FilePath_Save      | fiatlight.fiat_togui.file_types_gui.FilePathSaveWithGui               |
|   synonym for str, describing a file path for      |   A Gui that enable to select a destination/save filename via a file  |
| saving (NewType)                                   | dialog.                                                               |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.TextPath_Save      | fiatlight.fiat_togui.file_types_gui.TextPathSaveWithGui               |
|   synonym for str, describing a text file path for |   A Gui that enable to select a destination/save text filename via a  |
| saving (NewType)                                   | file dialog.                                                          |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.ImagePath_Save     | fiatlight.fiat_togui.file_types_gui.ImagePathSaveWithGui              |
|   synonym for str, describing an image file path   |   A Gui that enable to select a destination/save image filename via a |
| for saving (NewType)                               | file dialog.                                                          |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.AudioPath_Save     | fiatlight.fiat_togui.file_types_gui.AudioPathSaveWithGui              |
|   synonym for str, describing an audio file path   |   A Gui that enable to select a destination/save audio filename via a |
| for saving (NewType)                               | file dialog.                                                          |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.VideoPath_Save     | fiatlight.fiat_togui.file_types_gui.VideoPathSaveWithGui              |
|   synonym for str, describing a video file path    |   A Gui that enable to select a destination/save video filename via a |
| for saving (NewType)                               | file dialog.                                                          |
+----------------------------------------------------+-----------------------------------------------------------------------+
| fiatlight.fiat_kits.fiat_ai.prompt.Prompt          | fiatlight.fiat_kits.fiat_ai.prompt_with_gui.PromptWithGui             |
|   synonym for a string used as a prompt, used for  |   A Gui to edit a prompt, with a Submit button, and a multiline edit  |
| AI text and image generation models (NewType)      | in a popup.                                                           |
+----------------------------------------------------+-----------------------------------------------------------------------+

Notes:

  • If you do not include the str argument, all the types will be printed.

Annex: list of registered types#

By running the fiatlight types command, you can list all the registered types in Fiatlight. Here is a list of the available types:

%%bash
fiatlight types
+----------------------------------------------------+------------------------------------------------------------------------+
| Data Type                                          | Gui Type                                                               |
+====================================================+========================================================================+
| fiatlight.fiat_types.fiat_number_types.Float_0_1   | fiatlight.fiat_togui.primitives_gui.FloatWithGui                       |
|   synonym for float in [0, 1] (NewType)            |   A highly customizable float widget.                                  |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.fiat_number_types.Float__1_1  | fiatlight.fiat_togui.primitives_gui.FloatWithGui                       |
|   synonym for float in [-1, 1] (NewType)           |   A highly customizable float widget.                                  |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.fiat_number_types.Int_0_255   | fiatlight.fiat_togui.primitives_gui.IntWithGui                         |
|   synonym for int in [0, 255] (NewType)            |   A highly customizable int widget.                                    |
+----------------------------------------------------+------------------------------------------------------------------------+
| int                                                | fiatlight.fiat_togui.primitives_gui.IntWithGui                         |
|                                                    |   A highly customizable int widget.                                    |
+----------------------------------------------------+------------------------------------------------------------------------+
| float                                              | fiatlight.fiat_togui.primitives_gui.FloatWithGui                       |
|                                                    |   A highly customizable float widget.                                  |
+----------------------------------------------------+------------------------------------------------------------------------+
| str                                                | fiatlight.fiat_togui.str_with_gui.StrWithGui                           |
|                                                    |   A Gui for a string with resizable input text, with a popup for       |
|                                                    | multiline editing.                                                     |
+----------------------------------------------------+------------------------------------------------------------------------+
| bool                                               | fiatlight.fiat_togui.primitives_gui.BoolWithGui                        |
|                                                    |   A bool widget. Can use a checkbox or a toggle.                       |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.color_types.ColorRgb          | fiatlight.fiat_togui.primitives_gui.ColorRgbWithGui                    |
|   synonym for tuple[int, int, int] describing an   |   A nice color picker for RGB colors (int)                             |
| RGB color, with values in [0, 255] (NewType)       |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.color_types.ColorRgba         | fiatlight.fiat_togui.primitives_gui.ColorRgbaWithGui                   |
|   synonym for tuple[int, int, int, int] describing |   A nice color picker for RGBA colors (int)                            |
| an RGBA color, with values in [0, 255] (NewType)   |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.color_types.ColorRgbFloat     | fiatlight.fiat_togui.primitives_gui.ColorRgbFloatWithGui               |
|   synonym for tuple[float, float, float]           |   A nice color picker for RGB colors (float)                           |
| describing an RGB color, with values in [0, 1]     |                                                                        |
| (NewType)                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.color_types.ColorRgbaFloat    | fiatlight.fiat_togui.primitives_gui.ColorRgbaFloatWithGui              |
|   synonym for tuple[float, float, float, float]    |   A nice color picker for RGBA colors (float)                          |
| describing an RGBA color, with values in [0, 1]    |                                                                        |
| (NewType)                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.fiat_number_types.PositiveFlo | fiatlight.fiat_togui.primitives_gui.FloatWithGui                       |
| at                                                 |   A highly customizable float widget.                                  |
|   synonym for float > 0 (strictly greater than 0)  |                                                                        |
| (NewType)                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| (dataclass) fiatlight.fiat_togui.dataclass_example | fiatlight.fiat_togui.dataclass_gui.DataclassGui                        |
| s.ExampleDataclass                                 |   A sophisticated GUI for a dataclass type.                            |
|   ExampleDataclass(x: int = 0, y: str = 'Hello')   |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| (BaseModel) fiatlight.fiat_togui.dataclass_example | fiatlight.fiat_togui.basemodel_gui.BaseModelGui                        |
| s.ExampleBaseModel                                 |   A sophisticated GUI for a pydantic model.                            |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.FilePath           | fiatlight.fiat_togui.file_types_gui.FilePathWithGui                    |
|   synonym for str, describing a file path          |   A Gui that enable to select a filename via a file dialog.            |
| (NewType)                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.TextPath           | fiatlight.fiat_togui.file_types_gui.TextPathWithGui                    |
|   synonym for str, describing a text file path     |   A Gui that enable to select a text filename via a file dialog.       |
| (NewType)                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.ImagePath          | fiatlight.fiat_togui.file_types_gui.ImagePathWithGui                   |
|   synonym for str, describing an image file path   |   A Gui that enable to select an image filename via a file dialog.     |
| (NewType)                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.AudioPath          | fiatlight.fiat_togui.file_types_gui.AudioPathWithGui                   |
|   synonym for str, describing an audio file path   |   A Gui that enable to select an audio filename via a file dialog.     |
| (NewType)                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.VideoPath          | fiatlight.fiat_togui.file_types_gui.VideoPathWithGui                   |
|   synonym for str, describing a video file path    |   A Gui that enable to select a video filename via a file dialog.      |
| (NewType)                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.FilePath_Save      | fiatlight.fiat_togui.file_types_gui.FilePathSaveWithGui                |
|   synonym for str, describing a file path for      |   A Gui that enable to select a destination/save filename via a file   |
| saving (NewType)                                   | dialog.                                                                |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.TextPath_Save      | fiatlight.fiat_togui.file_types_gui.TextPathSaveWithGui                |
|   synonym for str, describing a text file path for |   A Gui that enable to select a destination/save text filename via a   |
| saving (NewType)                                   | file dialog.                                                           |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.ImagePath_Save     | fiatlight.fiat_togui.file_types_gui.ImagePathSaveWithGui               |
|   synonym for str, describing an image file path   |   A Gui that enable to select a destination/save image filename via a  |
| for saving (NewType)                               | file dialog.                                                           |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.AudioPath_Save     | fiatlight.fiat_togui.file_types_gui.AudioPathSaveWithGui               |
|   synonym for str, describing an audio file path   |   A Gui that enable to select a destination/save audio filename via a  |
| for saving (NewType)                               | file dialog.                                                           |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_types.file_types.VideoPath_Save     | fiatlight.fiat_togui.file_types_gui.VideoPathSaveWithGui               |
|   synonym for str, describing a video file path    |   A Gui that enable to select a destination/save video filename via a  |
| for saving (NewType)                               | file dialog.                                                           |
+----------------------------------------------------+------------------------------------------------------------------------+
| (BaseModel) fiatlight.fiat_kits.fiat_image.cv_colo | fiatlight.fiat_togui.basemodel_gui.BaseModelGui                        |
| r_type.ColorConversion                             |   A sophisticated GUI for a pydantic model.                            |
|   A color conversion from one color space to       |                                                                        |
| another (color spaces use the ColorType enum).     |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| (BaseModel) fiatlight.fiat_kits.fiat_image.lut_typ | fiatlight.fiat_togui.basemodel_gui.BaseModelGui                        |
| es.ColorLutParams                                  |   A sophisticated GUI for a pydantic model.                            |
+----------------------------------------------------+------------------------------------------------------------------------+
| (BaseModel) fiatlight.fiat_kits.fiat_image.camera_ | fiatlight.fiat_togui.basemodel_gui.BaseModelGui                        |
| image_provider.CameraParams                        |   A sophisticated GUI for a pydantic model.                            |
|   Parameters for the camera image provider         |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| None                                               | fiatlight.fiat_kits.fiat_image.image_gui.ImageWithGui                  |
|   All types whose name starts with                 |   A highly sophisticated GUI for displaying and analysing images.      |
| fiatlight.fiat_kits.fiat_image.image_types.Image   | Zoom/Pan, show channels, show pixel values, sync zoom accross images,  |
|                                                    | etc.                                                                   |
+----------------------------------------------------+------------------------------------------------------------------------+
| None                                               | fiatlight.fiat_kits.fiat_image.image_gui.ImageWithGui                  |
|   Union of types whose name starts with            |   A highly sophisticated GUI for displaying and analysing images.      |
| fiatlight.fiat_kits.fiat_image.image_types.Image   | Zoom/Pan, show channels, show pixel values, sync zoom accross images,  |
|                                                    | etc.                                                                   |
+----------------------------------------------------+------------------------------------------------------------------------+
| (BaseModel)                                        | fiatlight.fiat_kits.fiat_image.lut_gui.LutParamsWithGui                |
| fiatlight.fiat_kits.fiat_image.lut_types.LutParams |   A GUI for LutParams, allowing to visually edit a curve representing  |
|   Simple parameters to create a LUT (Look-Up       | Look-Up Table transformation.                                          |
| Table) transformation to an image                  |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_kits.fiat_implot.array_types.FloatM | fiatlight.fiat_kits.fiat_implot.simple_plot_gui.SimplePlotGui          |
| atrix_Dim1                                         |   A GUI for presenting 1D or 2D arrays with ImPlot. Can present the    |
|   synonym for a 1D ndarray of floats (NewType)     | array as a line, scatter (+ stairs, or bars plot, if the array is      |
|                                                    | small enough)                                                          |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_kits.fiat_implot.array_types.FloatM | fiatlight.fiat_kits.fiat_implot.simple_plot_gui.SimplePlotGui          |
| atrix_Dim2                                         |   A GUI for presenting 1D or 2D arrays with ImPlot. Can present the    |
|   synonym for a 2D ndarray of floats (NewType)     | array as a line, scatter (+ stairs, or bars plot, if the array is      |
|                                                    | small enough)                                                          |
+----------------------------------------------------+------------------------------------------------------------------------+
| fiatlight.fiat_kits.fiat_ai.prompt.Prompt          | fiatlight.fiat_kits.fiat_ai.prompt_with_gui.PromptWithGui              |
|   synonym for a string used as a prompt, used for  |   A Gui to edit a prompt, with a Submit button, and a multiline edit   |
| AI text and image generation models (NewType)      | in a popup.                                                            |
+----------------------------------------------------+------------------------------------------------------------------------+
| pandas.core.frame.DataFrame                        | fiatlight.fiat_kits.fiat_dataframe.dataframe_with_gui.DataFrameWithGui |
|                                                    |   A class to present a pandas DataFrame in the GUI, with pagination    |
|                                                    | and other features. Open in a pop-up for more features                 |
+----------------------------------------------------+------------------------------------------------------------------------+
| matplotlib.figure.Figure                           | fiatlight.fiat_kits.fiat_matplotlib.figure_with_gui.FigureWithGui      |
|   The top level container for all the plot         |   A Gui that can present a resizable matplotlib figure                 |
| elements.                                          |                                                                        |
+----------------------------------------------------+------------------------------------------------------------------------+