Some help with Jargon busting / understanding the CLI please

Hi all,

On the blog @zach has discussed the introduction of the Comand Line Interface (with some fanfare).

I feel a bit embarrassed to ask but what is the CLI used for?

I also noted some comments about a “language wrapper”. What the Dickens is one of thoes?

Thanks in advance for your help and patience.

Julian

@Julian There’s a few cool features about the CLI!

Let’s make things simple here and really it’s not too complicating :smile:

  1. the CLI is like what its name suggest…a command line tool

  2. You can do things like:

  • Write your program on your IDE, maybe let’s say Arduino Processing and use send the file to :spark: cloud for compilation into a binary file which can in turned be used to download to the core
  • Use a pre-compiled binary file to flash into the core. (maybe you want to mass program 10 cores and you have a binary already compiled and this make it easier than to click 10 times on the WebIDE
  • Monitor variables and save them in a file!
  • Repair a core that had a bad key and cannot communicate with the cloud
  • and more :smile:

Give it a try: https://community.spark.io/t/tutorial-spark-cli-on-windows/3112

and i’m sure you will have a better understanding!

Keep asking and you will learn more! I’m sure many are here to help answer anything and everything. :smile:

1 Like

Hi Julian,

Happy to help answer that question! We also noticed recently how many acronyms are flying around. If this post is too specific or too vague, please feel free to keep asking! :smile:

The CLI or Command Line Interface, is a custom application we’ve built and open sourced that is meant to help you interact with your Core and the Cloud more easily. The command line dates back to when computers first had keyboards, and is a text based interface to your computer’s operating system. On Windows you can open this as a “Command Prompt”, or Start->Run->cmd . On Mac you can open this as the “Terminal” application, on linux, well, you’re on linux, you know where. The command line can seem daunting for people just discovering it, but it’s a valuable tool for power-users and casual users alike.

You can use the CLI in most of the same ways as you can use the build IDE, list your cores, flash code over the air to your cores, query for variable values, call functions, and more. (Well, a lot of this is currently still in development).

What’s a Language Wrapper? – As you dive deeper into your projects, you may want to build an application that knows how to talk to Spark’s servers over the internet. Since there are a lot of internet friendly and popular programming languages, and people tend to have their favorites, it’s really helpful to have a starting point for your favorite environment.

Haha, ahh! @kennethlimcp you beat me to it :smile:

Thanks,
David

To visually explain what the CLI (command line interface) is:

@Dave, @kennethlimcp, @zach; Thank you for your replies. I will kepp reading and studying and asking questions. Thank you for your help.Thank you for the visual cue Zach, I recall this sort of thing from moving files around on a windows 3.1 machine.

I thnik an arduino board runs C or C++ right? Does the snippit above mean that you can interact with a core using different languages, depending on what wrapper you use? Or are the different languages just for internet to core server communications?

Thanks for your help.

Julian

The code running on the Core itself is C or C++, exactly. But you can do so much with the Core by interacting with it over the internet, and that communication can be done from any programming language.

1 Like

@zachary, does that mean that there could be several versions of the IDE each running a different language according to the users preference or skill in a certain language?

Hi @Julian,

Down the road I’d love to support something like that, but right now the easiest way to write firmware for your core is with the C++ / Arduino compatible language and libraries. However if you’re writing code to interact with your Core over the internet, that can certainly be written in just about any language and in any editor.

Thanks!
David

1 Like