github.com/robgonnella/ardi/v2@v2.4.5-0.20230102052001-11a49de978c3/README.md (about)

     1  ![V2](https://github.com/robgonnella/ardi/workflows/V2/badge.svg)
     2  [![codecov](https://codecov.io/gh/robgonnella/ardi/branch/main/graph/badge.svg?token=YMMFDIKX3A)](https://codecov.io/gh/robgonnella/ardi)
     3  
     4  # Ardi
     5  
     6  Ardi is a command-line tool for ardiuno that enables you to properly version and
     7  manage project builds, and provides tools to help facilitate the development
     8  process.
     9  
    10  Things ardi can fo for you:
    11  
    12  - Manage versioned platforms and libraries on a per-project basis
    13  - Store user defined build configurations with a mechanism for easily running
    14    consistent and repeatable builds.
    15  - Enable running your builds in a CI pipeline
    16  - Compile and upload to an auto discovered connected board
    17  - Watch a sketch for changes and auto recompile / reupload to a connected board
    18  - Print various info about platforms and boards
    19  - Search and print available libraries and versions
    20  
    21  Ardi should work for all boards and platforms supported by [arduino-cli].
    22  
    23  Use "ardi help [command]" for more information about a command.
    24  
    25  # Installation
    26  
    27  Ardi can be installed with golang's `go get` for versions of go >= 1.12
    28  
    29  ```bash
    30  ## go version >= 1.12
    31  
    32  # From outside of a module directory
    33  GO111MODULE=on go get github.com/robgonnella/ardi/v2@latest
    34  
    35  # From inside of a module directory
    36  go get github.com/robgonnella/ardi/v2@latest
    37  ```
    38  
    39  You can also download and install the pre-built binaries
    40  [here](https://github.com/robgonnella/ardi/releases)
    41  
    42  **Note: Linux users may need to add their user to the `dialout` group**
    43  ```
    44  sudo usermod -aG dialout $(whoami)
    45  ```
    46  
    47  # Usage
    48  
    49  Ardi requires certain packages to be downloaded before it can properly compile
    50  sketches, detect connected boards, and perform other tasks. These packages are
    51  stored in a project data directory to isolate version specific dependencies
    52  for multiple projects.
    53  
    54  To initialize an ardi project directory run:
    55  
    56  ```bash
    57  ardi project-init
    58  ```
    59  
    60  ## Storing Builds in ardi.json
    61  
    62  Ardi enables you to store custom build details in ardi.json which you can
    63  then easily run via the `ardi compile`, and `ardi upload`
    64  commands.
    65  
    66  To add a build either manually modify ardi.json or use `ardi add build`
    67  
    68  ```bash
    69  ardi add build \
    70  --name <name> \
    71  --sketch <path_to_sketch_or_directory> \
    72  --fqbn <fqbn> \
    73  --build-prop build.extra_flags="-DSOME_OPTION" \
    74  --build-prop compiler.cpp.extra_flags="-std=c++11"
    75  ```
    76  
    77  To run stored builds
    78  
    79  ```bash
    80  # Compile single build in ardi.json
    81  ardi compile <build_name>
    82  # Compile multiple builds in ardi.json
    83  ardi compile <build_name1> <build_name2> <build_name3>
    84  # Compile all builds in ardi.json
    85  ardi compile --all
    86  # Upload only (skips building/compiling)
    87  ardi upload <name>
    88  ```
    89  
    90  Documentation for all commands can be found in [docs directory][docs]
    91  
    92  [arduino-cli]: https://github.com/arduino/arduino-cli
    93  [docs]: ./v2/docs/ardi.md