| Crates.io | clasp-cli |
| lib.rs | clasp-cli |
| version | 3.1.0 |
| created_at | 2026-01-16 05:03:31.728492+00 |
| updated_at | 2026-01-25 07:24:25.777338+00 |
| description | Command-line interface for CLASP protocol servers and bridges |
| homepage | https://clasp.to |
| repository | https://github.com/lumencanvas/clasp |
| max_upload_size | |
| id | 2047926 |
| size | 124,710 |
Command-line interface for CLASP protocol routers and connections.
cargo install clasp-cli
Or build from source:
git clone https://github.com/lumencanvas/clasp.git
cd clasp
cargo install --path crates/clasp-cli
Important: You need a CLASP router running before protocol connections can work.
# Start a CLASP router (required - central message hub)
clasp server --port 7330
# Start router with specific transport
clasp server --protocol websocket --bind 0.0.0.0 --port 7330
Note: These commands create protocol connections that connect to the CLASP router. Each connection translates bidirectionally between its protocol and CLASP.
# Start an OSC connection (listens for OSC, routes to CLASP router)
clasp osc --port 9000
# Start an MQTT connection (connects to broker, routes to CLASP router)
clasp mqtt --host localhost --port 1883 --topic "sensors/#"
# Start a WebSocket connection
clasp websocket --mode server --url 0.0.0.0:8080
# Start an HTTP REST API connection
clasp http --bind 0.0.0.0:3000
How it works:
External Protocol ←→ Protocol Connection ←→ CLASP Router ←→ Other Connections/Clients
For example, clasp osc --port 9000:
# Publish a value
clasp pub /lights/brightness 0.75
# Subscribe to an address pattern
clasp sub "/lights/**"
# Bridge OSC to MQTT
clasp bridge --source osc:0.0.0.0:9000 --target mqtt:localhost:1883
# Show current configuration
clasp info
# Start with config file
clasp server --config clasp.toml
| Flag | Description |
|---|---|
-v, --verbose |
Enable verbose logging |
--json |
Output in JSON format |
--config |
Path to configuration file |
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Maintained by LumenCanvas | 2026