@senkronla/cli
v0.1.11
Published
Senkronla operator CLI — unlock code generation and admin tools
Maintainers
Readme
@senkronla/cli
Operator CLI for Senkronla — generate unlock codes and other relay admin tasks from the terminal.
Use this when you run a self-hosted Envelope Sync Relay and need to issue slot unlock codes after manual payment or support verification. End users redeem codes from their app via POST /v1/namespaces/{id}/unlock.
For application integration (sync SDK), use @senkronla/client instead.
Install
npm install -g @senkronla/cli
# or run without installing
npx @senkronla/cli --helpNode.js 22+ required.
Quick start
Set admin credentials (same token as the relay admin API):
export ESR_ADMIN_TOKEN="your-long-random-admin-token"
export ESR_PUBLIC_URL="https://sync.senkron.la" # optional; default http://localhost:8080Generate an unlock code:
senkronla generate-unlock-code \
--namespace-id 550e8400-e29b-41d4-a716-446655440000 \
--slots 3 \
--note "Invoice #1234"Output is JSON from POST /v1/admin/unlock-codes.
Commands
generate-unlock-code
senkronla generate-unlock-code --namespace-id <uuid> --slots <number> [options]| Option | Required | Description |
|--------|----------|-------------|
| --namespace-id | yes | Target namespace UUID |
| --slots | yes | Number of device slots to unlock |
| --expires-at | no | ISO-8601 expiry datetime |
| --note | no | Operator note (audit trail) |
| --api-url | no | Relay base URL (default: ESR_PUBLIC_URL or http://localhost:8080) |
| --admin-token | no | Admin bearer token (default: ESR_ADMIN_TOKEN) |
Monorepo development
From the Senkronla repository:
pnpm --filter @senkronla/cli exec senkronla generate-unlock-code --helpDocumentation
- Operator guide — unlock codes, admin API
- ESR setup — deploy the relay
- API reference —
/v1/admin/unlock-codes
