跳到正文
Skillpedia
API 与服务器(后端)102k · #855

ruview-cli-api

它能做什么

这个技能展示如何使用 RuView 的命令行工具、Web API 和浏览器版本。适合希望编写脚本调用它,或将其连接到其他软件的开发者。

适用场景

  • ✓当你想从脚本或终端运行 RuView 命令的时候。
  • ✓当另一个程序需要通过 HTTP 读取 RuView 数据的时候。
  • ✓当你想在网页浏览器中运行 RuView 的时候。

技能链接

https://github.com/ruvnet/RuView/blob/main/plugins/ruview/skills/ruview-cli-api/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/RuView/blob/main/plugins/ruview/skills/ruview-cli-api/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请告诉我如何在我的应用中调用 RuView API,以便读取最新的感知结果。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能列出命令行子命令及其选项,然后展示如何启动 API 服务,以及浏览器版本的位置。每个选项都附有简短说明和示例命令。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

RuView CLI, API & WASM

The programmatic surfaces of RuView — the wifi-densepose binary, the HTTP API, and the WebAssembly builds.

1. The wifi-densepose CLI binary (wifi-densepose-cli)

cd v2
cargo run -p wifi-densepose-cli -- --help        # or: cargo build -p wifi-densepose-cli --release  → target/release/wifi-densepose
cargo run -p wifi-densepose-cli -- version

Top-level subcommands: version, and mat (Mass Casualty Assessment Tool).

wifi-densepose mat … — disaster survivor detection

Subcommand Purpose Key flags
mat scan [zone] Start scanning for survivors --disaster-type <…>, --sensitivity 0.0–1.0, --max-depth <m>, --continuous, --interval <ms>, --simulate
mat status Current scan status --detailed, --format <…>, --watch
mat zones … Manage scan zones zones list [--active-only], plus add/remove/update
mat survivors List detected survivors with triage status
mat alerts View / manage alerts
mat export Export scan data JSON or CSV

Example:

cargo run -p wifi-densepose-cli -- mat scan rubble-A --disaster-type earthquake --sensitivity 0.7 --max-depth 5 --continuous --interval 2000
cargo run -p wifi-densepose-cli -- mat survivors --format json
cargo run -p wifi-densepose-cli -- mat export --format csv > survivors.csv

Use --simulate for testing without hardware. Background and user guide: docs/wifi-mat-user-guide.md, wifi-densepose-mat crate.

2. REST API (wifi-densepose-api, Axum)

Library crate (v2/crates/wifi-densepose-api/src/lib.rs) — the Axum router/handlers; configured via the wifi-densepose-config crate. It's wired into the server binaries (e.g. the sensing server / Docker image), not a standalone cargo run target by itself.

# Easiest way to exercise it: the Docker image exposes the API + dashboard on :3000
docker run -p 3000:3000 ruvnet/wifi-densepose:latest
# Then hit the HTTP endpoints (see the API module / docs for routes) and open http://localhost:3000

# v1 Python service config reference: example.env, pyproject.toml (archive/v1/)

When embedding the API crate in your own binary, take the router from wifi_densepose_api, supply config via wifi-densepose-config, and serve with Axum/Tokio. Keep input validation at the boundary (project rule).

3. WASM / browser & ESP32-WASM3

  • wifi-densepose-wasm — compiles the stack to wasm32-unknown-unknown with a JS-friendly API:
    cd v2/crates/wifi-densepose-wasm
    wasm-pack build --target web --features mat        # recommended (produces pkg/)
    cargo build --target wasm32-unknown-unknown --features mat   # plain cargo build
    
    See v2/crates/wifi-densepose-wasm/README.md for the exported surface.
  • wifi-densepose-wasm-edge — 60 edge modules (609 tests) that compile to wasm32-unknown-unknown and run on ESP32-S3 via WASM3; shared utils in src/vendor_common.rs. These are the ADR-041 edge-intelligence modules in WASM form.
  • Browser demos: pose-fusion (ADR-059), point-cloud (ADR-094) — deployed via GitHub Pages from the WASM build.

4. Where it fits

You want to… Use
Script a survivor scan / export results wifi-densepose mat …
Expose sensing over HTTP wifi-densepose-api (via a server binary / Docker)
Run sensing in a browser wifi-densepose-wasm → wasm-pack build --target web
Run an edge module on an ESP32 in WASM wifi-densepose-wasm-edge + WASM3
A long-running CSI sink + training wifi-densepose-sensing-server (see ruview-applications / ruview-model-training)

Reference

  • Crates: wifi-densepose-cli, wifi-densepose-api, wifi-densepose-config, wifi-densepose-wasm, wifi-densepose-wasm-edge, wifi-densepose-mat
  • ADRs: 041 (edge modules), 059 (live ESP32 pipeline), 094 (point-cloud GitHub Pages)
  • docs/wifi-mat-user-guide.md, docs/edge-modules/, docs/security-audit-wasm-edge-vendor.md
  • Validate after changes: cd v2 && cargo test -p wifi-densepose-cli -p wifi-densepose-api -p wifi-densepose-wasm --no-default-features
常见问题

mat 命令是什么?

它是命令行中的大规模伤亡评估部分,可以开始扫描、列出区域并导出数据。

它需要安装 Rust 吗?

示例通过 cargo 运行命令行,因此这些示例需要 Rust 工具链。

我可以导出扫描数据吗?

可以。该技能展示了一个导出子命令,可输出 JSON 或 CSV。

详情

作者的原始描述

Use the RuView `wifi-densepose` CLI binary (incl. MAT scan/status/zones/survivors/alerts/export subcommands), the REST API (`wifi-densepose-api`, Axum), and the browser/WASM build (`wifi-densepose-wasm`, `wifi-densepose-wasm-edge`). Use when integrating RuView into another program, scripting it from the shell, exposing it over HTTP, or shipping it to the browser / ESP32-WASM3.

repo: ruvnet/RuView

热度

GitHub 星标
102k
排名
#855
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能