CLI for Mainflux
Switch branches/tags
Nothing to show
Clone or download
drasko Merge pull request #29 from manuIO/master
Refactor and sync with lastest Mainflux changes
Latest commit 78da40e May 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
certs
cmd
vendor
.gitignore
.travis.yml
LICENSE
README.md
bashflux.go
glide.lock
glide.yaml

README.md

Bashflux

License Build Status Go Report Card Join the chat at https://gitter.im/mainflux/mainflux

Command line interface (CLI) for Mainflux system.

Service

  • Get the service verison: bashflux version

User management

  • bashflux users create john.doe@email.com password
  • bashflux tokens create john.doe@email.com password

System provisioning

  • Provisioning devices: bashflux clients create '{"type":"device", "name":"nyDevice"}' <user_auth_token>

  • Provisioning applications: bashflux clients create '{"type":"app", "name":"nyDevice"}' <user_auth_token>

  • Retrieving provisioned clients: bashflux clients get --offset=1 --limit=5 <user_auth_token>

  • Retrieving a specific client: bashflux clients get <client_id> --offset=1 --limit=5 <user_auth_token>

  • Removing clients: bashflux clients delete <client_id> <user_auth_token>

  • Provisioning devices: bashflux channels create '{"name":"nyChannel"}' <user_auth_token>

  • Provisioning applications: bashflux channels create '{"name":"nyChannel"}' <user_auth_token>

  • Retrieving provisioned channels: bashflux channels get --offset=1 --limit=5 <user_auth_token>

  • Retrieving a specific channel: bashflux channels get <channel_id> --offset=1 --limit=5 <user_auth_token>

  • Removing channels: bashflux channels delete <channel_id> <user_auth_token>

Access control

  • Connect client to a channel: bashflux client connect <client_id> <chanel_id <user_auth_token>

  • Disconnect client from channel: bashflux client disconnect <client_id> <chanel_id <user_auth_token>

  • Send message: bashflux msg send <channel_id> '[{"bn":"some-base-name:","bt":1.276020076001e+09, "bu":"A","bver":5, "n":"voltage","u":"V","v":120.1}, {"n":"current","t":-5,"v":1.2}, {"n":"current","t":-4,"v":1.3}]' <client_auth_token>