/ README.md
README.md
1 <!-- START doctoc generated TOC please keep comment here to allow auto update --> 2 <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> 3 4 - [Documentation Links](#documentation-links) 5 - [Arduino Interactive CLI](#arduino-interactive-cli) 6 - [Before Installation.](#before-installation) 7 - [Testing the Tool (before install)](#testing-the-tool-before-install) 8 - [Installation](#installation) 9 - [Using Basher](#using-basher) 10 - [NOTE:](#note) 11 - [Via Homebrew](#via-homebrew) 12 - [From source](#from-source) 13 - [Pre-requisites](#pre-requisites) 14 - [1. `arduino-cli`](#1-arduino-cli) 15 - [Homebrew](#homebrew) 16 - [macOS/Linux](#macoslinux) 17 - [For windows users](#for-windows-users) 18 - [Installing `arduino-cli` using the installation script](#installing-arduino-cli-using-the-installation-script) 19 - [Using the Pre-built Binaries](#using-the-pre-built-binaries) 20 - [2. `gum`](#2-gum) 21 - [3. `timer`](#3-timer) 22 - [Usage](#usage) 23 - [To update the app](#to-update-the-app) 24 - [Using Homebrew](#using-homebrew) 25 - [By Cloning the latest repository](#by-cloning-the-latest-repository) 26 - [To Uninstall](#to-uninstall) 27 - [Features provided by `aci`](#features-provided-by-aci) 28 - [Legends](#legends) 29 - [Stargazers over Time](#stargazers-over-time) 30 31 <!-- END doctoc generated TOC please keep comment here to allow auto update --> 32 33  34 <br><br> 35 36 [](https://github.com/Vaishnav-Sabari-Girish/arduino-cli-interactive/releases/tag/v1.1.0) 37 38  39 40  41 42 43 [](https://github.com/Gcat101/Tui-shop) 44 45  46 47 # Documentation Links 48 49 1. [Github Pages](https://vaishnav-sabari-girish.github.io/arduino-cli-interactive/) 50 2. [Codeberg Pages](https://vaishnav-sabari-girish.codeberg.page/pages/intro.html) 51 52 My tool is also available on TerminalTrove.com if you’d like to check it out there. 53 54 [](https://terminaltrove.com/arduino-cli-interactive/) 55 56 # Arduino Interactive CLI 57 58 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. 59 60 ## Before Installation. 61 62 Before installing the tool, make sure you create a GitHub PAT (Personal Access Token), so that you can be notified when 63 the tool gets a new version. 64 65 You can create a PAT token [here](https://github.com/settings/tokens). Make sure you choose Tokens (Classic), and give repo 66 permissions for your token. 67 68 Once you have your PAT, copy it and save it as an Environment variables in your ~/.bashrc or ~/.zshrc file as follows : 69 70 ```bash 71 export ACI_GITHUB_TOKEN="<your PAT>" 72 ``` 73 74 Then source your file and then install `aci` 75 76 ## Testing the Tool (before install) 77 78 If you want to know how the tool works without installing it, copy and paste the below command : 79 80 ```bash 81 curl -sSL https://raw.githubusercontent.com/Vaishnav-Sabari-Girish/arduino-cli-interactive/refs/heads/main/bash_shell_script/main.sh | bash 82 ``` 83 84 ## Installation 85 86 #### Using Basher 87 88 This tool can also be installed using the package manager for bash scripts `basher` as follows 89 90 ```bash 91 basher install Vaishnav-Sabari-Girish/arduino-cli-interactive 92 ``` 93 94 To run it, in the terminal run `aci.sh` 95 96 ##### NOTE: 97 If you have installed it using basher, make sure you have installed `gum`, `timer`, `arduino-cli`, `homebrew` and also added `homebrew` to PATH 98 99 100 To upgrade the tool type 101 ```bash 102 basher uninstall Vaishnav-Sabari-Girish/arduino-cli-interactive 103 basher install Vaishnav-Sabari-Girish/arduino-cli-interactive 104 ``` 105 ``` 106 107 #### Via Homebrew 108 109 ```bash 110 brew install vaishnav-sabari-girish/arduino-cli-interactive/aci 111 ``` 112 113 #### From source 114 115 ```bash 116 117 # Cloning from GitHub 118 git clone https://github.com/Vaishnav-Sabari-Girish/arduino-cli-interactive.git 119 120 # Cloning from CodeBerg.org 121 git clone https://codeberg.org/Vaishnav-Sabari-Girish/arduino-cli-interactive.git 122 123 # Cloning from Radicle 124 ## Using git 125 git clone https://seed.radicle.garden/z2xtEKkr65SpfQZUQWgqVKSVkfbfw.git arduino-cli-interactive 126 ## Using Radicle CLI 127 rad clone rad:z2xtEKkr65SpfQZUQWgqVKSVkfbfw 128 129 130 cd bash_shell_script 131 chmod +x main.sh 132 ./main.sh 133 ``` 134 135 Then open your `~/.bashrc` or `~/.zshrc` file and add this alias 136 ```bash 137 alias aci="<path to the cloned repository>" 138 ``` 139 140 Then in the terminal type 141 ```bash 142 source ~/.bashrc # For bash users 143 source ~/.zshrc # For zsh users 144 ``` 145 146 ### Pre-requisites 147 148 If not installed, the script will do it on it's own. But just in case something doesn't install properly do the below. 149 150 #### 1. `arduino-cli` 151 152 There are many ways to install arduino-cli. I recommend Homebrew , because all the other prerequisite tools are also available on homebrew. 153 154 ##### Homebrew 155 156 In case you do not have Homebrew installed in your system 157 158 ##### macOS/Linux 159 160 `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` 161 162 ##### For windows users 163 164 Use Windows Subsystem for Linux (WSL) and follow the instructions for Linux. 165 166 To learn to use WSL , the best video is by [NetworkChuck](https://youtu.be/vxTW22y8zV8?si=mZ5w9KmT0A4_d7Zr) 167 168 <br> 169 170 After installing Homebrew , go to your terminal and just type this 171 172 ```bash 173 brew update 174 brew install arduino-cli 175 ``` 176 ##### Installing `arduino-cli` using the installation script 177 178 If you do not want to use homebrew , you can copy and paste this installation script 179 180 `curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh` 181 182 **NOTE** : This script is only for Linux/macOS/WSL users. 183 184 ##### Using the Pre-built Binaries 185 186 You can also install the prebuilt binaries for Windows found [here](https://arduino.github.io/arduino-cli/1.1/installation/#latest-release) 187 188 Check out the `arduino-cli` documentation [here](https://arduino.github.io/arduino-cli/1.1/getting-started/) 189 190 #### 2. `gum` 191 192 `gum` is a tool developed by the company [Charm](https://charm.sh/) . Check out their gitHub at [Charm's GitHub](https://github.com/charmbracelet) 193 194 It makes it easy to create good looking Terminal User Interface (TUI) 195 196 To install `gum` 197 198 ```bash 199 # macOS or Linux 200 brew install gum 201 202 # Arch Linux (btw) 203 pacman -S gum 204 205 # Nix 206 nix-env -iA nixpkgs.gum 207 208 # Flox 209 flox install gum 210 211 # Windows (via WinGet or Scoop) (Use Linux, or WSL instead of directly installing in Windows) 212 winget install charmbracelet.gum 213 scoop install charm-gum 214 ``` 215 216 For more installation methods , refer the [GitHub repository of `gum`](https://github.com/charmbracelet/gum) 217 218 #### 3. `timer` 219 220 `timer` is an interactive alternative to the default `sleep` command in linux. It offers an interactive progress bar. 221 222 You can install it using brew as follows 223 224 ```bash 225 brew install caarlos0/tap/timer 226 ``` 227 228 For other ways to install `timer` checkout it's [Github Repo](https://github.com/caarlos0/timer) 229 230 ## Usage 231 232 Before stating to use `aci` , we need to install the cores required for the basic Arduino boards. 233 234 So , go to your terminal and the below commands 235 236 ```bash 237 arduino-cli board listall 238 arduino-cli core install arduino:avr 239 ``` 240 241 ### To update the app 242 243 #### Using Homebrew 244 ```bash 245 brew update && brew upgrade aci 246 ``` 247 #### By Cloning the latest repository 248 Delete the folder named `arduino-cli-interactive` from the computer and then 249 250 ```bash 251 # From GitHub 252 git clone https://github.com/Vaishnav-Sabari-Girish/arduino-cli-interactive.git 253 254 # From CodeBerg.org 255 git clone https://codeberg.org/Vaishnav-Sabari-Girish/arduino-cli-interactive.git 256 257 # From Radicle 258 ## Using git 259 git clone https://seed.radicle.garden/z2xtEKkr65SpfQZUQWgqVKSVkfbfw.git arduino-cli-interactive 260 ## Using Radicle CLI 261 rad clone rad:z2xtEKkr65SpfQZUQWgqVKSVkfbfw 262 263 cd bash_shell_script 264 chmod +x main.sh 265 ./main.sh 266 ``` 267 268 ### To Uninstall 269 270 ```bash 271 brew uninstall aci 272 brew untap vaishnav-sabari-girish/arduino-cli-interactive 273 ``` 274 275 Refer the below recording to see it in action 276 277  278 279 280 The below image gives me the basic repository details in the command line. 281 282 Tool used is `onefetch` 283 284  285 286 Another tool to give repository details is `tokei` 287 288  289 290 291 292 ### Features provided by `aci` 293 294 295 - [x] Select a board 296 - [x] Create a new Sketch 297 - [x] Edit the sketch 298 - [x] Compile Code 299 - [x] Upload Code for : 300 - [x] Old Bootloader 301 - [x] New Bootloader 302 - [x] Install 3rd Party Cores (For ESP8266 and ESP32) 303 - [x] Install Libraries 304 - [x] View Install Libraries 305 - [x] Search , compile and upload the examples of the installed libraries 306 - [ ] Basic Examples of beginner codes like Blink , print to serial monitor etc. (Expected in future releases). 307 - [x] Serial Monitor. (Expected in V1.0.3 or V1.0.4). 308 - [ ] TL;DR to make it easier to use `aci` (Expected in future releases) 309 - [ ] Create a release fo Nushell and Fish (Expected in the future) 310 - [x] No need to install the dependacies seperately. `aci` does it for you. 311 312 --- 313 314 #### Legends 315 - [x] Features present 316 - [ ] Features to be added 317 318 To access this repository in Github , click [](https://github.com/Vaishnav-Sabari-Girish/arduino-cli-interactive.git) 319 320 To access this repository in Codeberg.org, click [](https://codeberg.org/Vaishnav-Sabari-Girish/arduino-cli-interactive.git) 321 322 To access this Repository in radicle , click [ ](https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z2xtEKkr65SpfQZUQWgqVKSVkfbfw) 323 324 To access this repository in Gitea, click [](https://gitea.com/Vaishnav-Sabari-Girish/arduino-cli-interactive.git) 325 326 327 # Stargazers over Time 328 329 [](https://starchart.cc/Vaishnav-Sabari-Girish/arduino-cli-interactive)