github.com/project-flogo/cli@v0.12.0/docs/commands.md (about)

     1  <!--
     2  title: flogo
     3  weight: 5020
     4  pre: "<i class=\"fa fa-terminal\" aria-hidden=\"true\"></i> "
     5  -->
     6  
     7  # Commands
     8  
     9  - [build](#build) - Build the flogo application
    10  - [create](#create) - Create a flogo application project
    11  - [help](#help)  - Help about any command
    12  - [imports](#imports) - Manage project dependency imports
    13  - [install](#install) - Install a flogo contribution/dependency
    14  - [list](#list) - List installed flogo contributions
    15  - [plugin](#plugin) - Manage CLI plugins
    16  - [update](#update) - Update an application contribution/dependency
    17  
    18  ### Global Flags
    19  ```
    20    --verbose   verbose output
    21  ```
    22  
    23    
    24  ## build
    25  
    26  This command is used to build the application.
    27  
    28  ```
    29  Usage:
    30    flogo build [flags]
    31  
    32  Flags:
    33    -e, --embed         embed configuration in binary
    34    -f, --file string   specify a flogo.json to build
    35    -o, --optimize      optimize build
    36        --shim string   use shim trigger   
    37  ```
    38  _**Note:** the optimize flag removes unused trigger, acitons and activites from the built binary._
    39  
    40  
    41  ### Examples
    42  Build the current project application
    43  
    44  ```bash
    45  $ flogo build
    46  ```
    47  Build an application directly from a flogo.json
    48  
    49  ```bash
    50  $ flogo build -f flogo.json
    51  ```
    52  _**Note:** this command will only generate the application binary for the specified json and can be run outside of a flogo application project_
    53  
    54  ## create
    55  
    56  This command is used to create a flogo application project.
    57  
    58  ```
    59  Usage:
    60    flogo create [flags] [appName]
    61  
    62  Flags:
    63        --cv string     specify core library version (ex. master)
    64    -f, --file string   specify a flogo.json to create project from
    65  ```
    66  
    67  _**Note:** when using the --cv flag to specify a version, the exact version specified might not be used the project.  The application will install the version that satisfies all the dependency constraints.  Typically this flag is used when trying to use the master version of the core library._
    68  
    69  ### Examples
    70  
    71  Create a base sample project with a specific name:
    72  
    73  ```
    74  $ flogo create my_app
    75  ```
    76  
    77  Create a project from an existing flogo application descriptor:
    78  
    79  ```
    80  $ flogo create -f myapp.json
    81  ```
    82  
    83  ## help
    84  
    85  This command shows help for any flogo commands.
    86  
    87  ```
    88  Usage:
    89    flogo help [command]
    90  ```  
    91  
    92  ### Examples
    93  Get help for the build command:
    94  
    95  ```bash
    96  $ flogo help build
    97  ```
    98  ## imports
    99  
   100  This command helps manage project imports of contributions and dependencies.
   101  
   102  ```
   103  Usage:
   104    flogo imports [command]
   105  
   106  Available Commands:
   107    sync     sync Go imports to project imports
   108    resolve  resolve project imports to installed version
   109    list     list project imports
   110  ```   
   111  
   112  ## install
   113  
   114  This command is used to install a flogo contribution or dependency.
   115  
   116  ```
   117  Usage:
   118    flogo install [flags] <contribution|dependency>
   119  
   120  Flags:
   121    -f, --file string      specify contribution bundle
   122    -r, --replace string   specify path to replacement contribution/dependency
   123  ```
   124        
   125  ### Examples
   126  Install the basic REST trigger:
   127  
   128  ```bash
   129  $ flogo install github.com/project-flogo/contrib/trigger/rest
   130  ```
   131  Install a contribution that you are currently developing on your computer:
   132  
   133  ```bash
   134  $ flogo install -r /tmp/dev/myactivity github.com/myuser/myactivity
   135  ```
   136  
   137  Install a contribution that is being developed by different person on their fork:
   138  
   139  ```bash
   140  $ flogo install -r github.com/otherusr/myactivity@master github.com/myuser/myactivity
   141  ```
   142  
   143  ## list
   144  
   145  This command lists installed contributions in your application
   146  
   147  ```
   148  Usage:
   149    flogo list [flags]
   150  
   151  Flags:
   152        --filter string   apply list filter [used, unused]
   153    -j, --json            print in json format (default true)
   154        --orphaned        list orphaned refs
   155  ```  
   156  _**Note** orphaned refs are `ref` entries that use an import alias (ex. `"ref": "#log"`) which has no corresponding import._
   157  
   158  ### Examples
   159  List all installed contributions:
   160  
   161  ```bash
   162  $ flogo list
   163  ```
   164  List all contributions directly used by the application:
   165  
   166  ```bash
   167  $ flogo list --filter used
   168  ```
   169  _**Note:** the results of this command are the only contributions that will be compiled into your application when using `flogo build` with the optimize flag_
   170  
   171  
   172  ## plugin
   173  
   174  This command is used to install a plugin to the Flogo CLI.
   175  
   176  ```
   177  Usage:
   178    flogo plugin [command]
   179  
   180  Available Commands:
   181    install     install CLI plugin
   182    list        list installed plugins
   183    update      update plugin
   184  ```      
   185  
   186  ### Examples
   187  List all installed plugins:
   188  
   189  ```bash
   190  $ flogo plugin list
   191  ```
   192  Install the legacy support plugin:
   193  
   194  ```bash
   195  $ flogo plugin install github.com/project-flogo/legacybridge/cli`
   196  ```
   197  _**Note:** more information on the legacy support plugin can be found [here](https://github.com/project-flogo/legacybridge/tree/master/cli)_
   198  
   199  Install and use custom plugin:
   200  
   201  ```
   202  $ flogo plugin install github.com/myuser/myplugin
   203  
   204  $ flogo `your_command`
   205  ```
   206  <br>
   207  More information on Flogo CLI plugins can be found [here](plugins.md)
   208  
   209  ## update
   210  
   211  This command updates a contribution or dependency in the project.
   212  
   213  ```
   214  Usage:
   215    flogo update [flags] <contribution|dependency>
   216  
   217  ```   
   218  ### Examples
   219  Update you log activity to master:
   220  
   221  ```bash
   222  $ flogo update github.com/project-flogo/contrib/activity/log@master
   223  ```
   224  
   225  Update your flogo core library to latest master:
   226  
   227  ```bash
   228  $ flogo update github.com/project-flogo/core@master
   229  ```