---
# System prepended metadata

title: LOC CLI Commands
tags: [LOC CLI]

---

[Back to LOC CLI Guidebook](https://hackmd.io/4LIsNIuWQnuR70JMeuBAEA?view)

# LOC CLI Commands

## ```loc -h``` | ```loc --help```

Display help for command.

```
Usage: loc [options] [command]

Options:
  -V, --version            output the version number
  -h, --help               display help for command

Commands:
  new [options] <name>     create data process template including sample generic logics, aggregator logic and data process config
                           files
  deploy [options] <name>  deploy data process template including logics and dataprocess config files
  login [options]          login
  logic|l
  dataprocess|dp
  apiroute|ar
  profile
  help [command]           display help for command
```

## ```loc -V``` | ```loc --version```

Output version number.

```
0.5.0
```

## ```loc profile [options] [command]```

Setting the profile of CLI, for example, ```./loc profile set -f example.yaml -p example``` means "set the .yaml profile file (-f) to the new profile (-p) named as "example".

```
Usage: loc profile [options] [command]

Options:
  -h, --help                   display help for command

Commands:
  delete [options] [key]       delete value from connection profile
  get [options] [key]          get value from connection profile
  list [options]               list profiles
  set [options] [key] [value]  set value to connection profile
  default [options] <name>     set default profile
  help [command]               display help for command
```

## ```loc new [options] <name>```

```
Usage: loc new [options] <name>

create data process template including sample generic logics, aggregator logic and data process config files

Arguments:
  name               name of Data Process Template

Options:
  -v, --verbose      verbose mode
  -ts, --typescript  typescript template
  -h, --help         display help for command
```

## ```loc deploy [options] <name>```

```
Usage: loc deploy [options] <name>

deploy data process template including logics and dataprocess config files

Arguments:
  name                                      name of Data Process Template

Options:
  -v, --verbose                             verbose mode
  -ts, --typescript                         typescript template
  -ar, --api-route-config [apiRouteConfig]  api route config for deployment
  -p, --profile <profile>                   agent connection profile (default: "myprofile")
  -h, --help                                display help for command
```

## ```loc l``` | ```loc logic```
    
```
Usage: loc logic|l [options] [command]

Options:
  -h, --help                            display help for command

Commands:
  get [options] <permanentIdentity>     get logic
  list [options]                        list logics
  delete [options] <permanentIdentity>  delete logic
  build [options] <input>               build logic
  compile [options] <input>             compile typescript file
  help [command]                        display help for command
```

## ```loc dp``` | ```loc datapross```
    
```
Usage: loc dataprocess|dp [options] [command]

Options:
  -h, --help                            display help for command

Commands:
  get [options] <permanentIdentity>     get data process
  list [options]                        list data processes
  delete [options] <permanentIdentity>  delete data process
  run [options] [permanentIdentity]     run data process

  Generate request body example:
  loc dataprocess run --example <path>
  Invoke by permanent identity and latest revision:
  loc dataprocess run [permanentIdentity] -f <request body file>
  Invoke by permanent identity and revision:
  loc dataprocess run [permanentIdentity] -f <request body file> --revision <dataProcess revision>

  run-local [options] [name]            run data process local

  Generate preset task example:
  loc dataprocess run-local --example <path>
  Run with local executable
  loc dataprocess run-local [name] -f <preset task> [-ts]
  Run with docker mode
  loc dataprocess run-local [name] -f <preset task> [-ts] --docker
  Export task yaml only
  loc dataprocess run-local [name] -f <preset task> [-ts] --export

  help [command]                        display help for command
```

## ```loc ar``` | ```loc apiroute```
    
```
Usage: loc apiroute|ar [options] [command]

Options:
  -h, --help             display help for command

Commands:
  get [options] <id>     get api route
  list [options]         list api routes
  delete [options] <id>  delete api route
  deploy [options]       deploy api route
  help [command]         display help for command
```

## ```loc login```
    
```
Usage: loc login [options]

login

Options:
  -v, --verbose            verbose mode
  -p, --profile <profile>  agent connection profile (default: "example")
  -h, --help               display help for command
```

---
<text style="font-size:17pt">**LOC CLI Guidebook Catalogue**</text>

<text style="font-size:13pt"> [LOC CLI Introduction](https://hackmd.io/J5r2l2OaRgKF9LACR5KHsg?view)</text>
<text style="font-size:13pt"> [LOC Concept](https://hackmd.io/mwTxDdBjSuiKrAmainQZAA?view)</text>
<text style="font-size:13pt"> [LOC CLI Commands](https://hackmd.io/R4mrz2t1QSyTCHH73_2itg?view)</text>
<text style="font-size:13pt"> [Getting Started - JavaScript](https://hackmd.io/IiHvmAtjTTGFfakaH0dWuw?view)</text>
<text style="font-size:13pt"> [Getting Started - TypeScript](https://hackmd.io/kz93Th7vTCCbO3GFxp3r-A?view)</text>
<text style="font-size:13pt"> [Reference - Agent List](https://hackmd.io/Uj-tC7l9Q82VyGr8R5PL2Q?view)</text>
<text style="font-size:13pt"> [Reference - Event Fields Comparison Table](https://hackmd.io/N2Km6-8kRI2tMR5X4tRHeQ?view)</text>

###### tags: `LOC CLI`