An open API service indexing awesome lists of open source software.

https://github.com/iij/legs-client

Daemon client and cli tool for IIJ Legs service.
https://github.com/iij/legs-client

Last synced: 5 months ago
JSON representation

Daemon client and cli tool for IIJ Legs service.

Awesome Lists containing this project

README

        

[![CircleCI](https://circleci.com/gh/iij/legs-client.svg?style=shield)](https://circleci.com/gh/iij/legs-client)

# legs-client

legs-client provides the cli command tool and client daemon for legs product.

Legs service document => https://dev.smf.jp/legs/

## Installation
Please execute below command. install.sh downloads client tool to current directory.
```bash
$ curl --silent https://raw.githubusercontent.com/iij/legs-client/master/install.sh | sh
```
After installation, you can show version info by `version` command.
```bash
$ ./legsc version
```
And if you need, copy tool binary to `/usr/local/bin`
```bash
$ sudo cp ./legsc /usr/local/bin/legsc
```

## Basic Usage
```bash
# show help
$ ./legsc

# set secret key
$ ./legsc secret

# export config file with all current/default values
$ ./legsc export

# specify config file path
$ ./legsc -c path/to/config.yml secret

# start client in foreground
$ ./legsc start -f

# start client in background
$ ./legsc start

# stop client
$ ./legsc stop

# send data to server
$ ./legsc send routing/name '{"value": 1}'
```

## Development
```bash
# get go libraries which use in project.
$ make setup

# dep ensure
$ make dep

# start daemon with localconfig and tail log file.
$ make run

# stop daemon
$ make stop

# format by goimports
$ make fmt
```