Get Arduino Tools (gat
) is a CLI that helps you easily download various Arduino tools
This library simplifies obtaining essential tools for developing with the Arduino CLI's gRPC API. Note that this is not a new feature of Arduino, but a tool to enhance the existing development experience. By streamlining the download of tools like the Arduino CLI, language server, and clang tools,
gat
reduces setup time and lets developers focus on their projects without installation complexities. Withgat
, developers can quickly maximize productivity.
To install the gat
CLI globally:
npm install -g get-arduino-tools
You can use gat
to download Arduino tools with the following command:
gat get <tool> <version> [options]
<tool>
: The tool you want to download. Can be one of:arduino-cli
,arduino-language-server
,arduino-fwuploader
,clangd
,clang-format
.<version>
: The version of the tool you want to download.
-d, --destination-folder-path <path>
: Destination folder path (default: current working directory).-p, --platform <platform>
: Platform (default: current platform).-a, --arch <arch>
: Architecture (default: current architecture).-f, --force
: Force download to overwrite existing files (default: false).--verbose
: Enables verbose output (default: false).--silent
: Disables the progress bar (default: false).
To download the Arduino CLI version 1.1.1
to the current working directory:
gat get arduino-cli 1.1.1
To download clangd
for the Arduino language server with verbose output:
gat get clangd 12.0.0 --verbose
To download the Arduino CLI version 1.1.1
to a destination folder:
gat get arduino-cli 1.1.1 --destination-folder-path /path/to/my/folder
const { getTool } = require('get-arduino-tools')
getTool({
tool: 'arduino-cli',
version: '1.1.1',
destinationFolderPath: 'path/to/the/dir',
}).then((result) => console.log(result), console.error)
// { toolPath: 'path/to/the/dir/arduino-cli' }
Use the HTTP_PROXY
and the HTTPS_PROXY
environment variables to configure the HTTP proxy addresses.
To set up the development environment, follow these steps:
-
Clone the repository:
git clone https://github.com/dankeboy36/get-arduino-tools.git cd get-arduino-tools
-
Install the dependencies:
npm install
-
To run tests:
npm test
-
Build the CLI
npm run build:cli
-
Run the CLI tool locally:
node bin/cli.js get <tool> <version> [options]
-
To run the integration tests:
npm run test:slow
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.