Commands API¶
New Command¶
ok_cli.commands.new
¶
Functions¶
new(name)
¶
Create a new React Native app.
Source code in ok_cli/commands/new/__init__.py
Generate Command¶
ok_cli.commands.generate
¶
Functions¶
generate(type, name)
¶
Generate a component, service, or page.
Source code in ok_cli/commands/generate/__init__.py
Other Commands¶
ok_cli.commands.add
¶
ok_cli.commands.analytics
¶
ok_cli.commands.cache
¶
Functions¶
cache(clear=typer.Option(False, '--clear', help='Clear cache directory'))
¶
Configure or clear build cache.
Source code in ok_cli/commands/cache/__init__.py
ok_cli.commands.compilemessages
¶
Functions¶
compilemessages(locale=typer.Option(None, '--locale', '-l', help='Specifies the locale(s) to process'), exclude=typer.Option(None, '--exclude', '-x', help='Specifies the locale(s) to exclude from processing'), use_fuzzy=typer.Option(False, '--use-fuzzy', '-f', help='Includes fuzzy translations into compiled files (by default lingui compiles strictly, rejecting fuzzy)'), ignore=typer.Option(None, '--ignore', '-i', help='Ignores directories matching the given glob-style pattern (Django gettext option; not used by lingui)'))
¶
Compile .po files to .js/.ts catalogs via lingui compile.
Mimics Django's compilemessages command but uses lingui under the hood.
Source code in ok_cli/commands/compilemessages/__init__.py
ok_cli.commands.config
¶
Functions¶
config(key=None)
¶
Show config (reads from package.json or .env).
Source code in ok_cli/commands/config/__init__.py
ok_cli.commands.generate
¶
Functions¶
generate(type, name)
¶
Generate a component, service, or page.
Source code in ok_cli/commands/generate/__init__.py
ok_cli.commands.lint
¶
ok_cli.commands.makemessages
¶
Functions¶
makemessages(locale=typer.Option(None, '--locale', '-l', help='Specifies the locale(s) to process'), exclude=typer.Option(None, '--exclude', '-x', help='Specifies the locale(s) to exclude from processing'), all=typer.Option(False, '--all', '-a', help='Updates message files for all available languages. Note: lingui extracts all catalog locales by default, so this flag is redundant.'), extension=typer.Option(None, '--extension', '-e', help='File extension(s) to examine (Django gettext option; not used by lingui)'), domain=typer.Option('django', '--domain', '-d', help='Domain of the messages files (Django gettext option; not used by lingui)'), symlinks=typer.Option(False, '--symlinks', '-s', help='Follows symlinks to directories (Django gettext option; not used by lingui)'), ignore=typer.Option(None, '--ignore', '-i', help='Ignores files or directories matching glob-style pattern'), no_default_ignore=typer.Option(False, '--no-default-ignore', help='Disables the default values of --ignore (Django gettext option; not used by lingui)'), no_wrap=typer.Option(False, '--no-wrap', help='Disables breaking long message lines (Django gettext option; not used by lingui)'), no_location=typer.Option(False, '--no-location', help='Suppresses #: filename:line comment lines (Django gettext option; not used by lingui)'), add_location=typer.Option(None, '--add-location', help='Controls #: filename:line comment lines: full, file, or never (Django gettext option; not used by lingui, requires gettext >= 0.19)'), no_obsolete=typer.Option(False, '--no-obsolete', help="Removes obsolete message strings from .po files (maps to lingui's --clean flag)"), keep_pot=typer.Option(False, '--keep-pot', help='Prevents deleting temporary .pot files (Django gettext option; not used by lingui)'))
¶
Extract i18n messages from source code via lingui extract.
Mimics Django's makemessages command but uses lingui under the hood. Options specific to Django's xgettext/gettext workflow are accepted but may not affect lingui's behavior.
Source code in ok_cli/commands/makemessages/__init__.py
ok_cli.commands.run_task
¶
ok_cli.commands.run
¶
ok_cli.commands.translatemessages
¶
ok_cli.commands.test
¶
ok_cli.commands.version
¶
Functions¶
version()
¶
Show CLI version (from pyproject.toml)