Skip to main content

StateSet iCommerce CLI

AI-powered command-line interface for autonomous commerce operations.

Philosophy

The StateSet CLI is built on the premise that commerce infrastructure should be designed for AI agents, not just humans. Think of it as “The SQLite of Commerce” — an embedded, zero-dependency commerce engine that:
  • Runs locally without cloud dependencies
  • Deterministic operations for agent reliability
  • Agentic Commerce Protocol (ACP) for standardized agent interactions
  • Safety-first architecture — read-only by default, explicit --apply for writes

Features

Core

  • Natural Language Interface - Ask Claude to perform commerce operations
  • Multi-Agent System - 17 specialized agents auto-route to the best handler
  • 90+ MCP Tools - Full commerce API exposed to Claude
  • Hybrid Vector Search - Semantic + BM25 search for products, customers, orders, and inventory (requires OPENAI_API_KEY)
  • Multi-turn Sessions - Resume conversations for complex workflows
  • Preview Mode - See what would happen before making changes
  • Direct Commands - Fast, non-AI mode for scripting
  • Interactive Chat - REPL for exploratory work

Sync & Streaming

  • VES Protocol v1.0 - Verifiable Event Sync with Ed25519 signatures
  • gRPC Streaming - Real-time bidirectional sync with sequencer
  • Event Outbox - SQLite-backed event sourcing with conflict resolution
  • Optimistic Concurrency - Base version tracking for safe multi-agent updates

Payments

  • Multi-Chain Stablecoins - USDC on Solana, Base, Ethereum, Arbitrum
  • SET Chain ssUSD - Yield-bearing stablecoin on StateSet L2
  • Bitcoin & Zcash - Native BTC and ZEC support
  • VES Key Derivation - Deterministic wallet addresses per agent

Infrastructure

  • Batch Processing - Sequential or parallel request processing
  • Interactive Tutorials - Guided onboarding for new users
  • SQLite/PostgreSQL - Flexible storage backends
  • Rich Output - ASCII tables, progress bars, formatted displays
  • Telemetry - Distributed tracing with --verbose and --stats

Installation

Or run locally:

On Omarchy

One command installs the native commerce widget, the Super-key menu actions, and project-local MCP configuration:
Writes stay preview-only after this install. Governed apply mode has to be configured explicitly with an operator-owned policy, a principal, and a store identity — so a fresh Omarchy install can read your commerce data and cannot change it until you have said who is allowed to, and under what policy.

Quick Start

Tip: ss is a shorthand alias for stateset.

Run the Tutorial

New to StateSet CLI? Start with the interactive tutorial:

AI-Powered Mode

Interactive Chat

Direct Commands (No AI)

Batch Processing

Commands

Primary Commands

Specialized Agent Commands

Utility Commands

The CLI writes to the same commerce data as the API. Commands that mutate require --apply; without it they print what they would do and change nothing. Get in the habit of running once without it — the dry run is the only place a mistaken filter is cheap.

Architecture

Technology Stack

  • Rust Core - Pure domain logic with deterministic execution
  • @stateset/embedded - Native Node.js bindings via NAPI
  • Claude Agent SDK - AI agent framework with MCP tools
  • SQLite/PostgreSQL - Flexible database backends

Capabilities

Commerce Operations

Manufacturing Operations

Financial Operations

Promotions & Discounts

Subscriptions & Recurring Billing

Manufacturing

Tax Management

Analytics & Forecasting

Safety Architecture

Read-Only by Default

All write operations are blocked by default. The CLI shows what would happen without making changes.

Permission Controls

Observability

Workflows

E-commerce Workflow

Shopping Cart Checkout (ACP)

Cart Recovery

Inventory Management

Processing Returns

Multi-Currency Support

Stablecoin Payments

Send native cryptocurrency payments across multiple blockchains:
Supported Chains:

Supplier Management

B2B Invoicing

Storefront Creation

Available templates: nextjs, nextjs-minimal, vite-react, astro

Event Sync (VES Protocol)

Synchronize events between agents and the StateSet Sequencer using the Verifiable Event Sync protocol:
stateset-sync has no stream command and stateset-events --filter accepts a type (orders, inventory, customers, products, returns), not an entity id. For entity-scoped real-time sync use the gRPC client below. gRPC Streaming for real-time sync:
VES Protocol Features:
  • Ed25519 cryptographic signatures for event integrity
  • Domain-separated hashing (VES_PAYLOAD_PLAIN_V1)
  • Optimistic concurrency with base version tracking
  • Automatic conflict detection and resolution
  • Global sequence numbers for ordering

Agent System

17 specialized agents handle different commerce domains:

Auto-Routing

The main stateset command automatically routes requests to the best agent based on:
  • Request content analysis
  • Confidence scoring
  • Domain keyword matching
  • Ambiguity detection

MCP Tools (90+ Total)

Configuration

Environment Variables

Database

Flags Reference

Session Management

Sessions enable multi-turn conversations with context preservation:

Tutorials

Learn the CLI with interactive tutorials:

Shell Completions

Generate shell completion scripts:

Command Reference

stateset - AI Agent

stateset-chat - Interactive Mode

stateset-direct - Direct Commands

Error Handling

The CLI provides structured error handling with helpful suggestions:

Diagnostics

Run health checks:

Development

Programmatic Usage

The CLI modules can be used programmatically:

Next steps

iCommerce quickstart

Standing the engine up before driving it from the CLI.

CLI workflows

Longer command sequences for real tasks.

iCommerce agent

Letting an agent run these commands.

Worker

Running the same engine in a Cloudflare Sandbox.
Last modified on August 31, 2026