clawforge-cli 1.2.0__py3-none-any.whl

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.
clawforge/__init__.py ADDED
File without changes
clawforge/cli.py ADDED
@@ -0,0 +1,24 @@
1
+ """ClawForge CLI entry point for pip/uv installation."""
2
+ import os
3
+ import sys
4
+ import subprocess
5
+
6
+ def main():
7
+ """Delegate to the real shell-based clawforge CLI."""
8
+ clawforge_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
9
+ clawforge_bin = os.path.join(clawforge_dir, "bin", "clawforge")
10
+
11
+ if not os.path.exists(clawforge_bin):
12
+ # Fallback: try PATH
13
+ clawforge_bin = "clawforge"
14
+
15
+ try:
16
+ result = subprocess.run([clawforge_bin] + sys.argv[1:])
17
+ sys.exit(result.returncode)
18
+ except FileNotFoundError:
19
+ print("Error: clawforge binary not found. Install from source:")
20
+ print(" git clone https://github.com/cyperx84/clawforge.git && cd clawforge && ./install.sh")
21
+ sys.exit(1)
22
+
23
+ if __name__ == "__main__":
24
+ main()
@@ -0,0 +1,325 @@
1
+ Metadata-Version: 2.4
2
+ Name: clawforge-cli
3
+ Version: 1.2.0
4
+ Summary: Multi-mode coding workflow CLI for orchestrating AI coding agents
5
+ Project-URL: Homepage, https://github.com/cyperx84/clawforge
6
+ Project-URL: Repository, https://github.com/cyperx84/clawforge
7
+ Author: cyperx84
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: agents,cli,coding,orchestration
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+
14
+ # ClawForge
15
+
16
+ ```text
17
+ ________ ______
18
+ / ____/ /___ __ __ / ____/___ _________ ____
19
+ / / / / __ `/ | /| / // /_ / __ \/ ___/ __ `/ _ \
20
+ / /___/ / /_/ /| |/ |/ // __/ / /_/ / / / /_/ / __/
21
+ \____/_/\__,_/ |__/|__//_/ \____/_/ \__, /\___/
22
+ /____/
23
+ ```
24
+
25
+ **Multi-mode coding workflow CLI** — from quick patches to parallel agent orchestration with Claude Code and Codex.
26
+
27
+ ## Inspired By
28
+
29
+ This project was inspired by [Elvis's "OpenClaw + Codex/Claude Code Agent Swarm" workflow](https://x.com/elvissun/article/2025920521871716562) — a battle-tested system for managing a fleet of AI coding agents.
30
+
31
+ ## What It Does
32
+
33
+ ClawForge manages coding agents running in tmux sessions on isolated git worktrees. Three workflow modes match task complexity:
34
+
35
+ | Mode | Use Case | Agents |
36
+ |------|----------|--------|
37
+ | **Sprint** | Single task, full dev cycle | 1 |
38
+ | **Review** | Quality gate on existing PR | 0 (analysis only) |
39
+ | **Swarm** | Parallel orchestration | N (decomposed) |
40
+
41
+ Plus management commands: `steer`, `attach`, `stop`, `watch --daemon`, `status`, `dashboard`.
42
+
43
+ ## Architecture
44
+
45
+ ```
46
+ clawforge CLI
47
+
48
+ ┌───────────────┼───────────────┐
49
+ │ │ │
50
+ Workflow Modes Management Direct Access
51
+ ┌───────────┐ ┌──────────┐ ┌──────────────┐
52
+ │ sprint │ │ status │ │ scope spawn │
53
+ │ review │ │ attach │ │ notify merge │
54
+ │ swarm │ │ steer │ │ clean learn │
55
+ └─────┬─────┘ │ stop │ └──────────────┘
56
+ │ │ watch │
57
+ │ │ dashboard│
58
+ │ └────┬─────┘
59
+ │ │
60
+ └──────┬───────┘
61
+
62
+ ┌─────────┼─────────┐
63
+ │ │ │
64
+ tmux git worktree gh CLI
65
+ sessions (isolated) (PRs/CI)
66
+
67
+ coding agents
68
+ (claude / codex)
69
+ ```
70
+
71
+ ## Installation
72
+
73
+ | Method | Command | Best For |
74
+ |--------|---------|----------|
75
+ | Homebrew | `brew install cyperx84/tap/clawforge` | macOS users (recommended) |
76
+ | npm | `npm install -g @cyperx84/clawforge` | Node.js users |
77
+ | uv | `uv tool install clawforge` | Python users |
78
+ | bun | `bun install -g @cyperx84/clawforge` | Bun users |
79
+ | Source | See below | Development |
80
+
81
+ ### Homebrew (recommended for macOS)
82
+
83
+ ```bash
84
+ brew tap cyperx84/tap
85
+ brew install cyperx84/tap/clawforge
86
+ ```
87
+
88
+ Upgrade later:
89
+
90
+ ```bash
91
+ brew update
92
+ brew upgrade clawforge
93
+ ```
94
+
95
+ ### npm / bun
96
+
97
+ ```bash
98
+ # npm
99
+ npm install -g @cyperx84/clawforge
100
+
101
+ # bun
102
+ bun install -g @cyperx84/clawforge
103
+ ```
104
+
105
+ Upgrade later:
106
+
107
+ ```bash
108
+ npm update -g @cyperx84/clawforge
109
+ # or
110
+ bun update -g @cyperx84/clawforge
111
+ ```
112
+
113
+ ### uv (Python)
114
+
115
+ ```bash
116
+ uv tool install clawforge
117
+ ```
118
+
119
+ Upgrade later:
120
+
121
+ ```bash
122
+ uv tool upgrade clawforge
123
+ ```
124
+
125
+ ### Source install
126
+
127
+ ```bash
128
+ git clone https://github.com/cyperx84/clawforge.git
129
+ cd clawforge
130
+ ./install.sh --openclaw
131
+ ```
132
+
133
+ That command will:
134
+ - symlink `clawforge` into `~/.local/bin`
135
+ - wire up `SKILL.md` for OpenClaw
136
+ - create missing directories if needed
137
+
138
+ ### Install modes
139
+
140
+ #### 1) OpenClaw skill mode
141
+
142
+ ```bash
143
+ ./install.sh --openclaw
144
+ ```
145
+
146
+ #### 2) Standalone CLI mode
147
+
148
+ ```bash
149
+ ./install.sh --standalone
150
+ ```
151
+
152
+ #### 3) Custom bin path
153
+
154
+ ```bash
155
+ ./install.sh --openclaw --bin-dir ~/.bin
156
+ ```
157
+
158
+ ### Manual install (if you prefer explicit symlinks)
159
+
160
+ ```bash
161
+ mkdir -p ~/.local/bin
162
+ ln -sf "$(pwd)/bin/clawforge" ~/.local/bin/clawforge
163
+
164
+ # Optional OpenClaw skill wiring
165
+ mkdir -p ~/.openclaw/skills/clawforge/scripts
166
+ ln -sf "$(pwd)/SKILL.md" ~/.openclaw/skills/clawforge/SKILL.md
167
+ ln -sf "$(pwd)/bin/clawforge" ~/.openclaw/skills/clawforge/scripts/clawforge
168
+ ```
169
+
170
+ ### Verify install
171
+
172
+ ```bash
173
+ clawforge version
174
+ clawforge help
175
+ ```
176
+
177
+ ### Prerequisites
178
+
179
+ - `bash` (4+), `jq`, `git`, `tmux`
180
+ - `gh` (GitHub CLI, authenticated)
181
+ - `claude` and/or `codex` CLI
182
+
183
+
184
+ ## Documentation
185
+
186
+ Full docs live in [`docs/`](./docs/README.md):
187
+
188
+ - [Getting Started](./docs/getting-started.md)
189
+ - [Workflow Modes](./docs/workflow-modes.md)
190
+ - [Command Reference](./docs/command-reference.md)
191
+ - [Scenario Playbooks](./docs/scenarios.md)
192
+ - [Dashboard (Go TUI)](./docs/dashboard.md)
193
+ - [Architecture](./docs/architecture.md)
194
+ - [Fleet Ops](./docs/fleet-ops.md)
195
+ - [Evaluation Loop](./docs/evaluation.md)
196
+ - [Configuration](./docs/configuration.md)
197
+ - [Troubleshooting](./docs/troubleshooting.md)
198
+ - [FAQ](./docs/faq.md)
199
+ - [Changelog](./CHANGELOG.md)
200
+
201
+ ## Quick Start
202
+
203
+ ### Sprint — the workhorse
204
+
205
+ ```bash
206
+ # Single agent, full dev cycle (auto-detects repo from cwd)
207
+ clawforge sprint "Add JWT authentication middleware"
208
+
209
+ # Quick patch mode — auto-merge, skip review
210
+ clawforge sprint "Fix typo in readme" --quick
211
+
212
+ # With explicit options
213
+ clawforge sprint ~/github/api "Fix null pointer" --branch fix/null-ptr --agent codex
214
+ ```
215
+
216
+ ### Review — quality gate
217
+
218
+ ```bash
219
+ clawforge review --pr 42
220
+ clawforge review --pr 42 --fix # Spawn agent to fix issues
221
+ clawforge review --pr 42 --reviewers claude,gemini,codex
222
+ ```
223
+
224
+ ### Swarm — parallel agents
225
+
226
+ ```bash
227
+ clawforge swarm "Migrate all tests from jest to vitest"
228
+ clawforge swarm "Add i18n to all strings" --max-agents 4
229
+ ```
230
+
231
+ ### Monitor & Manage
232
+
233
+ ```bash
234
+ clawforge status # Short IDs: #1, #2, #3
235
+ clawforge attach 1 # Attach to agent tmux session
236
+ clawforge steer 1 "Use bcrypt" # Course-correct running agent
237
+ clawforge steer 3.2 "Skip legacy" # Steer sub-agent 2 of swarm task 3
238
+ clawforge stop 1 --yes # Stop agent
239
+ clawforge watch --daemon # Background monitoring + CI feedback
240
+ clawforge dashboard # Full overview + system health
241
+ ```
242
+
243
+ ## Commands
244
+
245
+ ### Workflow Modes
246
+
247
+ | Command | Description | Key Flags |
248
+ |---------|-------------|-----------|
249
+ | `sprint` | Single agent, full dev cycle | `--quick`, `--branch`, `--agent`, `--auto-merge`, `--dry-run` |
250
+ | `review` | Quality gate on existing PR | `--pr`, `--fix`, `--reviewers`, `--dry-run` |
251
+ | `swarm` | Parallel multi-agent orchestration | `--max-agents`, `--agent`, `--auto-merge`, `--dry-run` |
252
+
253
+ ### Management
254
+
255
+ | Command | Description | Key Flags |
256
+ |---------|-------------|-----------|
257
+ | `status` | Show tracked tasks with short IDs | `--status` |
258
+ | `attach` | Attach to agent tmux session | (task ID) |
259
+ | `steer` | Course-correct running agent | (task ID, message) |
260
+ | `stop` | Stop a running agent | `--yes`, `--clean` |
261
+ | `watch` | Monitor agent health | `--daemon`, `--stop`, `--json`, `--interval` |
262
+ | `dashboard` | Overview + system health | (none) |
263
+ | `clean` | Clean up completed tasks | `--all-done`, `--stale-days`, `--dry-run` |
264
+ | `learn` | Record learnings | `--auto`, `--notes`, `--memory` |
265
+
266
+ ### Fleet Ops (v0.6)
267
+
268
+ | Command | Description | Key Flags |
269
+ |---------|-------------|-----------|
270
+ | `memory` | Per-repo agent memory | `show`, `add`, `search`, `forget`, `clear` |
271
+ | `init` | Scan project, generate initial memories | `--claude-md` |
272
+ | `history` | Show completed task history | `--repo`, `--mode`, `--limit`, `--all` |
273
+
274
+ ### Direct Module Access (via `clawforge help --all`)
275
+
276
+ | Command | Description |
277
+ |---------|-------------|
278
+ | `scope` | Assemble prompt with context |
279
+ | `spawn` | Create worktree + launch agent |
280
+ | `notify` | Send Discord notification |
281
+ | `merge` | Merge PR with safety checks |
282
+ | `run` | Scope + spawn in one step (legacy) |
283
+
284
+ **Global flag:** `--verbose` enables debug logging for any command.
285
+
286
+ ## Smart Behaviors
287
+
288
+ - **Auto-repo detection** — No `--repo` needed if you're in a git repo
289
+ - **Auto-branch naming** — `sprint/<slug>`, `quick/<slug>`, `swarm/<slug>` with collision detection
290
+ - **Short task IDs** — `#1`, `3.2` instead of full slugs
291
+ - **CI feedback loop** — Watch detects CI failure, auto-steers agent with error context (up to 2 retries)
292
+ - **Escalation suggestions** — Quick mode detects complex tasks, suggests full sprint
293
+ - **Conflict detection** — Dashboard warns when swarm agents touch overlapping files
294
+ - **RAM warnings** — Prompts when spawning >3 agents
295
+ - **Agent memory** — Per-repo knowledge base injected into agent prompts (max 20 entries)
296
+ - **Project init** — Auto-detect language, framework, test runner and seed memories
297
+
298
+ ## Configuration
299
+
300
+ Edit `config/defaults.json`:
301
+
302
+ ```json
303
+ {
304
+ "default_agent": "claude",
305
+ "default_model_claude": "claude-sonnet-4-5",
306
+ "default_model_codex": "gpt-5.3-codex",
307
+ "ci_retry_limit": 2,
308
+ "ram_warn_threshold": 3,
309
+ "reviewers": ["claude", "gemini"],
310
+ "auto_simplify": true,
311
+ "notify": {
312
+ "defaultChannel": "channel:..."
313
+ }
314
+ }
315
+ ```
316
+
317
+ ## Testing
318
+
319
+ ```bash
320
+ ./tests/run-all-tests.sh
321
+ ```
322
+
323
+ ## License
324
+
325
+ MIT
@@ -0,0 +1,7 @@
1
+ clawforge/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ clawforge/cli.py,sha256=5wTAE8vwjVWtgzg11-z_XqV3E6okhugF7Mf_N4NJAjw,798
3
+ clawforge_cli-1.2.0.dist-info/METADATA,sha256=vo-R1pNrF2q-P6QRQM0eo2PLpR7hDUY51uWYS8LlSiI,9475
4
+ clawforge_cli-1.2.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
5
+ clawforge_cli-1.2.0.dist-info/entry_points.txt,sha256=HraAmZm_4MWBtRZVvAyqaFCc0E4mA2rsGLD-Yrv8Wls,49
6
+ clawforge_cli-1.2.0.dist-info/licenses/LICENSE,sha256=duXwqXoMKU9SqNuI8PAJHbK_smLx__Fnn2hLNsZeGhA,1065
7
+ clawforge_cli-1.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ clawforge = clawforge.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 cyperx84
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.