|
| 1 | +# SmartClaws |
| 2 | + |
| 3 | +Publish and read IoT sensor data on the [SKALE](https://skale.space) blockchain. SmartClaws provides a CLI, SDK, smart contracts, and OpenClaw agent skills for end-to-end IoT data pipelines. |
| 4 | + |
| 5 | +## Packages |
| 6 | + |
| 7 | +| Package | Path | Description | |
| 8 | +|---------|------|-------------| |
| 9 | +| `@smartclaws/cli` | `packages/cli` | CLI tool for init, publish, read, device management | |
| 10 | +| `@smartclaws/core` | `packages/core` | Shared types, envelope encoding, network config | |
| 11 | +| `@smartclaws/dashboard` | `packages/dashboard` | Web dashboard for monitoring sensors | |
| 12 | +| `@skalenetwork/smartclaws-contracts` | `smart-contracts` | Solidity contracts (channel, device group, agent) | |
| 13 | +| `smartclaws` (Python) | `python` | Python SDK and CLI | |
| 14 | + |
| 15 | +## Skills |
| 16 | + |
| 17 | +| Skill | Path | Description | |
| 18 | +|-------|------|-------------| |
| 19 | +| `smartclaws-producer` | `skills/smartclaws-producer` | Set up sensors and publish data on-chain | |
| 20 | +| `smartclaws-reader` | `skills/smartclaws-reader` | Read and analyze on-chain sensor data | |
| 21 | + |
| 22 | +## Quick Start |
| 23 | + |
| 24 | +```bash |
| 25 | +# Install the CLI |
| 26 | +PLATFORM="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/aarch64/arm64/')" |
| 27 | +curl -fL -o /usr/local/bin/smartclaws \ |
| 28 | + "https://github.com/skalenetwork/smartclaws/releases/latest/download/smartclaws-${PLATFORM}" |
| 29 | +chmod +x /usr/local/bin/smartclaws |
| 30 | + |
| 31 | +# Initialize |
| 32 | +smartclaws init |
| 33 | +smartclaws wallet info |
| 34 | +# Fund the wallet with sFUEL, then: |
| 35 | +smartclaws register |
| 36 | +smartclaws device register --name temp-sensor |
| 37 | + |
| 38 | +# Publish |
| 39 | +smartclaws publish --device temp-sensor --topic temperature --data '{"temp": 22.5}' |
| 40 | + |
| 41 | +# Read |
| 42 | +smartclaws read --device temp-sensor --limit 5 |
| 43 | +``` |
| 44 | + |
| 45 | +## Installing Skills (from source) |
| 46 | + |
| 47 | +```bash |
| 48 | +git clone https://github.com/skalenetwork/smartclaws.git |
| 49 | +cd smartclaws |
| 50 | + |
| 51 | +# Copy skills into your OpenClaw workspace |
| 52 | +cp -r skills/smartclaws-producer ~/.openclaw/skills/ |
| 53 | +cp -r skills/smartclaws-reader ~/.openclaw/skills/ |
| 54 | +``` |
| 55 | + |
| 56 | +Skills are plain directories containing a `SKILL.md` file. Place them in `~/.openclaw/skills/` and they'll be discovered on the next agent session. |
| 57 | + |
| 58 | +## Publishing Skills to ClawHub |
| 59 | + |
| 60 | +To publish or update skills on [ClawHub](https://clawhub.ai), use the `openclaw` CLI: |
| 61 | + |
| 62 | +### First-time setup |
| 63 | + |
| 64 | +```bash |
| 65 | +# Authenticate with ClawHub |
| 66 | +openclaw auth login |
| 67 | +``` |
| 68 | + |
| 69 | +### Publish a skill |
| 70 | + |
| 71 | +```bash |
| 72 | +# From the repo root — publish each skill directory |
| 73 | +openclaw skill publish skills/smartclaws-producer |
| 74 | +openclaw skill publish skills/smartclaws-reader |
| 75 | +``` |
| 76 | + |
| 77 | +This reads the `SKILL.md` frontmatter (`name`, `description`, `metadata`) and uploads the skill to ClawHub under your account. |
| 78 | + |
| 79 | +### Update an existing skill |
| 80 | + |
| 81 | +```bash |
| 82 | +# Bump the version or edit the SKILL.md, then re-publish |
| 83 | +openclaw skill publish skills/smartclaws-producer |
| 84 | +``` |
| 85 | + |
| 86 | +Re-publishing an existing skill name updates it in-place on ClawHub. |
| 87 | + |
| 88 | +### Verify the listing |
| 89 | + |
| 90 | +```bash |
| 91 | +# Check that your skills are live |
| 92 | +openclaw skill info smartclaws-producer |
| 93 | +openclaw skill info smartclaws-reader |
| 94 | +``` |
| 95 | + |
| 96 | +Or browse directly at: |
| 97 | +- https://clawhub.ai/skills/smartclaws-producer |
| 98 | +- https://clawhub.ai/skills/smartclaws-reader |
| 99 | + |
| 100 | +### Install from ClawHub (for users) |
| 101 | + |
| 102 | +```bash |
| 103 | +openclaw skill install smartclaws-producer |
| 104 | +openclaw skill install smartclaws-reader |
| 105 | +``` |
| 106 | + |
| 107 | +This downloads the skill into `~/.openclaw/skills/` automatically. |
| 108 | + |
| 109 | +## Development |
| 110 | + |
| 111 | +```bash |
| 112 | +# Install dependencies |
| 113 | +bun install |
| 114 | + |
| 115 | +# Build CLI |
| 116 | +cd packages/cli && bun run build |
| 117 | + |
| 118 | +# Run smart contract tests |
| 119 | +cd smart-contracts && bun run test |
| 120 | + |
| 121 | +# Python SDK |
| 122 | +cd python && pip install -e . |
| 123 | +``` |
| 124 | + |
| 125 | +## License |
| 126 | + |
| 127 | +LGPL-3.0-or-later |
0 commit comments