clawflowbang 1.0.2 → 1.1.0
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/README.md +162 -49
- package/bin/clawflowhub.js +152 -66
- package/package.json +20 -8
- package/src/commands/create.js +286 -0
- package/src/commands/cron.js +46 -21
- package/src/commands/doctor.js +146 -0
- package/src/commands/explore.js +49 -0
- package/src/commands/register.js +83 -0
- package/src/commands/update.js +35 -0
- package/src/core/Installer.js +226 -109
- package/src/core/TerminalUI.js +12 -17
- package/.env.example +0 -14
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -35
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -23
- package/.github/pull_request_template.md +0 -19
- package/.github/workflows/publish.yml +0 -46
- package/.github/workflows/test.yml +0 -31
- package/CODE_OF_CONDUCT.md +0 -29
- package/SECURITY.md +0 -20
- package/SUPPORT.md +0 -21
package/README.md
CHANGED
|
@@ -1,45 +1,52 @@
|
|
|
1
|
-
# ClawFlow
|
|
1
|
+
# 🦞 ClawFlow
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**ClawFlow** is a skill + cron installer for OpenClaw/OpenKrab ecosystem.
|
|
4
|
+
It installs skill bundles and wires cron jobs in one flow, providing both CLI automation and package management.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
<p align="center">
|
|
7
|
+
<img src="/public/banner.png" alt="ClawFlow Banner" width="700">
|
|
8
|
+
</p>
|
|
7
9
|
|
|
8
|
-
##
|
|
10
|
+
## Features
|
|
9
11
|
|
|
10
|
-
- Install
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- **Package Management**: Install skill bundles with one command from ClawHub or Git
|
|
13
|
+
- **Cron Automation**: Schedule and manage automated skill execution
|
|
14
|
+
- **Fallback Installation**: ClawHub registry first, Git clone fallback
|
|
15
|
+
- **Cron Validation**: Normalize and validate cron expressions
|
|
16
|
+
- **CLI Interface**: Fast command-line tool (`clawflow` / `cfh`)
|
|
17
|
+
- **NPM Integration**: Published as `clawflowbang` package
|
|
18
|
+
- **Cross Platform**: Node.js based with Windows/Linux/macOS support
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
---
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
### Prerequisites
|
|
25
|
+
|
|
26
|
+
- Node.js 16+
|
|
18
27
|
- OpenClaw CLI (`openclaw`)
|
|
19
|
-
- ClawHub CLI (`clawhub`) for registry
|
|
20
|
-
- Git (
|
|
28
|
+
- ClawHub CLI (`clawhub`) for registry access
|
|
29
|
+
- Git (for fallback installation)
|
|
21
30
|
|
|
22
|
-
|
|
31
|
+
### Installation
|
|
23
32
|
|
|
24
33
|
```bash
|
|
25
34
|
npm i -g clawflowbang
|
|
26
35
|
```
|
|
27
36
|
|
|
28
|
-
|
|
37
|
+
Verify installation:
|
|
29
38
|
|
|
30
39
|
```bash
|
|
31
40
|
clawflow --version
|
|
32
41
|
```
|
|
33
42
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Initialize local config:
|
|
43
|
+
### Initial Setup
|
|
37
44
|
|
|
38
45
|
```bash
|
|
39
46
|
clawflow init
|
|
40
47
|
```
|
|
41
48
|
|
|
42
|
-
Install
|
|
49
|
+
### Install Your First Package
|
|
43
50
|
|
|
44
51
|
```bash
|
|
45
52
|
clawflow install trading-kit
|
|
@@ -51,29 +58,39 @@ Check status:
|
|
|
51
58
|
clawflow status
|
|
52
59
|
```
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Core Commands
|
|
64
|
+
|
|
65
|
+
### Package Management
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
clawflow install <package> # Install skill bundle
|
|
69
|
+
clawflow list [--available] [--npm] # List installed/available packages
|
|
70
|
+
clawflow search <query> [--no-npm] # Search packages
|
|
71
|
+
clawflow remove <package> # Remove installed package
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Cron Operations
|
|
55
75
|
|
|
56
76
|
```bash
|
|
57
|
-
clawflow
|
|
58
|
-
clawflow
|
|
59
|
-
clawflow
|
|
60
|
-
clawflow remove <
|
|
61
|
-
|
|
62
|
-
clawflow cron-list
|
|
63
|
-
clawflow cron-add <skill> --schedule "*/5 * * * *"
|
|
64
|
-
clawflow cron-edit <id> --every 15m --description "updated job"
|
|
65
|
-
clawflow cron-remove <id>
|
|
77
|
+
clawflow cron-list # List all cron jobs
|
|
78
|
+
clawflow cron-add <skill> --schedule "*/5 * * * *" # Add new cron job
|
|
79
|
+
clawflow cron-edit <id> --every 15m --description "updated job" # Modify existing
|
|
80
|
+
clawflow cron-remove <id> # Remove cron job
|
|
66
81
|
```
|
|
67
82
|
|
|
83
|
+
---
|
|
84
|
+
|
|
68
85
|
## Cron Input Formats
|
|
69
86
|
|
|
70
87
|
Supported formats:
|
|
71
88
|
|
|
72
|
-
- Raw cron
|
|
73
|
-
- Preset
|
|
74
|
-
- Shorthand
|
|
89
|
+
- **Raw cron**: `*/5 * * * *`
|
|
90
|
+
- **Preset**: `@hourly`, `@daily`, `@weekly`, `@monthly`
|
|
91
|
+
- **Shorthand**: `5m`, `every 15m`, `1h`, `2d`
|
|
75
92
|
|
|
76
|
-
Examples
|
|
93
|
+
### Examples
|
|
77
94
|
|
|
78
95
|
```bash
|
|
79
96
|
clawflow cron-add crypto-price --every 15m
|
|
@@ -82,25 +99,35 @@ clawflow cron-edit <job-id> --params '{"symbols":["BTC","ETH"]}'
|
|
|
82
99
|
clawflow cron-remove <job-id>
|
|
83
100
|
```
|
|
84
101
|
|
|
85
|
-
|
|
102
|
+
---
|
|
86
103
|
|
|
87
|
-
|
|
104
|
+
## Installation Flow
|
|
88
105
|
|
|
89
|
-
|
|
90
|
-
2. If failed, try `git clone` when skill metadata provides repository info
|
|
91
|
-
3. Validate cloned skill by checking `SKILL.md`
|
|
106
|
+
### Skill Installation Strategy
|
|
92
107
|
|
|
93
|
-
|
|
108
|
+
1. **Primary**: Try `clawhub install` from registry
|
|
109
|
+
2. **Fallback**: Use `git clone` when registry fails
|
|
110
|
+
3. **Validation**: Check `SKILL.md` exists and is valid
|
|
94
111
|
|
|
95
|
-
|
|
96
|
-
- optional `branch` / `tag` / `ref`
|
|
112
|
+
### Git Fallback Metadata
|
|
97
113
|
|
|
98
|
-
|
|
114
|
+
Required fields in package metadata:
|
|
99
115
|
|
|
100
|
-
-
|
|
116
|
+
- `repository` or `repo` or `git` - Git repository URL
|
|
117
|
+
- Optional: `branch` / `tag` / `ref` - Specific version
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Configuration
|
|
122
|
+
|
|
123
|
+
### Default Paths
|
|
124
|
+
|
|
125
|
+
- Skills directory: `~/.openclaw/workspace/skills`
|
|
101
126
|
- Cron jobs file: `~/.openclaw/cron/jobs.json`
|
|
102
127
|
|
|
103
|
-
|
|
128
|
+
### Custom Paths
|
|
129
|
+
|
|
130
|
+
Override defaults during installation:
|
|
104
131
|
|
|
105
132
|
```bash
|
|
106
133
|
clawflow install <package> \
|
|
@@ -108,10 +135,11 @@ clawflow install <package> \
|
|
|
108
135
|
--cron-jobs "<path-to-jobs.json>"
|
|
109
136
|
```
|
|
110
137
|
|
|
111
|
-
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## NPM Package Format
|
|
112
141
|
|
|
113
|
-
`clawflow`
|
|
114
|
-
Use `clawflow` field in package.json:
|
|
142
|
+
`clawflow` reads package metadata from npm packages using the `clawflow` field:
|
|
115
143
|
|
|
116
144
|
```json
|
|
117
145
|
{
|
|
@@ -138,14 +166,99 @@ Use `clawflow` field in package.json:
|
|
|
138
166
|
}
|
|
139
167
|
```
|
|
140
168
|
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Tech Stack
|
|
172
|
+
|
|
173
|
+
- **Node.js 16+** - Core runtime
|
|
174
|
+
- **Commander.js** - CLI framework
|
|
175
|
+
- **Node-cron** - Cron job management
|
|
176
|
+
- **Axios** - HTTP requests for registry
|
|
177
|
+
- **Chalk + Gradient-string** - Terminal styling
|
|
178
|
+
- **Inquirer.js** - Interactive prompts
|
|
179
|
+
- **YAML** - Configuration parsing
|
|
180
|
+
- **Boxen** - Beautiful terminal boxes
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Project Structure
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
ClawFlowHub/
|
|
188
|
+
├── bin/
|
|
189
|
+
│ └── clawflowhub.js # CLI entry point
|
|
190
|
+
├── src/
|
|
191
|
+
│ ├── index.js # Main module
|
|
192
|
+
│ ├── commands/ # Command implementations
|
|
193
|
+
│ ├── utils/ # Utility functions
|
|
194
|
+
│ └── config/ # Configuration management
|
|
195
|
+
├── skills/ # Example skills
|
|
196
|
+
├── examples/ # Usage examples
|
|
197
|
+
├── docs/ # Documentation
|
|
198
|
+
├── tests/ # Test suite
|
|
199
|
+
├── package.json # NPM package config
|
|
200
|
+
├── image.png # Project banner
|
|
201
|
+
└── README.md # This file
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
141
206
|
## Development
|
|
142
207
|
|
|
208
|
+
### Setup
|
|
209
|
+
|
|
143
210
|
```bash
|
|
211
|
+
git clone https://github.com/OpenKrab/ClawFlowHub.git
|
|
212
|
+
cd ClawFlowHub
|
|
144
213
|
npm install
|
|
145
|
-
npm run lint
|
|
146
|
-
npm test -- --runInBand
|
|
147
214
|
```
|
|
148
215
|
|
|
216
|
+
### Development Commands
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
npm run lint # Lint code
|
|
220
|
+
npm test # Run test suite
|
|
221
|
+
npm start # Run CLI locally
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Testing
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# Test basic functionality
|
|
228
|
+
clawflow --help
|
|
229
|
+
clawflow list --available
|
|
230
|
+
clawflow search crypto
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## OpenClaw Integration
|
|
236
|
+
|
|
237
|
+
ClawFlow integrates with OpenClaw ecosystem through:
|
|
238
|
+
|
|
239
|
+
- **Skill Installation**: Direct integration with OpenClaw skill system
|
|
240
|
+
- **Cron Management**: Uses OpenClaw's cron job infrastructure
|
|
241
|
+
- **Registry Access**: Leverages ClawHub for skill discovery
|
|
242
|
+
- **Configuration**: Respects OpenClaw's configuration patterns
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Contributing
|
|
247
|
+
|
|
248
|
+
PRs are welcome! Please ensure:
|
|
249
|
+
|
|
250
|
+
1. Code follows existing ESLint patterns
|
|
251
|
+
2. Add tests for new functionality
|
|
252
|
+
3. Update documentation as needed
|
|
253
|
+
4. Test cross-platform compatibility
|
|
254
|
+
5. Follow semantic versioning
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
149
258
|
## License
|
|
150
259
|
|
|
151
260
|
MIT
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
*Built for the Lobster Way 🦞*
|
package/bin/clawflowhub.js
CHANGED
|
@@ -1,117 +1,203 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
require(
|
|
4
|
-
|
|
5
|
-
const { program } = require(
|
|
6
|
-
const pkg = require(
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
require("dotenv").config();
|
|
4
|
+
|
|
5
|
+
const { program } = require("commander");
|
|
6
|
+
const pkg = require("../package.json");
|
|
7
|
+
const chalk = require("chalk");
|
|
7
8
|
|
|
8
9
|
// Import TUI
|
|
9
|
-
const TUI = require(
|
|
10
|
+
const TUI = require("../src/core/TerminalUI");
|
|
10
11
|
|
|
11
12
|
// Import commands
|
|
12
|
-
const installCommand = require(
|
|
13
|
-
const listCommand = require(
|
|
14
|
-
const removeCommand = require(
|
|
15
|
-
const cronCommand = require(
|
|
16
|
-
const statusCommand = require(
|
|
17
|
-
const initCommand = require(
|
|
18
|
-
const searchCommand = require(
|
|
13
|
+
const installCommand = require("../src/commands/install");
|
|
14
|
+
const listCommand = require("../src/commands/list");
|
|
15
|
+
const removeCommand = require("../src/commands/remove");
|
|
16
|
+
const cronCommand = require("../src/commands/cron");
|
|
17
|
+
const statusCommand = require("../src/commands/status");
|
|
18
|
+
const initCommand = require("../src/commands/init");
|
|
19
|
+
const searchCommand = require("../src/commands/search");
|
|
20
|
+
const createCommand = require("../src/commands/create");
|
|
21
|
+
const doctorCommand = require("../src/commands/doctor");
|
|
22
|
+
const registerCommand = require("../src/commands/register");
|
|
23
|
+
const updateCommand = require("../src/commands/update");
|
|
24
|
+
|
|
25
|
+
const exploreCommand = require("../src/commands/explore"); // Added exploreCommand
|
|
19
26
|
|
|
20
27
|
// Print new TUI banner
|
|
21
28
|
TUI.printBanner(pkg.version);
|
|
22
29
|
|
|
23
30
|
program
|
|
24
|
-
.name(
|
|
25
|
-
.description(
|
|
26
|
-
.version(pkg.version,
|
|
31
|
+
.name("clawflow")
|
|
32
|
+
.description("Install OpenClaw skills and set up cronjobs")
|
|
33
|
+
.version(pkg.version, "-v, --version", "Show version");
|
|
34
|
+
|
|
35
|
+
// Create command
|
|
36
|
+
program
|
|
37
|
+
.command("create [type] [name]")
|
|
38
|
+
.description("Create a new skill or agent template")
|
|
39
|
+
.action(createCommand);
|
|
27
40
|
|
|
28
41
|
// Install command
|
|
42
|
+
|
|
29
43
|
program
|
|
30
|
-
.command(
|
|
31
|
-
.alias(
|
|
32
|
-
.description(
|
|
33
|
-
.option(
|
|
34
|
-
.option(
|
|
35
|
-
.option(
|
|
36
|
-
.option(
|
|
37
|
-
.option(
|
|
38
|
-
.option(
|
|
39
|
-
.option(
|
|
40
|
-
.option(
|
|
44
|
+
.command("install <package>")
|
|
45
|
+
.alias("i")
|
|
46
|
+
.description("Install a package including skills and cronjobs")
|
|
47
|
+
.option("-g, --global", "Install globally")
|
|
48
|
+
.option("-c, --config <path>", "Specify config file path")
|
|
49
|
+
.option("--skills-path <path>", "Specify OpenClaw workspace skills path")
|
|
50
|
+
.option("--cron-jobs <path>", "Specify OpenClaw cron jobs.json path")
|
|
51
|
+
.option("--openclaw-bin <path>", "Path to openclaw CLI binary")
|
|
52
|
+
.option("--clawhub-bin <path>", "Path to clawhub CLI binary")
|
|
53
|
+
.option("--no-cron", "Install skills without creating cronjobs")
|
|
54
|
+
.option("--dry-run", "Show what would be done without installing")
|
|
55
|
+
.option("--dev", "Local development mode (symlink skills)") // Added --dev option
|
|
56
|
+
.option("--bundle", "Install multiple skills if found in repository") // Added --bundle option
|
|
41
57
|
.action(installCommand);
|
|
42
58
|
|
|
43
59
|
// List command
|
|
44
60
|
program
|
|
45
|
-
.command(
|
|
46
|
-
.alias(
|
|
47
|
-
.description(
|
|
48
|
-
.option(
|
|
49
|
-
.option(
|
|
50
|
-
.option(
|
|
61
|
+
.command("list")
|
|
62
|
+
.alias("ls")
|
|
63
|
+
.description("Show installed packages and skills")
|
|
64
|
+
.option("-a, --available", "Show packages available for install")
|
|
65
|
+
.option("-i, --installed", "Show installed packages (default)")
|
|
66
|
+
.option("--npm", "Include packages from npm registry (with --available)")
|
|
51
67
|
.action(listCommand);
|
|
52
68
|
|
|
53
69
|
// Search command
|
|
54
70
|
program
|
|
55
|
-
.command(
|
|
56
|
-
.alias(
|
|
57
|
-
.description(
|
|
58
|
-
.option(
|
|
71
|
+
.command("search <query>")
|
|
72
|
+
.alias("find")
|
|
73
|
+
.description("Search packages in the registry")
|
|
74
|
+
.option("--no-npm", "Exclude results from npm registry")
|
|
59
75
|
.action(searchCommand);
|
|
60
76
|
|
|
61
77
|
// Remove command
|
|
62
78
|
program
|
|
63
|
-
.command(
|
|
64
|
-
.alias(
|
|
65
|
-
.description(
|
|
66
|
-
.option(
|
|
67
|
-
.option(
|
|
79
|
+
.command("remove <package>")
|
|
80
|
+
.alias("rm")
|
|
81
|
+
.description("Uninstall a package")
|
|
82
|
+
.option("-g, --global", "Uninstall globally")
|
|
83
|
+
.option("--keep-config", "Keep package config files")
|
|
68
84
|
.action(removeCommand);
|
|
69
85
|
|
|
70
86
|
// Cron command group
|
|
71
87
|
program
|
|
72
|
-
.command(
|
|
73
|
-
.description(
|
|
88
|
+
.command("cron-list")
|
|
89
|
+
.description("List all cronjobs")
|
|
74
90
|
.action(cronCommand.list);
|
|
75
91
|
|
|
76
92
|
program
|
|
77
|
-
.command(
|
|
78
|
-
.description(
|
|
79
|
-
.option(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
.command("cron-add <skill>")
|
|
94
|
+
.description("Add a cronjob for a skill")
|
|
95
|
+
.option(
|
|
96
|
+
"-s, --schedule <expression>",
|
|
97
|
+
"cron schedule expression",
|
|
98
|
+
"*/5 * * * *",
|
|
99
|
+
)
|
|
100
|
+
.option("-e, --every <duration>", "Shorthand like 5m, 1h, 2d")
|
|
101
|
+
.option("-d, --description <text>", "Cronjob description")
|
|
102
|
+
.option("-p, --params <json>", "Parameters for the skill")
|
|
103
|
+
.option("--dry-run", "Show what would be done without adding")
|
|
83
104
|
.action(cronCommand.add);
|
|
84
105
|
|
|
85
106
|
program
|
|
86
|
-
.command(
|
|
87
|
-
.description(
|
|
88
|
-
.option(
|
|
89
|
-
.option(
|
|
90
|
-
.option(
|
|
91
|
-
.option(
|
|
107
|
+
.command("cron-edit <id>")
|
|
108
|
+
.description("Edit a cronjob")
|
|
109
|
+
.option("-s, --schedule <expression>", "New cron schedule expression")
|
|
110
|
+
.option("-e, --every <duration>", "Shorthand like 5m, 1h, 2d")
|
|
111
|
+
.option("-d, --description <text>", "New description")
|
|
112
|
+
.option("-p, --params <json>", "New parameters for the skill")
|
|
92
113
|
.action(cronCommand.edit);
|
|
93
114
|
|
|
94
115
|
program
|
|
95
|
-
.command(
|
|
96
|
-
.description(
|
|
116
|
+
.command("cron-remove <id>")
|
|
117
|
+
.description("Remove a cronjob")
|
|
97
118
|
.action(cronCommand.remove);
|
|
98
119
|
|
|
99
120
|
// Status command
|
|
100
121
|
program
|
|
101
|
-
.command(
|
|
102
|
-
.description(
|
|
122
|
+
.command("status")
|
|
123
|
+
.description("Show system status")
|
|
103
124
|
.action(statusCommand);
|
|
104
125
|
|
|
126
|
+
// Register command
|
|
127
|
+
program
|
|
128
|
+
.command("register [path]")
|
|
129
|
+
.description("Register a local skill or agent to OpenClaw")
|
|
130
|
+
.action(registerCommand);
|
|
131
|
+
|
|
132
|
+
// Doctor command
|
|
133
|
+
|
|
134
|
+
program
|
|
135
|
+
.command("doctor")
|
|
136
|
+
.description("Check system compatibility and configuration")
|
|
137
|
+
.action(doctorCommand);
|
|
138
|
+
|
|
139
|
+
// Publish command (stub)
|
|
140
|
+
program
|
|
141
|
+
.command("publish [path]")
|
|
142
|
+
.description("Publish a skill/agent to ClawHub")
|
|
143
|
+
.action(() => {
|
|
144
|
+
console.log(chalk.yellow("\n📦 clawflow publish is coming soon!"));
|
|
145
|
+
console.log(
|
|
146
|
+
chalk.gray(
|
|
147
|
+
"In the meantime, please use git to push to your repository.\n",
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// Test command (stub)
|
|
153
|
+
program
|
|
154
|
+
.command("test <skill>")
|
|
155
|
+
.description("Run tests or examples for a skill")
|
|
156
|
+
.action((skill) => {
|
|
157
|
+
console.log(chalk.cyan(`\n🧪 Testing skill: ${skill}...`));
|
|
158
|
+
console.log(chalk.yellow("Test runner integration is coming soon!\n"));
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// Integration commands
|
|
162
|
+
program
|
|
163
|
+
.command("graph-add <skill>")
|
|
164
|
+
.description("Add a skill node to ClawGraph")
|
|
165
|
+
.action((skill) => {
|
|
166
|
+
console.log(chalk.cyan(`\n🕸️ Integrating ${skill} into ClawGraph...`));
|
|
167
|
+
console.log(chalk.yellow("ClawGraph integration is coming soon!\n"));
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
program
|
|
171
|
+
.command("team-join <agent>")
|
|
172
|
+
.description("Register an agent to ClawTeam")
|
|
173
|
+
.action((agent) => {
|
|
174
|
+
console.log(chalk.cyan(`\n👥 Adding ${agent} to ClawTeam...`));
|
|
175
|
+
console.log(chalk.yellow("ClawTeam integration is coming soon!\n"));
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// Update command
|
|
179
|
+
|
|
180
|
+
program
|
|
181
|
+
.command("update")
|
|
182
|
+
.description("Update ClawFlow CLI to the latest version")
|
|
183
|
+
.action(updateCommand);
|
|
184
|
+
|
|
185
|
+
// Explore command
|
|
186
|
+
program
|
|
187
|
+
.command("explore")
|
|
188
|
+
.description("Explore available skills and agents on ClawHub")
|
|
189
|
+
.action(exploreCommand);
|
|
190
|
+
|
|
105
191
|
// Init command
|
|
106
192
|
program
|
|
107
|
-
.command(
|
|
108
|
-
.description(
|
|
109
|
-
.option(
|
|
193
|
+
.command("init")
|
|
194
|
+
.description("Initialize ClawFlow in the current directory")
|
|
195
|
+
.option("-f, --force", "Overwrite existing config")
|
|
110
196
|
.action(initCommand);
|
|
111
197
|
|
|
112
198
|
// Global error handler
|
|
113
|
-
process.on(
|
|
114
|
-
TUI.printError(
|
|
199
|
+
process.on("unhandledRejection", (err) => {
|
|
200
|
+
TUI.printError("เกิดข้อผิดพลาด: " + err.message);
|
|
115
201
|
if (process.env.DEBUG) {
|
|
116
202
|
console.error(err.stack);
|
|
117
203
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawflowbang",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "The ultimate CLI tool for Krab Ecosystem: Install skills, agents and automate cronjobs in one flow.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"clawflow": "bin/clawflowhub.js",
|
|
8
|
-
"cfh": "bin/clawflowhub.js"
|
|
9
|
-
},
|
|
6
|
+
"bin": {
|
|
7
|
+
"clawflow": "bin/clawflowhub.js",
|
|
8
|
+
"cfh": "bin/clawflowhub.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"bin",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
10
16
|
"scripts": {
|
|
11
17
|
"start": "node bin/clawflowhub.js",
|
|
12
18
|
"test": "jest",
|
|
@@ -15,14 +21,20 @@
|
|
|
15
21
|
"keywords": [
|
|
16
22
|
"openclaw",
|
|
17
23
|
"skill",
|
|
24
|
+
"agent",
|
|
18
25
|
"cron",
|
|
19
26
|
"installer",
|
|
20
27
|
"automation",
|
|
21
28
|
"clawhub",
|
|
22
|
-
"clawflow"
|
|
29
|
+
"clawflow",
|
|
30
|
+
"krab"
|
|
23
31
|
],
|
|
24
32
|
"author": "ClawFlow Team",
|
|
25
33
|
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/OpenKrab/ClawFlow"
|
|
37
|
+
},
|
|
26
38
|
"dependencies": {
|
|
27
39
|
"axios": "^1.5.0",
|
|
28
40
|
"boxen": "^8.0.1",
|
|
@@ -44,4 +56,4 @@
|
|
|
44
56
|
"engines": {
|
|
45
57
|
"node": ">=16.0.0"
|
|
46
58
|
}
|
|
47
|
-
}
|
|
59
|
+
}
|