Comments (10)
This looks interesting: https://github.com/spf13/cobra
from mainflux.
@nmarcetic would you like to take this one? Looks like a good Go
training session :)
from mainflux.
I added https://github.com/Mainflux/mainflux-cli to get us started.
from mainflux.
Hmm... on the second thought I think thart REPL shell (something like mongo
cli` would be more adequate. That reminds me that Telefonica has created one for Fiware IoT Agent: https://github.com/telefonicaid/iotagent-node-lib#-iot-library-testing - I could enter in the interactive shell and send commands to IoT Agent Server - i.e. tell where the host is, send provisioning commands, inspect resources, etc...
However - for Go
I could not find anything better than this: https://github.com/abiosoft/ishell
from mainflux.
This one should be postponed until we figure out should we use EMQTT, as it has it's own CLI that we can potentially re-use.
from mainflux.
@manuio can you please take a look at this dev, tell us what is needed.
@mijicd I've used https://github.com/spf13/cobra, but now I am not 100% sure that this is the best approach. Do you think that having an interactive shell (like MongoDB or Emqtt have) would be better?
I do not know how this can be achieved, the best I have found is this: https://github.com/abiosoft/ishell
from mainflux.
@drasko I did a little research. As you, I think that ishell seems to be the best option and there are not many others...
Otherwise if it's only for an internal purpose we can do a simple interface with fmt and bufio pkgs and use net/http pkg to send requests, no?
from mainflux.
Python seem to have more mature libraries. This one: https://github.com/jonathanslenders/python-prompt-toolkit, or even in stdlib: https://docs.python.org/3/library/cmd.html and extension: https://github.com/python-cmd2/cmd2
Installing CLI with Go:
- You wget binary - we must compile for Linux, MacOS and Win
- You intall Go and then you build yourself (it is not common that people have Go on their machines yet)
With Python:
- You already have Python (most probably)
pip install
@nmarcetic @mijicd opinions?
from mainflux.
OK, we'll try to do it in Go. Let's see how it goes ;).
from mainflux.
Done in https://github.com/mainflux/mainflux-cli. Closing the issue.
from mainflux.
Related Issues (20)
- Feature: coap-cli : migrate gocoap library from v2 to v3.3
- Feature: coap-cli: Add CI
- Feature: coap-cli: Remove vendor dir
- Feature: Use Postgres LTREE for groups hierarchy
- Feature: Rename `DeletePolicy` gRPC & SpiceDB function to `DeletePolicyFilter` and
- Bug: Domain retrieval for domain members (not the owner) fails with authorisation error
- Feature: Detect problems with Auth gRPC connection during setup
- Feature: Service configuration HOT 1
- Bug: Failure to fetch domains using status and permissions as query params.
- Feature: Entity vs Domain level access to an entity
- Create Users CLI tests
- Bug: Log doesn't have full errors, instead it returns limited error information HOT 2
- Feature: Split Existing Auth Client into Separate Clients for AuthN/AuthZ and Policy CRUD
- Bug: Share thing works with users from different domains
- Feature: Rename spiceDB permission `viewer_only` to `view_only`
- Feature: CLI flag to print all help command in tree hierarchy
- Update SDK godocs HOT 1
- Feature: Explorer the options for generating OpenAPI spec from annotated HTTP endpoint.
- Feature: Domain users unassign optimization
- Feature: Remove all user domain related policy on domain unassign
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mainflux.