This is a model provider plugin for OpenClaw that supports CMToken authentication (OAuth via phone number) and model inference.
- Decoupled: Independent of the OpenClaw monorepo source code.
- Node.js: Version 22 or higher.
- npm or pnpm: For dependency management.
- Extract: Copy this folder to your desired location.
- Dependencies:
pnpm install
All API and OAuth endpoints are managed in environments.json. Since this file contains potentially sensitive URLs, it is ignored by Git.
To get started, copy the example file:
cp environments.json.example environments.jsonThen, modify environments.json to customize the built-in addresses:
{
"test": {
"BASE_URL": "...", // Inference API base
"DISCOVERY_URL": "...", // Model discovery endpoint
"OAUTH_URL": "...", // OAuth server base
"CLIENT_ID": "..." // OAuth client ID
},
"prod": { ... }
}Used for local development and testing.
# Build only
pnpm run build
# Build & Package (generates cmtoken.tgz)
pnpm run packUsed for final distribution with official endpoints.
# Build only
node scripts/build.mjs --env=prod
# Build & Package (generates cmtoken.tgz)
node scripts/build.mjs --env=prod --packInstall the generated .tgz package directly:
openclaw plugins install ./cmtoken.tgzIf you already have an older version installed, you can update it by running the same install command, or by uninstalling it first:
# To uninstall first (optional)
openclaw plugins uninstall cmtoken
# Then install the new version
openclaw plugins install ./cmtoken.tgzThen, run the onboarding wizard or configuration command to set up CMToken:
# Recommended for first-time setup
openclaw onboard
# Or to modify existing configuration
openclaw configurepnpm run build: Bundles the plugin intodist/index.js.pnpm run pack: Bundles and packages the plugin intocmtoken.tgz.