@amaster.ai/runtime-cli 1.0.0-beta.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +274 -0
- package/dist/cli.cjs +1028 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +7 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +1018 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.cjs +1045 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +77 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.js +1020 -0
- package/dist/index.js.map +1 -0
- package/dist/scripts/preuninstall.cjs +69 -0
- package/dist/scripts/preuninstall.cjs.map +1 -0
- package/dist/scripts/preuninstall.d.cts +2 -0
- package/dist/scripts/preuninstall.d.ts +2 -0
- package/dist/scripts/preuninstall.js +67 -0
- package/dist/scripts/preuninstall.js.map +1 -0
- package/dist/skill/SKILL.md +286 -0
- package/package.json +67 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Amaster Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# @amaster.ai/runtime-cli
|
|
2
|
+
|
|
3
|
+
Unified CLI for Amaster SDK and OpenClaw integration. Manage entities, BPM processes, workflows, S3 files, authentication, and OpenClaw skills from a single command-line interface.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Authentication**: Login, logout, register users, manage sessions
|
|
8
|
+
- **Entity Management**: CRUD operations on entities with type-safe API
|
|
9
|
+
- **BPM**: Manage Camunda processes, tasks, and instances
|
|
10
|
+
- **Workflow**: Execute and monitor workflows
|
|
11
|
+
- **S3 Storage**: Upload, download, list, and manage files
|
|
12
|
+
- **OpenClaw Integration**: Initialize app-specific skills and MCP servers for AI assistants
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g @amaster.ai/runtime-cli
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or use with npx:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @amaster.ai/runtime-cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Automatic Cleanup
|
|
27
|
+
|
|
28
|
+
When you uninstall `@amaster.ai/runtime-cli`, it will automatically clean up the OpenClaw integration for the configured app:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm uninstall -g @amaster.ai/runtime-cli
|
|
32
|
+
# Automatically removes skills and MCP servers
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
To skip automatic cleanup:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm_config_ignore_scripts=1 npm uninstall -g @amaster.ai/runtime-cli
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
### 1. Configure the CLI
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Set your API key
|
|
47
|
+
amaster config set apiKey YOUR_API_KEY
|
|
48
|
+
|
|
49
|
+
# Set base URL (optional, defaults to https://api.amaster.ai)
|
|
50
|
+
amaster config set baseURL https://api.amaster.ai
|
|
51
|
+
|
|
52
|
+
# View configuration
|
|
53
|
+
amaster config list
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 2. Authenticate
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Login
|
|
60
|
+
amaster login
|
|
61
|
+
|
|
62
|
+
# Or with options
|
|
63
|
+
amaster login --email user@example.com --password secret
|
|
64
|
+
|
|
65
|
+
# Check who you are
|
|
66
|
+
amaster whoami
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 3. Use SDK Features
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# List entities
|
|
73
|
+
amaster entity list myapp users
|
|
74
|
+
|
|
75
|
+
# Get a specific entity
|
|
76
|
+
amaster entity get myapp users 123
|
|
77
|
+
|
|
78
|
+
# Create an entity
|
|
79
|
+
amaster entity create myapp users --data '{"name":"John","email":"john@example.com"}'
|
|
80
|
+
|
|
81
|
+
# List BPM processes
|
|
82
|
+
amaster bpm processes
|
|
83
|
+
|
|
84
|
+
# Start a process
|
|
85
|
+
amaster bpm start my-process --variables '{"key":"value"}'
|
|
86
|
+
|
|
87
|
+
# List workflows
|
|
88
|
+
amaster workflow list
|
|
89
|
+
|
|
90
|
+
# Execute a workflow
|
|
91
|
+
amaster workflow execute my-workflow --input '{"data":"value"}'
|
|
92
|
+
|
|
93
|
+
# List S3 files
|
|
94
|
+
amaster s3 list
|
|
95
|
+
|
|
96
|
+
# Upload a file
|
|
97
|
+
amaster s3 upload ./myfile.pdf --bucket mybucket --key documents/myfile.pdf
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 4. Setup OpenClaw Integration
|
|
101
|
+
|
|
102
|
+
Initialize OpenClaw integration for a specific app (downloads app-specific skills and MCP servers):
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Initialize for an app
|
|
106
|
+
amaster init --app-code myapp
|
|
107
|
+
|
|
108
|
+
# With API key
|
|
109
|
+
amaster init --app-code myapp --api-key YOUR_API_KEY
|
|
110
|
+
|
|
111
|
+
# Force reinitialize
|
|
112
|
+
amaster init --app-code myapp --force
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Check integration status:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
amaster doctor
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
List installed components:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
amaster list
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Switch to a different app:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
amaster switch another-app
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Remove integration for current app:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
amaster uninstall --yes
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Commands
|
|
140
|
+
|
|
141
|
+
### Configuration
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
amaster config set <key> <value> # Set config value
|
|
145
|
+
amaster config get <key> # Get config value
|
|
146
|
+
amaster config list # List all config
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Authentication
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
amaster login [options] # Login with email/password
|
|
153
|
+
amaster logout # Logout
|
|
154
|
+
amaster whoami # Show current user
|
|
155
|
+
amaster register [options] # Register new user
|
|
156
|
+
amaster users [options] # List users
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Entity Management
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
amaster entity list <app> <entity> [options]
|
|
163
|
+
amaster entity get <app> <entity> <id>
|
|
164
|
+
amaster entity create <app> <entity> [options]
|
|
165
|
+
amaster entity update <app> <entity> <id> [options]
|
|
166
|
+
amaster entity delete <app> <entity> <id>
|
|
167
|
+
amaster entity types <app>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### BPM
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
amaster bpm processes # List process definitions
|
|
174
|
+
amaster bpm start <key> [options] # Start process instance
|
|
175
|
+
amaster bpm tasks [options] # List tasks
|
|
176
|
+
amaster bpm complete <id> [options] # Complete task
|
|
177
|
+
amaster bpm claim <id> [options] # Claim task
|
|
178
|
+
amaster bpm instances # List process instances
|
|
179
|
+
amaster bpm instance <id> # Get instance details
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Workflow
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
amaster workflow list # List workflows
|
|
186
|
+
amaster workflow get <id> # Get workflow details
|
|
187
|
+
amaster workflow execute <id> [options]
|
|
188
|
+
amaster workflow executions [options]
|
|
189
|
+
amaster workflow execution <id>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### S3 Storage
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
amaster s3 list [options] # List files
|
|
196
|
+
amaster s3 upload <file> [options] # Upload file
|
|
197
|
+
amaster s3 download <key> [options] # Download file
|
|
198
|
+
amaster s3 delete <key> [options] # Delete file
|
|
199
|
+
amaster s3 url <key> [options] # Get file URL
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### OpenClaw Integration
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
amaster init [options] # Initialize integration for an app
|
|
206
|
+
amaster doctor # Check integration status
|
|
207
|
+
amaster list # List installed skills and MCP servers
|
|
208
|
+
amaster switch <app-code> [options] # Switch to a different app
|
|
209
|
+
amaster uninstall [options] # Remove integration for current app
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Configuration
|
|
213
|
+
|
|
214
|
+
Configuration is stored in `~/.amaster/cli-config.json`.
|
|
215
|
+
|
|
216
|
+
### Environment Variables
|
|
217
|
+
|
|
218
|
+
- `AMASTER_API_KEY` - Your Amaster API key
|
|
219
|
+
- `AMASTER_BASE_URL` - Base URL for API (default: https://api.amaster.ai)
|
|
220
|
+
|
|
221
|
+
### File Locations
|
|
222
|
+
|
|
223
|
+
- CLI Config: `~/.amaster/cli-config.json`
|
|
224
|
+
- OpenClaw Config: `~/.openclaw/config.json`
|
|
225
|
+
- Installed Skills: `~/.openclaw/skills/{appCode}/`
|
|
226
|
+
- Amaster Config: `~/.amaster/openclaw-config.json`
|
|
227
|
+
|
|
228
|
+
## OSS Structure
|
|
229
|
+
|
|
230
|
+
The CLI expects skills and MCP configurations to be organized by app code in OSS:
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
/openclaw/
|
|
234
|
+
├── apps/
|
|
235
|
+
│ ├── {appCode1}/
|
|
236
|
+
│ │ ├── skills/
|
|
237
|
+
│ │ │ ├── manifest.json # Skills manifest for this app
|
|
238
|
+
│ │ │ └── {skill-id}.zip # Skill packages
|
|
239
|
+
│ │ └── mcp-config.yaml # MCP server config for this app
|
|
240
|
+
│ └── {appCode2}/
|
|
241
|
+
│ ├── skills/
|
|
242
|
+
│ └── mcp-config.yaml
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## Development
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
# Install dependencies
|
|
249
|
+
pnpm install
|
|
250
|
+
|
|
251
|
+
# Build
|
|
252
|
+
pnpm run build
|
|
253
|
+
|
|
254
|
+
# Development mode
|
|
255
|
+
pnpm run dev
|
|
256
|
+
|
|
257
|
+
# Type check
|
|
258
|
+
pnpm run type-check
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Architecture
|
|
262
|
+
|
|
263
|
+
The CLI integrates all Amaster SDK clients:
|
|
264
|
+
|
|
265
|
+
- `@amaster.ai/client` - Unified client for all services
|
|
266
|
+
- `@amaster.ai/auth-client` - Authentication
|
|
267
|
+
- `@amaster.ai/entity-client` - Entity CRUD
|
|
268
|
+
- `@amaster.ai/bpm-client` - BPM processes
|
|
269
|
+
- `@amaster.ai/workflow-client` - Workflow execution
|
|
270
|
+
- `@amaster.ai/s3-client` - File storage
|
|
271
|
+
|
|
272
|
+
## License
|
|
273
|
+
|
|
274
|
+
MIT
|