Skip to content

Commit 058ba0b

Browse files
author
diego-marinho
committed
Polish docs and help text
1 parent 35335f4 commit 058ba0b

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[package]
33
name = "loopmux"
4-
version = "0.1.5"
4+
version = "0.1.6"
55
edition = "2024"
66
description = "Loop prompts into tmux panes with triggers and delays."
77
license = "MIT"

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44

55
Loop prompts into tmux panes with triggers, delays, and branching rules. Built to automate iterative workflows for code assistants running in tmux (OpenCode, Codex, Claude Code).
66

7-
## Why loopmux
7+
## Why loopmux
88
loopmux watches tmux output and injects prompts when a trigger matches. You can chain flows, add pre/post blocks, and control delays so your iterations feel deliberate instead of spammy.
99

10-
## Features
10+
## Features
1111
- YAML config with `pre`, `prompt`, `post` blocks
1212
- Ordered rule evaluation with `first_match`, `priority`, or `multi_match`
1313
- Include/exclude match criteria (regex/contains/starts_with)
1414
- Delay strategies: fixed, range, jitter, backoff
1515
- Mid-flight loop runner (tmux capture + send)
1616
- Structured logging (text or JSONL)
1717

18-
## Supported Code Assistants
18+
## 🤝 Supported Code Assistants
1919
loopmux is tmux-first and backend-agnostic. If your assistant runs in a tmux pane, loopmux can target it.
2020

2121
Example tmux targets:
2222
- OpenCode: `ai:5.0`
2323
- Codex: `codex:1.0`
2424
- Claude Code: `claude:2.0`
2525

26-
## Install
26+
## 📦 Install
2727

2828
### Homebrew
2929
```bash
@@ -39,34 +39,36 @@ cargo build --release
3939
./target/release/loopmux --help
4040
```
4141

42-
## Quick Start
42+
## Quick Start
4343

44-
1) Create a config:
44+
If you just want to try it, this is the fastest path.
45+
46+
1) 🧩 Create a config:
4547
```bash
4648
loopmux init --output loop.yaml
4749
```
4850

49-
2) Update the tmux target and rules in `loop.yaml`.
51+
2) 🎯 Update the tmux target and rules in `loop.yaml`.
5052

51-
3) Validate config:
53+
3) Validate config:
5254
```bash
5355
loopmux validate --config loop.yaml
5456
```
5557

56-
4) Run the loop:
58+
4) ▶️ Run the loop:
5759
```bash
5860
loopmux run --config loop.yaml
5961
```
6062

61-
### Quick Run (no YAML)
63+
### Quick Run (no YAML)
6264
```bash
6365
loopmux run -t ai:5.0 -n 5 \
6466
--prompt "Do the next iteration." \
6567
--trigger "Concluded|What is next" \
6668
--once
6769
```
6870

69-
## Configuration
71+
## 🧭 Configuration
7072

7173
### Minimal example
7274
```yaml
@@ -146,7 +148,7 @@ logging:
146148
- `jitter`: range plus +/- jitter factor (0.0..1.0).
147149
- `backoff`: exponential backoff using `base`, `factor`, `max`.
148150

149-
## CLI
151+
## 🧰 CLI
150152

151153
```text
152154
loopmux run --config loop.yaml [--target ai:5.0] [--iterations 10]
@@ -158,7 +160,7 @@ loopmux simulate --line "Concluded" [--sleep 5] [--repeat N]
158160
loopmux run --config loop.yaml --duration 2h
159161
```
160162

161-
## Lean Mode (no YAML)
163+
## Lean Mode (no YAML)
162164

163165
Use inline flags to run a quick loop without a config file.
164166

@@ -199,7 +201,7 @@ duration: 2h
199201
- `-t 2.1` expands to `current_session:2.1`
200202
- Shorthand requires tmux; otherwise provide full `session:window.pane`.
201203

202-
## Simulation
204+
## 🧪 Simulation
203205

204206
Use `simulate` to print a line after a delay in the pane loopmux is watching.
205207

@@ -222,7 +224,7 @@ Output format (timestamp prefixed):
222224
```
223225
```
224226
225-
## Troubleshooting
227+
## 🛠️ Troubleshooting
226228
227229
### tmux target not found
228230
- Verify the target: `tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index}'`

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ enum Command {
3939

4040
#[derive(Debug, Parser)]
4141
#[command(
42-
after_help = "Lean mode (no YAML):\n loopmux run -t ai:5.0 -n 5 --prompt \"Do the next iteration.\" --trigger \"Concluded|What is next\" --once\n loopmux run -t ai:5.0 -n 5 --prompt \"Do the next iteration.\" --trigger \"Concluded|What is next\" --exclude \"PROD\"\n\nLean flags:\n --prompt Required prompt body\n --trigger Required regex to match tmux output\n --exclude Optional regex to skip matches\n --pre Optional pre block\n --post Optional post block\n --once Send a single prompt and exit\n --tail N Capture-pane lines (default 1)\n --poll N Poll interval in seconds (default 5)\n --duration D Run time limit (e.g. 5m, 2h)\n --single-line Update status output on one line\n\nDuration units: s, m, h, d, w, mon (30d), y (365d)\n\nCommon flags:\n -t, --target tmux target session:window.pane\n -n, --iterations number of iterations\n"
42+
after_help = "Examples:\n loopmux run -t ai:5.0 -n 5 --prompt \"Do the next iteration.\" --trigger \"Concluded|What is next\" --once\n loopmux run -t ai:5.0 -n 5 --prompt \"Do the next iteration.\" --trigger \"Concluded|What is next\" --exclude \"PROD\"\n loopmux run --config loop.yaml --duration 2h\n\nDefaults:\n tail=1 (last non-blank line)\n poll=5s\n\nDuration units: s, m, h, d, w, mon (30d), y (365d)\n"
4343
)]
4444
struct RunArgs {
4545
/// Path to the YAML config file.

0 commit comments

Comments
 (0)