Reference

CLI

Generate themes and styles in your project with Forui's CLI.

Forui includes a CLI that generates themes and styles in your project. These themes and styles can be directly modified to fit your design needs. No additional installation is required. Neither does the CLI increase your application's bundle size.

Global options

These options are available on every command:

-h, --help          Print this usage information.
    --[no-]color    Use terminal colors.
    --no-input      Disable interactive prompts and assume default values.

init

Use the init command to set up Forui in your project. It creates a forui.yaml configuration file, generates a theme, and creates a main.dart entry point. Run without --preset to configure the theme interactively.

dart run forui init
Usage: forui init
-h, --help        Print this usage information.
-f, --force       Overwrite existing files if they exist.
-p, --preset      A theme's code.
-t, --template    The main.dart template to generate. Defaults to "basic".
                  [basic, router]

snippet

create

Use the snippet create command to generate a code snippet in your project. The snippets are generated in lib by default.

dart run forui snippet create [snippet...]
Usage: forui snippet create [snippet...]
-h, --help      Print this usage information.
-f, --force     Overwrite existing files if they exist.
-o, --output    The output directory or file, relative to the project directory.
                (defaults to "lib")

ls

Use the snippet ls command to list all available snippets.

dart run forui snippet ls
Usage: forui snippet ls
-h, --help    Print this usage information.

style

create

Use the style create command to generate a style in your project. The styles are generated in lib/theme/styles by default.

See the docs on how to use the generated styles.

dart run forui style create [style...]
Usage: forui style create [style...]
-h, --help      Print this usage information.
-a, --all       Generate all styles.
-f, --force     Overwrite existing files if they exist.
-o, --output    The output directory or file, relative to the project directory.
                (defaults to "lib/theme/styles")

ls

Use the style ls command to list all available styles.

dart run forui style ls
Usage: forui style ls
-h, --help    Print this usage information.

theme

create

Use the theme create command to generate a theme in your project. The theme is generated across multiple files in lib/theme/ by default.

Run without --preset to configure the theme interactively.

See the docs on how to use the generated theme.

dart run forui theme create
Usage: forui theme create
-h, --help      Print this usage information.
-f, --force     Overwrite existing files if they exist.
-p, --preset    A theme's code.
-o, --output    The output directory or file, relative to the project directory.
                (defaults to "lib/theme/theme.dart")

On this page