Masamune logo

Katana CLI

Follow on Twitter Follow on Threads Maintained with Melos

GitHub Sponsor


[GitHub](https://github.com/mathrunet) | [YouTube](https://www.youtube.com/c/mathrunetchannel) | [Packages](https://pub.dev/publishers/mathru.net/packages) | [Twitter](https://twitter.com/mathru) | [Threads](https://threads.net/@mathrunet) | [LinkedIn](https://www.linkedin.com/in/mathrunet/) | [mathru.net](https://mathru.net)


Command line interface used in the Masamune framework.

The following features are available

  • Project creation and optimization against the Masamune framework
  • Code template generation
  • Automatic code generation with build_runner
  • Other settings

Installation

Install with the following command.

flutter pub global activate katana_cli

Check the dependencies of the commands used internally. If these do not all pass, it may not work properly.

katana doctor

How to use

The following commands are available

katana [command] [subcommand] [optional parameters]

Help for the command is available at

katana help

Project Creation

Execute the following command in the folder where the project was created.

The Application ID should include the ID in the reverse domain (com.test.myapplication).

katana create [Application ID(e.g. com.test.myapplication)]

Code generation

The following commands can be used to generate each code template.

katana code [Code ID] [Optional Parameters]

Page

Create page templates under lib/pages.

katana code page [PageName]

Collection Model

Create a collection model under lib/models.

katana code collection [ModelName]

Document Model

Create a document model under lib/models.

katana code document [ModelName]

Controller

Create controllers under lib/controllers.

katana code controller [ControllerName]

For other codes, please see Help.

Automatic code generation with build_runner

You must have build_runner installed in your project in order to run it.

flutter pub add --dev build_runner

Automatic code generation

If you want to perform automatic code generation as a one-shot, execute the following command.

katana code generate

Code generation monitoring

If you want to monitor code changes and automatically generate code when changes are made, execute the following command.

katana code watch

For other commands, please see Help.

GitHub Sponsors

Sponsors are always welcome. Thank you for your support!

https://github.com/sponsors/mathrunet

Libraries

action/ads/ads
action/agora/agora
action/app/animate
action/app/app_review
action/app/att
action/app/calendar
action/app/camera
action/app/csr
action/app/force_updater
action/app/geocoding
action/app/icon
action/app/info
action/app/introduction
action/app/keystore
action/app/local_notification
action/app/location
action/app/openai
action/app/p12
action/app/picker
action/app/privacy_manifests
action/app/speech_to_text
action/app/spread_sheet
action/app/text_to_speech
action/ecosystem/ecosystem
action/firebase/algolia
action/firebase/authentication
action/firebase/deploy
action/firebase/init
action/firebase/messaging
action/firebase/scheduler
action/firebase/terms_and_privacy
action/git/action
action/git/hook
action/git/platform/android
action/git/platform/ios
action/git/platform/web
action/git/review
action/mail/gmail
action/mail/send_grid
action/post/firebase_deploy_post_action
action/purchase/purchase
action/stripe/stripe
ai/designs/controller_design
ai/designs/designs
ai/designs/metadata_design
ai/designs/model_design
ai/designs/page_design
ai/designs/plugin_design
ai/designs/theme_design
ai/designs/widget_design
ai/docs/design_document
ai/docs/docs
ai/docs/file_structure
ai/docs/flutter_types
ai/docs/flutter_widgets
ai/docs/form/form_builder
ai/docs/form/form_button
ai/docs/form/form_checkbox
ai/docs/form/form_chips_field
ai/docs/form/form_date_field
ai/docs/form/form_date_time_field
ai/docs/form/form_date_time_range_field
ai/docs/form/form_duration_field
ai/docs/form/form_editable_toggle_builder
ai/docs/form/form_enum_dropdown_field
ai/docs/form/form_enum_field
ai/docs/form/form_focus_node_builder
ai/docs/form/form_future_field
ai/docs/form/form_label
ai/docs/form/form_list_builder
ai/docs/form/form_map_dropdown_field
ai/docs/form/form_map_field
ai/docs/form/form_map_tag_dropdown_field
ai/docs/form/form_media
ai/docs/form/form_month_field
ai/docs/form/form_multi_media
ai/docs/form/form_num_field
ai/docs/form/form_password_builder
ai/docs/form/form_pin_field
ai/docs/form/form_rating_bar
ai/docs/form/form_style_container
ai/docs/form/form_switch
ai/docs/form/form_text_editing_controller_builder
ai/docs/form/form_text_field
ai/docs/form_usage
ai/docs/functions_usage
ai/docs/katana_cli
ai/docs/katana_ui/avatar_tile
ai/docs/katana_ui/card_tile
ai/docs/katana_ui/chat_tile
ai/docs/katana_ui/indent
ai/docs/katana_ui/label
ai/docs/katana_ui/line_tile
ai/docs/katana_ui/list_tile_group
ai/docs/katana_ui/loading_builder
ai/docs/katana_ui/message_box
ai/docs/katana_ui/periodic_scope
ai/docs/katana_ui/scroll_builder
ai/docs/katana_ui/shimmer
ai/docs/katana_ui/square_avatar
ai/docs/katana_ui_usage
ai/docs/model_field_value/model_counter
ai/docs/model_field_value/model_date
ai/docs/model_field_value/model_date_range
ai/docs/model_field_value/model_geo_value
ai/docs/model_field_value/model_image_uri
ai/docs/model_field_value/model_locale
ai/docs/model_field_value/model_localized_value
ai/docs/model_field_value/model_ref
ai/docs/model_field_value/model_time
ai/docs/model_field_value/model_time_range
ai/docs/model_field_value/model_timestamp
ai/docs/model_field_value/model_timestamp_range
ai/docs/model_field_value/model_token
ai/docs/model_field_value/model_uri
ai/docs/model_field_value/model_video_uri
ai/docs/model_field_value_usage
ai/docs/model_filter_conditions
ai/docs/model_usage
ai/docs/naming_convention
ai/docs/page_types
ai/docs/plugin_usage
ai/docs/plugins/ads
ai/docs/plugins/agora
ai/docs/plugins/animate
ai/docs/plugins/calendar
ai/docs/plugins/camera
ai/docs/plugins/google_map
ai/docs/plugins/introduction
ai/docs/plugins/local_notification
ai/docs/plugins/location
ai/docs/plugins/openai
ai/docs/plugins/picker
ai/docs/plugins/purchase
ai/docs/plugins/sendgrid
ai/docs/plugins/speech_to_text
ai/docs/plugins/stripe
ai/docs/plugins/text_to_speech
ai/docs/primitive_types
ai/docs/router_usage
ai/docs/state_management_usage
ai/docs/technology_stack
ai/docs/terminology
ai/docs/theme_usage
ai/docs/transition_usage
ai/docs/universal_ui/universal_app_bar
ai/docs/universal_ui/universal_column
ai/docs/universal_ui/universal_container
ai/docs/universal_ui/universal_edge_insets
ai/docs/universal_ui/universal_grid_view
ai/docs/universal_ui/universal_header_tile
ai/docs/universal_ui/universal_list_view
ai/docs/universal_ui/universal_padding
ai/docs/universal_ui/universal_scaffold
ai/docs/universal_ui/universal_side_bar
ai/docs/universal_ui_usage
ai/impls/controller_creation
ai/impls/controller_method_creation
ai/impls/controller_method_impl
ai/impls/impls
ai/impls/metadata_impl
ai/impls/mock_data_impl
ai/impls/model_impl
ai/impls/page_creation
ai/impls/page_logic_impl
ai/impls/page_ui_impl
ai/impls/plugin_impl
ai/impls/theme_impl
ai/impls/widget_creation
ai/impls/widget_logic_impl
ai/impls/widget_ui_impl
command/apply
command/cer/cer
command/code/code
command/code/server/server
command/code/view/view
command/create
command/deploy
command/doctor
command/git/git
command/module
command/pub/pub
command/store/store
config
katana_cli
Command line tool for Masamune/Katana Framework. It initializes the project and initializes the services.