Skip to content

Vaishnav-Sabari-Girish/arduino-cli-interactive

Repository files navigation

Banner

Release

License

Bash Script

Get it on TUI-Shop

basher install

Documentation Links

  1. Github Pages
  2. Codeberg Pages

My tool is also available on TerminalTrove.com if you’d like to check it out there.

TerminalTrove

My tool is also available on awesome-tuis repository.

awesome-tuis

Arduino Interactive CLI

This tool is made specifically for those who want to transition from the Arduino IDE to the CLI , but are still scared or intimidated by the command line.

Before Installation.

Before installing the tool, make sure you create a GitHub PAT (Personal Access Token), so that you can be notified when the tool gets a new version.

You can create a PAT token here. Make sure you choose Tokens (Classic), and give repo permissions for your token.

Once you have your PAT, copy it and save it as an Environment variables in your ~/.bashrc or ~/.zshrc file as follows :

export ACI_GITHUB_TOKEN="<your PAT>"

Then source your file and then install aci

Testing the Tool (before install)

If you want to know how the tool works without installing it, copy and paste the below command :

curl -sSL https://raw.githubusercontent.com/Vaishnav-Sabari-Girish/arduino-cli-interactive/refs/heads/main/bash_shell_script/main.sh | bash

Installation

Using Basher

This tool can also be installed using the package manager for bash scripts basher as follows

basher install Vaishnav-Sabari-Girish/arduino-cli-interactive 

To run it, in the terminal run aci.sh

NOTE:

If you have installed it using basher, make sure you have installed gum, timer, arduino-cli, homebrew and also added homebrew to PATH

To upgrade the tool type

basher uninstall Vaishnav-Sabari-Girish/arduino-cli-interactive
basher install Vaishnav-Sabari-Girish/arduino-cli-interactive

Via Homebrew

brew install vaishnav-sabari-girish/arduino-cli-interactive/aci

From source

# Cloning from GitHub 
git clone https://github.com/Vaishnav-Sabari-Girish/arduino-cli-interactive.git

# Cloning from CodeBerg.org 
git clone https://codeberg.org/Vaishnav-Sabari-Girish/arduino-cli-interactive.git

# Cloning from GiTea 
git clone https://gitea.com/Vaishnav-Sabari-Girish/arduino-cli-interactive.git


cd bash_shell_script
chmod +x main.sh 
./main.sh 

Then open your ~/.bashrc or ~/.zshrc file and add this alias

alias aci="<path to the cloned repository>"

Then in the terminal type

source ~/.bashrc # For bash users 
source ~/.zshrc  # For zsh users

Pre-requisites

If not installed, the script will do it on it's own. But just in case something doesn't install properly do the below.

1. arduino-cli

There are many ways to install arduino-cli. I recommend Homebrew , because all the other prerequisite tools are also available on homebrew.

Homebrew

In case you do not have Homebrew installed in your system

macOS/Linux

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

For windows users

Use Windows Subsystem for Linux (WSL) and follow the instructions for Linux.

To learn to use WSL , the best video is by NetworkChuck


After installing Homebrew , go to your terminal and just type this

brew update
brew install arduino-cli
Installing arduino-cli using the installation script

If you do not want to use homebrew , you can copy and paste this installation script

curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh

NOTE : This script is only for Linux/macOS/WSL users.

Using the Pre-built Binaries

You can also install the prebuilt binaries for Windows found here

Check out the arduino-cli documentation here

2. gum

gum is a tool developed by the company Charm . Check out their gitHub at Charm's GitHub

It makes it easy to create good looking Terminal User Interface (TUI)

To install gum

# macOS or Linux
brew install gum

# Arch Linux (btw)
pacman -S gum

# Nix
nix-env -iA nixpkgs.gum

# Flox
flox install gum

# Windows (via WinGet or Scoop)  (Use Linux, or WSL instead of directly installing in Windows)
winget install charmbracelet.gum
scoop install charm-gum

For more installation methods , refer the GitHub repository of gum

3. timer

timer is an interactive alternative to the default sleep command in linux. It offers an interactive progress bar.

You can install it using brew as follows

brew install caarlos0/tap/timer

For other ways to install timer checkout it's Github Repo

Usage

Before stating to use aci , we need to install the cores required for the basic Arduino boards.

So , go to your terminal and the below commands

arduino-cli board listall
arduino-cli core install arduino:avr

To update the app

Using Homebrew

brew update && brew upgrade aci

By Cloning the latest repository

Delete the folder named arduino-cli-interactive from the computer and then

# From GitHub 
git clone https://github.com/Vaishnav-Sabari-Girish/arduino-cli-interactive.git

# From CodeBerg.org 
git clone https://codeberg.org/Vaishnav-Sabari-Girish/arduino-cli-interactive.git 


cd bash_shell_script
chmod +x main.sh 
./main.sh 

To Uninstall

brew uninstall aci 
brew untap vaishnav-sabari-girish/arduino-cli-interactive

Refer the below recording to see it in action

action

The below image gives me the basic repository details in the command line.

Tool used is onefetch

Repo deets

Another tool to give repository details is tokei

Repo deets 2

Features provided by aci

  • Select a board
  • Create a new Sketch
  • Edit the sketch
  • Compile Code
  • Upload Code for :
    • Old Bootloader
    • New Bootloader
  • Install 3rd Party Cores (For ESP8266 and ESP32)
  • Install Libraries
  • View Installed Libraries
  • Search , compile and upload the examples of the installed libraries
  • Basic Examples of beginner codes like Blink , print to serial monitor etc. (Expected in future releases).
  • Serial Monitor. (Expected in V1.0.3 or V1.0.4).
  • TL;DR to make it easier to use aci (Expected in future releases)
  • Create a release for Nushell and Fish (Expected in the future)
  • No need to install the dependencies separately. aci does it for you.

Legends

  • Features present
  • Features to be added

To access this repository in Github , click     Github

To access this repository in Codeberg.org, click     CodeBerg

To access this repository in Gitea, click     Gitea

Stargazers over Time

Stargazers over time