Adventure Labs Logo
Scout Docs

CLI Usage

How to build and use the scout cli tool

Building the CLI

The CLI is built from source. Ensure you have Rust installed, then build the release binary:

cd scout_rs
cargo build --bin scout_cli --release

The binary will be available at target/release/scout_cli.

Environment Setup

Create a .env file in the scout_rs directory using the .env.example file as a template.

Running Commands

Download Artifacts

The download_artifacts command provides an interactive download portal shown below:

Artifact Download UI

Features

  1. Download Status: Each artifact shows whether it's already downloaded
  2. Filtering: Press 'f' to cycle through filter modes:
    • First press: Hide already downloaded files
    • Second press: Show only already downloaded files
    • Third press: Show all files
  3. Navigation: Use arrow keys (↑↓) to navigate through remote artifacts
  4. Selection: Press Space to select items
  5. Select All: Press 'a' to select all visible items
  6. Download: Press Enter to download selected artifacts
  7. Quit: Press 'q' or Esc to exit without downloading

Selected artifacts are downloaded to the specified output directory (defaults to current directory).

Available Commands

CommandDescriptionRequired Arguments
get_deviceGet device informationNone
get_herdGet herd informationNone
get_plans_by_herdGet plans for a herd--herd_id
get_plan_by_idGet a specific plan--plan_id, --herd_id
create_planCreate a new plan--plan_json, --herd_id
update_planUpdate a plan--plan_id, --plan_json, --herd_id
delete_planDelete a plan--plan_id, --herd_id
post_eventCreate an event--event_json, --tags_json, --file_path
update_eventUpdate an event--event_id, --event_json
delete_eventDelete an event--event_id
download_artifactsDownload artifacts with interactive UI(optional) --output-dir

Examples

# Get device information
./target/release/scout_cli --command get_device

# Download artifacts to current directory
./target/release/scout_cli --command download_artifacts

# Download artifacts to specific directory
./target/release/scout_cli --command download_artifacts --output-dir ~/Downloads/scout-artifacts

# Get plans for a herd
./target/release/scout_cli --command get_plans_by_herd --herd_id 10

On this page