skills/okx/plugin-store/test-rust-cli

test-rust-cli

Installation
SKILL.md

Pre-flight Dependencies (auto-injected by Plugin Store CI)

Run once per session before first use. These checks ensure required tools are installed.

Install onchainos CLI + Skills (auto-injected)

# 1. Install onchainos CLI
onchainos --version 2>/dev/null || curl -fsSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | sh

# 2. Install onchainos skills (enables AI agent to use onchainos commands)
npx skills add okx/onchainos-skills --yes --global

# 3. Install plugin-store skills (enables plugin discovery and management)
npx skills add okx/plugin-store --skill plugin-store --yes --global

Install test-rust-cli binary (auto-injected)

if ! command -v test-rust-cli >/dev/null 2>&1; then
  OS=$(uname -s | tr A-Z a-z)
  ARCH=$(uname -m)
  case "${OS}_${ARCH}" in
    darwin_arm64)  TARGET="aarch64-apple-darwin" ;;
    darwin_x86_64) TARGET="x86_64-apple-darwin" ;;
    linux_x86_64)  TARGET="x86_64-unknown-linux-gnu" ;;
    linux_aarch64) TARGET="aarch64-unknown-linux-gnu" ;;
  esac
  curl -fsSL "https://github.com/okx/plugin-store/releases/download/plugins/test-rust-cli@1.0.0/test-rust-cli-${TARGET}" -o ~/.local/bin/test-rust-cli
  chmod +x ~/.local/bin/test-rust-cli
fi

Report install (auto-injected, runs once)

REPORT_FLAG="$HOME/.plugin-store/reported/test-rust-cli"
if [ ! -f "$REPORT_FLAG" ]; then
  mkdir -p "$HOME/.plugin-store/reported"
  # Generate device ID
  DEV_RAW="$(hostname):$(uname -s):$(uname -m):$HOME"
  DEV_ID=$(echo -n "$DEV_RAW" | shasum -a 256 | head -c 32)
  # Report to Vercel stats
  curl -s -X POST "https://plugin-store-dun.vercel.app/install" \
    -H "Content-Type: application/json" \
    -d '{"name":"test-rust-cli","version":"1.0.0"}' >/dev/null 2>&1 || true
  # Report to OKX API
  curl -s -X POST "https://www.okx.com/priapi/v1/wallet/plugins/download/report" \
    -H "Content-Type: application/json" \
    -d '{"pluginName":"test-rust-cli","divId":"'"$DEV_ID"'"}' >/dev/null 2>&1 || true
  touch "$REPORT_FLAG"
fi

Test Rust CLI

Overview

E2E test plugin with Rust CLI binary. Queries ETH price via OnchainOS.

Pre-flight Checks

  1. Install onchainos CLI: curl -sSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | sh
  2. Ensure test-rust-cli binary is installed

Commands

Query ETH Price via CLI

test-rust-cli --query eth-price

When to use: When user asks about ETH price. Output: Calls onchainos token price-info --address 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 --chain ethereum and formats the result.

Direct OnchainOS Query

onchainos token price-info --address 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 --chain ethereum

Error Handling

Error Cause Resolution
Binary not found CLI not installed Install via plugin-store
Command not found onchainos not installed Run pre-flight install
Weekly Installs
8
GitHub Stars
9
First Seen
Apr 5, 2026