Skip to content

Commit 4bc34ce

Browse files
Update README with ClawMemory-style formatting and comprehensive documentation
1 parent c9cef28 commit 4bc34ce

1 file changed

Lines changed: 162 additions & 49 deletions

File tree

README.md

Lines changed: 162 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,52 @@
1-
# ClawFlow
1+
# 🦞 ClawFlow
22

3-
`ClawFlow` is a CLI wrapper for OpenClaw that installs skill bundles and wires cron jobs in one flow.
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.
45

5-
Published package: `clawflowbang`
6-
Primary command: `clawflow` (alias: `cfh`)
6+
<p align="center">
7+
<img src="/public/banner.png" alt="ClawFlow Banner" width="700">
8+
</p>
79

8-
## What It Does
10+
## Features
911

10-
- Install package presets (skills + cron jobs) with one command.
11-
- Install skills from ClawHub first, then fallback to Git clone if not found.
12-
- Manage cron jobs through `openclaw cron` (add/edit/remove/list).
13-
- Validate and normalize cron expressions before save.
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
1419

15-
## Requirements
20+
---
1621

17-
- Node.js `>=16`
22+
## Quick Start
23+
24+
### Prerequisites
25+
26+
- Node.js 16+
1827
- OpenClaw CLI (`openclaw`)
19-
- ClawHub CLI (`clawhub`) for registry skill install
20-
- Git (used for fallback clone)
28+
- ClawHub CLI (`clawhub`) for registry access
29+
- Git (for fallback installation)
2130

22-
## Install
31+
### Installation
2332

2433
```bash
2534
npm i -g clawflowbang
2635
```
2736

28-
Check:
37+
Verify installation:
2938

3039
```bash
3140
clawflow --version
3241
```
3342

34-
## Quick Start
35-
36-
Initialize local config:
43+
### Initial Setup
3744

3845
```bash
3946
clawflow init
4047
```
4148

42-
Install a package preset:
49+
### Install Your First Package
4350

4451
```bash
4552
clawflow install trading-kit
@@ -51,29 +58,39 @@ Check status:
5158
clawflow status
5259
```
5360

54-
## Main Commands
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
5575

5676
```bash
57-
clawflow install <package>
58-
clawflow list [--available] [--npm]
59-
clawflow search <query> [--no-npm]
60-
clawflow remove <package>
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
6681
```
6782

83+
---
84+
6885
## Cron Input Formats
6986

7087
Supported formats:
7188

72-
- Raw cron: `*/5 * * * *`
73-
- Preset: `@hourly`, `@daily`, `@weekly`, `@monthly`
74-
- Shorthand: `5m`, `every 15m`, `1h`, `2d`
89+
- **Raw cron**: `*/5 * * * *`
90+
- **Preset**: `@hourly`, `@daily`, `@weekly`, `@monthly`
91+
- **Shorthand**: `5m`, `every 15m`, `1h`, `2d`
7592

76-
Examples:
93+
### Examples
7794

7895
```bash
7996
clawflow cron-add crypto-price --every 15m
@@ -82,36 +99,47 @@ clawflow cron-edit <job-id> --params '{"symbols":["BTC","ETH"]}'
8299
clawflow cron-remove <job-id>
83100
```
84101

85-
## Skill Install Fallback (ClawHub -> Git)
102+
---
86103

87-
When installing package skills:
104+
## Installation Flow
88105

89-
1. Try `clawhub install`
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
92107

93-
Skill metadata fields for git fallback:
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
94111

95-
- `repository` or `repo` or `git`
96-
- optional `branch` / `tag` / `ref`
112+
### Git Fallback Metadata
97113

98-
## Paths Used by Default
114+
Required fields in package metadata:
99115

100-
- Skills path: `~/.openclaw/workspace/skills`
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`
101126
- Cron jobs file: `~/.openclaw/cron/jobs.json`
102127

103-
Override during install:
128+
### Custom Paths
129+
130+
Override defaults during installation:
104131

105132
```bash
106133
clawflow install <package> \
107134
--skills-path "<path-to-skills>" \
108135
--cron-jobs "<path-to-jobs.json>"
109136
```
110137

111-
## NPM Package Preset Format
138+
---
139+
140+
## NPM Package Format
112141

113-
`clawflow` can read package metadata from npm packages.
114-
Use `clawflow` field in package.json:
142+
`clawflow` reads package metadata from npm packages using the `clawflow` field:
115143

116144
```json
117145
{
@@ -138,14 +166,99 @@ Use `clawflow` field in package.json:
138166
}
139167
```
140168

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+
141206
## Development
142207

208+
### Setup
209+
143210
```bash
211+
git clone https://github.com/OpenKrab/ClawFlowHub.git
212+
cd ClawFlowHub
144213
npm install
145-
npm run lint
146-
npm test -- --runInBand
147214
```
148215

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+
149258
## License
150259

151260
MIT
261+
262+
---
263+
264+
*Built for the Lobster Way 🦞*

0 commit comments

Comments
 (0)