# HODOE CLI - README
The official command-line interface tool for the HODOE network.
Web platform: https://hodoe.fr
HODOE CLI enables embedded systems developers and Doers to publish
and manage their compiled binaries (ESP32, STM32, RISC-V, RP2350,
ARM...) directly from their terminal to the HODOE hub.
Current version: v0.7.0
------------------------------------------------------------------------
0. WHAT'S NEW IN v0.7.0?
------------------------------------------------------------------------
- Cryptographic Integrity: Automatic local calculation of SHA-256 file
fingerprints during binary push to ensure absolute security and zero tampering.
------------------------------------------------------------------------
0. WHAT'S NEW IN v0.6.0?
------------------------------------------------------------------------
- Enhanced Security: HTTP standard Bearer Token authentication and strict
local configuration file permission hardening (chmod 600).
- File Robustness: Automatic file name sanitization to prevent any
path traversal vulnerability attempts.
- Enriched --help Support: Comprehensive description of the CLI role and
features directly accessible via `hodoe --help`.
- Secure Uploads: Robust handling of Presigned URLs and clear error
feedback during binary file publication.
------------------------------------------------------------------------
1. INSTALLATION
------------------------------------------------------------------------
Via Cargo (Recommended):
```bash
cargo install hodoe-cli
```
From the Git repository:
```bash
git clone https://github.com/jorgeandrecastro/hodoe-cli.git
cd hodoe-cli
cargo install --path .
```
------------------------------------------------------------------------
2. USAGE
------------------------------------------------------------------------
Step 1: Authentication
Retrieve your secure token or API key from your space on https://hodoe.fr
and authenticate your terminal:
```bash
hodoe login --token <YOUR_TOKEN>
```
(Your session credentials are safely stored in ~/.hodoe/config.json)
Step 2: Publishing a Binary
Navigate to your compiled project directory and execute:
```bash
hodoe binary <PROJECT_NAME> push --file <PATH> --arch <ARCHITECTURE>
```
Examples:
```bash
hodoe binary firmware_sensor push --file ./build/firmware.uf2 --arch rp2350
hodoe binary weather_station push --file ./target/release/app.bin --arch esp32 --github https://github.com/user/repo --description "IoT Weather Station"
```
------------------------------------------------------------------------
3. PUSH COMMAND OPTIONS
------------------------------------------------------------------------
-f, --file <PATH> Path to the binary file (.uf2, .bin, .hex, .elf) [Required]
-a, --arch <ARCH> Target architecture (esp32, stm32, rp2350, riscv, arm) [Required]
-c, --category <CAT> Binary category (e.g., embedded, security)
-g, --github <URL> (Optional) Link to the source GitHub repository
-d, --description <DESC> (Optional) Summary description of the firmware
------------------------------------------------------------------------
4. FEATURES & ARCHITECTURE
------------------------------------------------------------------------
- End-to-End Security: Utilization of pre-signed upload URLs (Presigned URLs)
and Bearer authentication headers, with no client-side private key storage.
- Optimized Upload: Direct and secure physical HTTP PUT transfer
to storage with real-time progress tracking (indicative).
- Minimal Memory Footprint (Zero-RAM overhead) thanks to the Rust ecosystem,
Tokio, and HTTP streaming.
- Atomic Registration: Instant and secure registration of binary metadata
on the HODOE API database, accessible via https://hodoe.fr.
- End-to-End Security: Utilization of pre-signed upload URLs (Presigned URLs),
Bearer authentication headers, and automatic SHA-256 cryptographic integrity hashing.
------------------------------------------------------------------------
5. LICENSE & AUTHOR
------------------------------------------------------------------------
License : GPL-2.0-or-later
Author : Jorge Andre Castro <georgeandrec@gmail.com>
Site : https://hodoe.fr
========================================================================