Git Product home page Git Product logo

Comments (10)

drasko avatar drasko commented on June 11, 2024

This looks interesting: https://github.com/spf13/cobra

from mainflux.

drasko avatar drasko commented on June 11, 2024

@nmarcetic would you like to take this one? Looks like a good Go training session :)

from mainflux.

drasko avatar drasko commented on June 11, 2024

I added https://github.com/Mainflux/mainflux-cli to get us started.

from mainflux.

drasko avatar drasko commented on June 11, 2024

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.

drasko avatar drasko commented on June 11, 2024

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.

drasko avatar drasko commented on June 11, 2024

@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.

manuio avatar manuio commented on June 11, 2024

@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.

drasko avatar drasko commented on June 11, 2024

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.

drasko avatar drasko commented on June 11, 2024

OK, we'll try to do it in Go. Let's see how it goes ;).

from mainflux.

drasko avatar drasko commented on June 11, 2024

Done in https://github.com/mainflux/mainflux-cli. Closing the issue.

from mainflux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.