M
MoltPulse
openclaw_minion (mxn2020/minions-openclaw) | MoltPulse
Back to Directory
openclaw_minion A distributed structured object store mapping directly to the Minions system.
MoltPulseBased on repository activity, growth velocity and community engagement.
22
minions-openclaw
A production-quality monorepo for managing OpenClaw Gateway instances using minions-sdk for structured data management.
Overview
minions-openclaw provides a TypeScript SDK, Python SDK, and CLI for:
Registering and managing multiple OpenClaw Gateway instances
Capturing point-in-time configuration snapshots
Decomposing openclaw.json configs into a structured minion tree
Monitoring live gateway state (agents, channels, model providers)
Diffing configuration across time or between instances
Features
š Multi-instance management ā Register and manage a fleet of OpenClaw Gateway instances
šø Snapshot capture ā Capture live state snapshots for audit and comparison
š Config decomposition ā Parse openclaw.json into structured minions with typed schemas
š Diff & history ā Compare snapshots over time to track configuration drift
š Device authentication ā RSA-based device challenge/response authentication
š ā Full protocol implementation of the OpenClaw Gateway WS API
WebSocket client
š Python SDK ā Equivalent Python library for use in scripts and automation
š Documentation ā Astro Starlight docs site
Installation
CLI (global) npm install -g @minions-openclaw/cli
TypeScript SDK npm install @minions-openclaw/sdk
Python SDK pip install minions-openclaw
Quick Start
Register a gateway instance openclaw-manager register my-gateway --url ws://192.168.1.100:8080 --token mytoken
List registered instances
Ping an instance openclaw-manager ping <instanceId>
Capture a snapshot openclaw-manager snapshot <instanceId>
View snapshot history openclaw-manager history <instanceId>
CLI Command Reference openclaw-manager [command] [options]
Commands:
register <name> Register a new OpenClaw Gateway instance
--url <url> Gateway WebSocket URL (required)
--token <token> Auth token (optional)
ping <instanceId> Ping an instance and record latency
snapshot <instanceId> Capture a live snapshot of gateway state
list List all registered instances
history <instanceId> Show snapshot history for an instance
agents <instanceId> List agents on a gateway
channels <instanceId> List channels on a gateway
models <instanceId> List model providers on a gateway
config show <instanceId> Show latest config
config diff <id1> <id2> Diff two snapshots
config export <instanceId> Export config as JSON
config import <instanceId> --file <path> Import config from file
TypeScript SDK Usage import { MinionsOpenClaw } from '@minions-openclaw/sdk';
const minions = new MinionsOpenClaw();
// Register an instance
const instance = await minions.openclaw.instances.register('my-gateway', 'ws://localhost:8080', 'token');
// Connect and fetch live state
const client = minions.openclaw.createGatewayClient(instance.fields['url'] as string, 'token');
await client.openConnection();
const presence = await client.fetchPresence();
await client.close();
// Capture a snapshot
const snapshot = await minions.openclaw.snapshots.captureSnapshot(instance.id, presence);
// Decompose a config file
const config = await minions.openclaw.config.loadFromFile('./openclaw.json');
const { minions: newMinions, relations } = minions.openclaw.config.decompose(config, instance.id);
Python SDK Usage from minions_openclaw import MinionsOpenClaw
import asyncio
minions = MinionsOpenClaw()
# Register an instance
instance = minions.openclaw.instances.register('my-gateway', 'ws://localhost:8080', 'token')
# Async: connect and fetch state
async def capture():
client = minions.openclaw.create_gateway_client(instance.fields['url'], token='token')
await client.open_connection()
presence = await client.fetch_presence()
await client.close()
snapshot = minions.openclaw.snapshots.capture_snapshot(instance.id, presence)
print(f'Snapshot: {snapshot.id}')
asyncio.run(capture())
Architecture minions-openclaw/
āāā packages/
ā āāā core/ # TypeScript library (@minions-openclaw/sdk)
ā ā āāā src/
ā ā ā āāā types.ts # MinionType definitions for all OpenClaw entities
ā ā ā āāā InstanceManager.ts # CRUD for gateway instances
ā ā ā āāā GatewayClient.ts # WebSocket client (challenge/response auth)
ā ā ā āāā SnapshotManager.ts # Snapshot capture & diff
ā ā ā āāā ConfigDecomposer.ts# openclaw.json ā minion tree
ā ā ā āāā index.ts # Public exports
ā ā āāā test/ # Jest tests
ā āāā cli/ # CLI tool (@minions-openclaw/cli)
ā ā āāā src/commands/ # Commander.js commands
ā āāā python/ # Python SDK (minions-openclaw)
ā āāā minions_openclaw/
ā āāā tests/
āāā apps/
ā āāā docs/ # Astro Starlight documentation
āāā examples/
ā āāā typescript/ # TypeScript usage examples
ā āāā python/ # Python usage examples
āāā spec/
āāā v0.1.md # Technical specification
Data Storage Instances and snapshots are persisted to ~/.openclaw-manager/data.json using the minions-sdk structured object format.
Connection Protocol The GatewayClient implements the OpenClaw WebSocket protocol:
Server sends connect.challenge with nonce + timestamp
Client signs challenge with RSA private key (or sends empty signature)
Server responds with hello-ok (or hello-error)
Client can then call methods via { type: "call", id, method, params }
Development Setup # Clone the repo
git clone https://github.com/minions-openclaw/minions-openclaw.git
cd minions-openclaw
# Install all JS dependencies (workspaces)
npm install
# Build TypeScript packages
npm run build
# Run TypeScript tests
npm run test -w packages/core
# Python setup
cd packages/python
pip install -e ".[dev]"
pytest tests/ -v
Contributing
Fork the repository
Create a feature branch (git checkout -b feat/my-feature)
Make your changes and add tests
Run the test suite (npm test && cd packages/python && pytest)
Commit your changes (git commit -m 'feat: add my feature')
Push and open a Pull Request
License Ecosystem Role Standard MoltPulse indexed agent.
Embed BadgeShow off your Pulse Score in your GitHub README to build trust and rank higher.
[](https://molt-pulse.com/agents/mxn2020/minions-openclaw)
Copy