### Setup Workflow Example (Bash) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md A step-by-step example of a complete setup workflow, including checking version, initializing configuration and database, starting the server, and verifying its status. Useful for new installations. ```bash wifi-densepose version wifi-densepose --help wifi-densepose config init wifi-densepose db init wifi-densepose start wifi-densepose status ``` -------------------------------- ### Development Setup for WiFi DensePose (Bash) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md Guides through the development setup for the WiFi DensePose project. It includes cloning the repository, creating and activating a virtual environment, installing dependencies, and setting up pre-commit hooks. ```bash # Clone the repository git clone https://github.com/ruvnet/wifi-densepose.git cd wifi-densepose # Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install development dependencies pip install -r requirements-dev.txt pip install -e . # Install pre-commit hooks pre-commit install ``` -------------------------------- ### Production Workflow Example (Bash) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md An example of a production workflow, showing how to start the server with a production configuration, check system status, manage the database (migrate, backup), and monitor tasks. Optimized for live environments. ```bash wifi-densepose -c production.yaml start wifi-densepose status wifi-densepose db migrate wifi-densepose db backup wifi-densepose tasks status ``` -------------------------------- ### Development Workflow Example (Bash) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md An example of a development workflow, demonstrating how to start the server with debug logging and custom configuration, and manage database and task statuses. Tailored for development environments. ```bash wifi-densepose --debug start wifi-densepose -c dev-config.yaml start wifi-densepose db status wifi-densepose tasks start wifi-densepose tasks list ``` -------------------------------- ### Bash: Manual Development Server Setup Source: https://github.com/ruvnet/wifi-densepose/blob/main/ui/README.md Provides commands for manually setting up the development environment. It includes starting the FastAPI backend and then starting a separate Python HTTP server for the UI. Offers alternative commands using 'npx'. ```bash # First, start your FastAPI backend (runs on port 8000) wifi-densepose start # or from the main project directory: python -m wifi_densepose.main # Then, start the UI server on a different port to avoid conflicts cd /workspaces/wifi-densepose/ui python -m http.server 3000 # or npx http-server . -p 3000 # Open the UI at http://localhost:3000 # The UI will automatically detect and connect to your backend ``` -------------------------------- ### Quick Setup with Claude Flow CLI Source: https://github.com/ruvnet/wifi-densepose/blob/main/CLAUDE.md This snippet provides the essential commands for a quick setup of the Claude Flow CLI and its associated MCP servers. It includes adding MCP servers, starting the daemon, and running the doctor command with the fix option for initial configuration. ```bash # Add MCP servers (auto-detects MCP mode when stdin is piped) claude mcp add claude-flow -- npx -y @claude-flow/cli@latest claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start # Optional claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start # Optional # Start daemon npx @claude-flow/cli@latest daemon start # Run doctor npx @claude-flow/cli@latest doctor --fix ``` -------------------------------- ### Install Rust and Dependencies for WiFi-Mat Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md Installs the Rust toolchain and necessary system dependencies for building WiFi-Mat on Ubuntu/Debian systems. Requires cURL for Rust installation and apt-get for system packages. ```bash # Rust toolchain (1.70+) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Required system dependencies (Ubuntu/Debian) sudo apt-get install -y build-essential pkg-config libssl-dev ``` -------------------------------- ### Basic WiFi-DensePose System Setup and Start (Python) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md Demonstrates the basic Python API for initializing and starting the WiFi-DensePose system. It shows how to create an instance, begin pose estimation, retrieve the latest pose data, and stop the system. ```python from wifi_densepose import WiFiDensePose # Initialize with default configuration system = WiFiDensePose() # Start pose estimation system.start() # Get latest pose data poses = system.get_latest_poses() print(f"Detected {len(poses)} persons") # Stop the system system.stop() ``` -------------------------------- ### WiFi-DensePose CLI Server Management Commands Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md Provides examples of common server management commands for the WiFi-DensePose CLI. This includes starting, stopping, checking status, and displaying version information, with options for custom configurations and logging levels. ```bash # Start the WiFi-DensePose API server wifi-densepose start # Start with custom configuration wifi-densepose -c /path/to/config.yaml start # Start with verbose logging wifi-densepose -v start # Start with debug mode wifi-densepose --debug start # Check server status wifi-densepose status # Stop the server wifi-densepose stop # Show version information wifi-densepose version ``` -------------------------------- ### Basic Disaster Response Initialization and Scanning (Rust) Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md This example demonstrates how to initialize and configure the DisasterResponse system for earthquake scenarios. It includes setting up disaster type, sensitivity, and monitoring parameters, defining scan zones with specific bounds, and initiating the scanning process to detect potential survivors. ```rust use wifi_densepose_mat::{ DisasterResponse, DisasterConfig, DisasterType, ScanZone, ZoneBounds, }; #[tokio::main] async fn main() -> anyhow::Result<()> { // Configure for earthquake response let config = DisasterConfig::builder() .disaster_type(DisasterType::Earthquake) .sensitivity(0.85) .confidence_threshold(0.5) .max_depth(5.0) .continuous_monitoring(true) .build(); // Initialize the response system let mut response = DisasterResponse::new(config); // Initialize the disaster event let location = geo::Point::new(-122.4194, 37.7749); // San Francisco response.initialize_event(location, "Building collapse - Market Street")?; // Define scan zones let zone_a = ScanZone::new( "North Wing - Ground Floor", ZoneBounds::rectangle(0.0, 0.0, 30.0, 20.0), ); response.add_zone(zone_a)?; let zone_b = ScanZone::new( "South Wing - Basement", ZoneBounds::rectangle(30.0, 0.0, 60.0, 20.0), ); response.add_zone(zone_b)?; // Start scanning println!("Starting survivor detection scan..."); response.start_scanning().await?; // Get detected survivors let survivors = response.survivors(); println!("Detected {} potential survivors", survivors.len()); // Get immediate priority survivors let immediate = response.survivors_by_triage(TriageStatus::Immediate); println!("{} survivors require immediate rescue", immediate.len()); Ok(()) } ``` -------------------------------- ### Initialize and Deploy Disaster Response System (Rust) Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md Initializes a disaster response system and adds zones to it. This code snippet demonstrates the setup process before scanning begins, requiring a configuration object and a list of zones. It returns a Result, indicating potential errors during initialization. ```rust let mut response = DisasterResponse::new(config); response.initialize_event(location, description)?; for zone in zones { response.add_zone(zone)?; } ``` -------------------------------- ### Python SDK Quick Example Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md A concise example demonstrating how to use the WiFi-DensePose Python SDK to interact with the API, specifically for retrieving latest poses. ```APIDOC ## Python SDK Quick Example ### Description Example of using the WiFi-DensePose Python SDK to fetch the latest poses. ### Language Python ### Code Example ```python from wifi_densepose import WiFiDensePoseClient # Initialize client with the base URL of the API server client = WiFiDensePoseClient(base_url="http://localhost:8000") try { # Get latest poses, filtering by a minimum confidence score poses = client.get_latest_poses(min_confidence=0.7) print(f"Detected {len(poses)} persons with confidence above 0.7") # You can further process the 'poses' list here for pose in poses: print(f"- Person ID: {pose['person_id']}, Confidence: {pose['confidence']}") } catch (error) { console.error("An error occurred:", error) } ``` ### Prerequisites - Ensure the `wifi-densepose` Python library is installed (`pip install wifi-densepose`). - The WiFi-DensePose server must be running and accessible at `http://localhost:8000`. ``` -------------------------------- ### Python SDK Quick Example (Python) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md A concise example demonstrating how to use the WiFiDensePoseClient from the Python SDK to retrieve the latest pose data with confidence filtering. Shows basic client initialization and data fetching. ```python from wifi_densepose import WiFiDensePoseClient client = WiFiDensePoseClient(base_url="http://localhost:8000") poses = client.get_latest_poses(min_confidence=0.7) print(f"Detected {len(poses)} persons") ``` -------------------------------- ### CI Workflow: Test Suite Setup and Execution Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md This GitHub Actions workflow automates the testing of the wifi-densepose project. It checks out the code, sets up Python, installs dependencies, runs pytest for code coverage, and uploads the results to Codecov. It triggers on push and pull request events. ```yaml name: Test Suite on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install dependencies run: | pip install -r requirements.txt pip install -e . - name: Run tests run: pytest --cov=wifi_densepose --cov-report=xml - name: Upload coverage uses: codecov/codecov-action@v1 ``` -------------------------------- ### Start Development Server (Backend) Source: https://github.com/ruvnet/wifi-densepose/blob/main/claude.md Commands to start a development server for Node.js, Python, Go, and Rust projects. ```bash # Start development server (adapt to your framework) npm run dev # Node.js python -m myapp.server # Python go run main.go # Go cargo run # Rust ``` -------------------------------- ### Install Dependencies (Frontend) Source: https://github.com/ruvnet/wifi-densepose/blob/main/claude.md Commands to install frontend dependencies using npm, yarn, and pnpm. ```bash # Install dependencies npm install # Most frontend projects yarn install # Yarn projects pnpm install # PNPM projects ``` -------------------------------- ### Install WiFi-DensePose from Source Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md Installs WiFi-DensePose by cloning the repository from GitHub and installing dependencies. This method is useful for development or when needing the latest unreleased features. ```bash git clone https://github.com/ruvnet/wifi-densepose.git cd wifi-densepose pip install -r requirements.txt pip install -e . ``` -------------------------------- ### Configure Sensors for 30x20m Zone (Rust) Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md Defines an example sensor configuration for a 30x20 meter zone using Rust. It includes sensor ID, position (x, y, z), type, and operational status. This setup is crucial for initial system deployment. ```rust let sensors = vec![ SensorPosition { id: "S1".into(), x: 0.0, y: 0.0, z: 2.0, sensor_type: SensorType::Transceiver, is_operational: true, }, SensorPosition { id: "S2".into(), x: 30.0, y: 0.0, z: 2.0, sensor_type: SensorType::Transceiver, is_operational: true, }, SensorPosition { id: "S3".into(), x: 0.0, y: 20.0, z: 2.0, sensor_type: SensorType::Transceiver, is_operational: true, }, SensorPosition { id: "S4".into(), x: 30.0, y: 20.0, z: 2.0, sensor_type: SensorType::Transceiver, is_operational: true, }, ]; ``` -------------------------------- ### Bash: Development Server Startup Script Source: https://github.com/ruvnet/wifi-densepose/blob/main/ui/README.md A simple bash script to navigate to the UI directory and start the UI development server. This is one of the options for initiating the development environment. ```bash cd /workspaces/wifi-densepose/ui ./start-ui.sh ``` -------------------------------- ### Build WiFi-Mat from Source using Cargo Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md Clones the WiFi-DensePose repository and builds the WiFi-Mat Rust crate using Cargo. Includes commands for building in release mode, running tests, and building with all features enabled. ```bash # Clone the repository git clone https://github.com/ruvnet/wifi-densepose.git cd wifi-densepose/rust-port/wifi-densepose-rs # Build the wifi-mat crate cargo build --release --package wifi-densepose-mat # Run tests cargo test --package wifi-densepose-mat # Build with all features cargo build --release --package wifi-densepose-mat --all-features ``` -------------------------------- ### claude-sparc.sh: Frontend-only Development Example Source: https://github.com/ruvnet/wifi-densepose/blob/main/claude.md This example illustrates a frontend-only development setup with a custom test coverage target. It sets the development mode, specifies the desired coverage percentage, and provides the project name and UI specification path. ```bash ./claude-sparc.sh --mode frontend-only --coverage 90 web-app ui-spec.md ``` -------------------------------- ### Initialize Application and Check Backend Status (JavaScript) Source: https://github.com/ruvnet/wifi-densepose/blob/main/ui/tests/integration-test.html Listens for the DOMContentLoaded event to execute initialization logic. It first checks the backend status and then initializes the WiFiDensePoseApp if it doesn't already exist. This code assumes the existence of an async function `checkBackendStatus` and a class `WiFiDensePoseApp`. ```javascript document.addEventListener('DOMContentLoaded', async () => { await checkBackendStatus(); if (!window.app) { window.app = new WiFiDensePoseApp(); await window.app.init(); } }); ``` -------------------------------- ### Triage Classification API Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md Classifies individuals based on the START protocol using vital signs and provides detailed reasoning. ```APIDOC ## Triage Classification ### Automatic Triage #### Description Calculates triage status (Immediate, Delayed, Minor, Deceased, Unknown) based on provided vital signs, following the START protocol. ### Method Not applicable (Code example provided) ### Endpoint Not applicable (Code example provided) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```rust use wifi_densepose_mat::domain::triage::{TriageCalculator, TriageStatus}; let calculator = TriageCalculator::new(); let vital_signs = VitalSignsReading { breathing: Some(BreathingPattern { rate_bpm: 24.0, pattern_type: BreathingType::Shallow, .. }), heartbeat: Some(HeartbeatSignature { rate_bpm: 110.0, .. }), movement: MovementProfile { movement_type: MovementType::Fine, .. }, .. }; let triage = calculator.calculate(&vital_signs); match triage { TriageStatus::Immediate => println!("⚠️ IMMEDIATE - Rescue NOW"), TriageStatus::Delayed => println!("🟡 DELAYED - Stable for now"), TriageStatus::Minor => println!("🟢 MINOR - Walking wounded"), TriageStatus::Deceased => println!("⬛ DECEASED - No vital signs"), TriageStatus::Unknown => println!("❓ UNKNOWN - Insufficient data"), } ``` ### Response #### Success Response (200) - **status** (TriageStatus) - The calculated triage status. #### Response Example ```json { "status": "Immediate" } ``` ### Triage Factors #### Description Calculates triage status and provides detailed contributing factors and confidence level. ### Method Not applicable (Code example provided) ### Endpoint Not applicable (Code example provided) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```rust // Access detailed triage reasoning let factors = calculator.calculate_with_factors(&vital_signs); println!("Triage: {:?}", factors.status); println!("Contributing factors:"); for factor in &factors.contributing_factors { println!(" - {} (weight: {:.2})", factor.description, factor.weight); } println!("Confidence: {:.2}", factors.confidence); ``` ### Response #### Success Response (200) - **status** (TriageStatus) - The calculated triage status. - **contributing_factors** (array) - An array of objects detailing factors influencing the triage decision. - **description** (string) - Description of the factor. - **weight** (f32) - Weight of the factor in the decision. - **confidence** (f32) - Confidence level of the triage calculation. #### Response Example ```json { "status": "Immediate", "contributing_factors": [ { "description": "Breathing rate below 10 or above 29", "weight": 0.7 }, { "description": "No radial pulse", "weight": 0.5 } ], "confidence": 0.95 } ``` ``` -------------------------------- ### Basic HTML Setup for WiFi DensePose UI Source: https://github.com/ruvnet/wifi-densepose/blob/main/ui/README.md This snippet shows the basic HTML structure required to integrate the WiFi DensePose UI. It includes linking the main CSS file and the application's JavaScript entry point, ensuring modular components are loaded correctly. ```html
``` -------------------------------- ### Start WiFi-DensePose API Server using CLI Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md Starts the WiFi-DensePose API server using the command-line interface. Shows options for specifying a custom configuration file, enabling verbose logging, and enabling debug mode. ```bash # Start the API server wifi-densepose start # Start with custom configuration wifi-densepose -c /path/to/config.yaml start # Start with verbose logging wifi-densepose -v start # Start with debug mode wifi-densepose --debug start ``` -------------------------------- ### Minimal Breathing Detection Example (Rust) Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md This Rust code snippet shows a minimal example of detecting breathing using the WiFi DensePose library. It initializes a BreathingDetector with default configurations and uses it to process CSI amplitudes and sample rate to identify breathing patterns and confidence levels. ```rust use wifi_densepose_mat::detection::{ BreathingDetector, BreathingDetectorConfig, DetectionPipeline, DetectionConfig, }; fn detect_breathing(csi_amplitudes: &[f64], sample_rate: f64) { let config = BreathingDetectorConfig::default(); let detector = BreathingDetector::new(config); if let Some(breathing) = detector.detect(csi_amplitudes, sample_rate) { println!("Breathing detected!"); println!(" Rate: {:.1} BPM", breathing.rate_bpm); println!(" Pattern: {:?}", breathing.pattern_type); println!(" Confidence: {:.2}", breathing.confidence); } else { println!("No breathing detected"); } } ``` -------------------------------- ### Get Triage Factors with WiFi-DensePose Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md Retrieves detailed reasoning behind the calculated triage status, including contributing factors and confidence levels. Requires a VitalSignsReading object. ```rust // Access detailed triage reasoning let factors = calculator.calculate_with_factors(&vital_signs); println!("Triage: {:?}", factors.status); println!("Contributing factors:"); for factor in &factors.contributing_factors { println!(" - {} (weight: {:.2})", factor.description, factor.weight); } println!("Confidence: {:.2}", factors.confidence); ``` -------------------------------- ### Initialize Swarm (Bash) Source: https://github.com/ruvnet/wifi-densepose/blob/main/CLAUDE.md Initializes a new swarm with a specified topology. This is a foundational command for setting up distributed agent coordination. ```bash npx @claude-flow/cli@latest swarm init --topology ``` -------------------------------- ### Calculate Triage Status with WiFi-DensePose Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md Calculates triage status based on vital signs according to the START protocol. Outputs Immediate, Delayed, Minor, Deceased, or Unknown status. Requires a VitalSignsReading object. ```rust use wifi_densepose_mat::domain::triage::{TriageCalculator, TriageStatus}; let calculator = TriageCalculator::new(); // Calculate triage based on vital signs let vital_signs = VitalSignsReading { breathing: Some(BreathingPattern { rate_bpm: 24.0, pattern_type: BreathingType::Shallow, .. }), heartbeat: Some(HeartbeatSignature { rate_bpm: 110.0, .. }), movement: MovementProfile { movement_type: MovementType::Fine, .. }, .. }; let triage = calculator.calculate(&vital_signs); match triage { TriageStatus::Immediate => println!("⚠️ IMMEDIATE - Rescue NOW"), TriageStatus::Delayed => println!("🟡 DELAYED - Stable for now"), TriageStatus::Minor => println!("🟢 MINOR - Walking wounded"), TriageStatus::Deceased => println!("⬛ DECEASED - No vital signs"), TriageStatus::Unknown => println!("❓ UNKNOWN - Insufficient data"), } ``` -------------------------------- ### Start System API Source: https://github.com/ruvnet/wifi-densepose/blob/main/plans/phase1-specification/api-spec.md Initiates the pose estimation system, allowing for configuration of the operational domain and environment. ```APIDOC ## POST /system/start ### Description Start the pose estimation system. ### Method POST ### Endpoint /system/start ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **configuration** (object) - Required - Configuration for the system startup. - **domain** (string) - Required - The operational domain (e.g., 'healthcare'). - **environment_id** (string) - Required - Identifier for the environment. - **calibration_required** (boolean) - Required - Whether calibration is needed before starting. ### Request Example ```json { "configuration": { "domain": "healthcare", "environment_id": "room_001", "calibration_required": true } } ``` ### Response #### Success Response (200) - **status** (string) - The current status of the system startup process. - **estimated_ready_time** (string) - Estimated time when the system will be fully ready. - **initialization_steps** (array) - A list of initialization steps and their statuses. - **step** (string) - Name of the initialization step. - **status** (string) - Status of the step (e.g., 'in_progress', 'pending', 'completed'). - **progress** (number) - Progress of the step as a percentage. #### Response Example ```json { "status": "starting", "estimated_ready_time": "2025-01-07T04:47:00Z", "initialization_steps": [ { "step": "hardware_initialization", "status": "in_progress", "progress": 0.3 }, { "step": "model_loading", "status": "pending", "progress": 0.0 } ] } ``` ``` -------------------------------- ### Initialize Project Structure and Environment (Bash) Source: https://github.com/ruvnet/wifi-densepose/blob/main/claude.md These Bash commands are used for the initial setup of the project structure, development environment, and CI/CD pipeline configuration. They are foundational steps for backend development. ```bash # Bash: Initialize project structure # Bash: Setup development environment # Bash: Configure CI/CD pipeline ``` -------------------------------- ### Start Scanning Process (Rust) Source: https://github.com/ruvnet/wifi-densepose/blob/main/docs/wifi-mat-user-guide.md Initiates the scanning process for the disaster response system. This is an asynchronous operation, indicated by `.await?`, suggesting it might involve network communication or intensive processing. It's the final step before continuous data collection. ```rust response.start_scanning().await?; ``` -------------------------------- ### Initialize Project with CLI Source: https://github.com/ruvnet/wifi-densepose/blob/main/CLAUDE.md Initializes a new project using the Claude Flow CLI with an interactive wizard. This command sets up the necessary configuration and structure for a new project. ```bash npx @claude-flow/cli@latest init --wizard ``` -------------------------------- ### JavaScript: Authentication Setup with API Service Source: https://github.com/ruvnet/wifi-densepose/blob/main/ui/README.md Shows how to configure authentication for the API service. This includes setting an authentication token and adding request interceptors to modify outgoing requests. Requires 'api.service.js'. ```javascript import { apiService } from './services/api.service.js'; // Set authentication token apiService.setAuthToken('your-jwt-token'); // Add request interceptor for auth apiService.addRequestInterceptor((url, options) => { // Modify request before sending return { url, options }; }); ``` -------------------------------- ### Start System (API) Source: https://github.com/ruvnet/wifi-densepose/blob/main/plans/phase1-specification/api-spec.md Initiates the pose estimation system with specified configuration parameters. Requires a Bearer token for authentication. Returns the system status and estimated ready time. ```json { "configuration": { "domain": "healthcare", "environment_id": "room_001", "calibration_required": true } } ``` -------------------------------- ### Initialize and Scan for Survivors with WiFi-Mat (Rust) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md This Rust code snippet illustrates the usage of the WiFi-Mat module for disaster response. It shows how to configure the disaster response system, initialize an event, define scanning zones, and start the scanning process. The example also demonstrates how to retrieve identified survivors, prioritized by their triage status. ```rust use wifi_densepose_mat::{DisasterResponse, DisasterConfig, DisasterType, ScanZone, ZoneBounds}; let config = DisasterConfig::builder() .disaster_type(DisasterType::Earthquake) .sensitivity(0.85) .max_depth(5.0) .build(); let mut response = DisasterResponse::new(config); response.initialize_event(location, "Building collapse")?; response.add_zone(ScanZone::new("North Wing", ZoneBounds::rectangle(0.0, 0.0, 30.0, 20.0)))?; response.start_scanning().await?; // Get survivors prioritized by triage status let immediate = response.survivors_by_triage(TriageStatus::Immediate); println!("{} survivors require immediate rescue", immediate.len()); ``` -------------------------------- ### General CLI Help and Options (Bash) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md Demonstrates how to access help information for the main command and specific subcommands, as well as how to use global options like verbose (-v), debug (--debug), and custom configuration (-c). ```bash wifi-densepose --help wifi-densepose start --help wifi-densepose config --help wifi-densepose db --help wifi-densepose -v status wifi-densepose --debug start wifi-densepose -c custom.yaml start ``` -------------------------------- ### Install WiFi-DensePose using pip Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md Installs the WiFi-DensePose package using pip, the Python package installer. Supports installing the latest stable version, a specific version, or versions with optional dependencies like GPU acceleration or development tools. ```bash # Install the latest stable version pip install wifi-densepose # Install with specific version pip install wifi-densepose==1.0.0 # Install with optional dependencies pip install wifi-densepose[gpu] # For GPU acceleration pip install wifi-densepose[dev] # For development pip install wifi-densepose[all] # All optional dependencies ``` -------------------------------- ### Verify WiFi-DensePose CLI Installation Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md Verifies that the WiFi-DensePose command-line interface (CLI) has been installed correctly. This is typically done after installing the package via pip. ```bash # Install WiFi DensePose with CLI pip install wifi-densepose # Verify CLI installation wifi-densepose --help wifi-densepose version ``` -------------------------------- ### Troubleshooting Workflow Example (Bash) Source: https://github.com/ruvnet/wifi-densepose/blob/main/README.md A workflow for troubleshooting common issues, including enabling verbose logging, validating configuration, checking database health, and restarting services. Aids in diagnosing and resolving problems. ```bash wifi-densepose -v status wifi-densepose config validate wifi-densepose db status wifi-densepose stop wifi-densepose start ```