@mdless/cli 1.2.1 → 1.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mdless/cli
2
2
 
3
- ![mdless cli screenshot](https://raw.githubusercontent.com/mdless/mdless-cli/main/assets/screenshot.png)
3
+ ![mdless cli screenshot](https://raw.githubusercontent.com/mdless/mdless/main/apps/cli/assets/screenshot.png)
4
4
 
5
5
  **Mind less, ship more.**
6
6
 
@@ -8,83 +8,149 @@ Run custom Claude Code agent loops from plain markdown prompts in your repo.
8
8
 
9
9
  ## 📦 Installation
10
10
 
11
- #### Run instantly with npx
11
+ #### Run with npx (recommended)
12
+
13
+ Nothing to install. This command always runs the latest version:
14
+
15
+ ```bash
16
+ npx @mdless/cli@latest
17
+ ```
18
+
19
+ Pass any command after it, for example:
12
20
 
13
21
  ```bash
14
- npx @mdless/cli
22
+ npx @mdless/cli@latest init
23
+ npx @mdless/cli@latest agent orchestrator --loop
15
24
  ```
16
25
 
26
+ Keep `@latest` in the command. Without it, npx can reuse an old copy that it saved before.
27
+
17
28
  #### Install globally with npm
18
29
 
19
30
  ```bash
20
31
  npm install -g @mdless/cli
21
32
  ```
22
33
 
34
+ Then run `mdless` from any folder. Run the same command again to update.
35
+
36
+ #### Requirements
37
+
38
+ - Node.js 20.17 or newer
39
+ - [Claude Code](https://code.claude.com/docs/en/overview) (the `claude` command), to run agents
40
+
41
+ The examples below use `mdless`. With npx, write `npx @mdless/cli@latest` instead.
42
+
23
43
  ## 🧠 The idea
24
44
 
25
45
  An **agent is just a markdown file**. Drop your prompts into `.mdless/agents/` and
26
- each file becomes a looping Claude Code agent.
46
+ each file becomes a Claude Code agent you can run once or on a loop.
27
47
 
28
48
  ```
29
49
  .mdless/
30
- └── agents/
31
- ├── curator.md → agent "curator"
32
- ├── developer.md → agent "developer"
33
- └── reviewer.md → agent "reviewer"
50
+ ├── agents/
51
+ │ └── orchestrator.md → agent "orchestrator"
52
+ └── learnings/
53
+ └── connect-to-sentry.md → persisted know-how
34
54
  ```
35
55
 
36
56
  - One markdown file = one agent.
37
- - The **file name is the agent name** (`reviewer.md` → `reviewer`).
57
+ - The **file name is the agent name** (`orchestrator.md` → `orchestrator`).
38
58
  - The file contents are the agent's prompt — write whatever instructions you want.
39
59
 
40
- Get started with the bundled defaults:
60
+ ### Learnings
61
+
62
+ Every agent automatically reads `.mdless/learnings/` at the start of each session
63
+ and is prompted to save new findings there before finishing. This lets the agent
64
+ accumulate codebase-specific knowledge across sessions — workarounds, environment
65
+ quirks, scripts that work around broken MCP servers, and anything else it discovers.
66
+
67
+ Create a learning manually or let the agent write its own:
68
+
69
+ ```
70
+ .mdless/learnings/connect-to-sentry.md
71
+ .mdless/learnings/run-migrations.md
72
+ ```
73
+
74
+ Get started with the bundled default:
41
75
 
42
76
  ```bash
43
77
  mdless init
44
78
  ```
45
79
 
46
- This copies a few example prompts into `.mdless/agents/`. Edit them, rename them,
47
- add your own — anything in that folder counts as an agent.
80
+ This copies the default `orchestrator` prompt into `.mdless/agents/` — a single
81
+ coordinator that drains a GitHub-backed pipeline (file issues, implement, review,
82
+ fix, remediate) by spawning ephemeral workers. Edit it, rename it, or add your
83
+ own files — anything in that folder counts as an agent.
48
84
 
49
85
  ## 🚀 Running agents
50
86
 
51
- #### Run a single agent
87
+ #### Run an agent once
52
88
 
53
89
  ```bash
54
90
  mdless agent <name>
55
91
  ```
56
92
 
57
- Runs the agent in `.mdless/agents/<name>.md` on a loop: it executes Claude Code,
58
- waits, then runs again. For example, `mdless agent reviewer` loops
59
- `.mdless/agents/reviewer.md`.
93
+ Runs the agent in `.mdless/agents/<name>.md` a single time. For example,
94
+ `mdless agent reviewer` runs `.mdless/agents/reviewer.md` once and exits.
60
95
 
61
- Logs are written to `.mdless/logs/<name>.log`. Stop with `Ctrl-C`.
96
+ #### Run an agent on a loop
62
97
 
63
- #### Run every agent at once (tmux)
98
+ ```bash
99
+ mdless agent <name> --loop
100
+ ```
101
+
102
+ Runs the agent on repeat: it executes Claude Code, waits, then runs again,
103
+ indefinitely. Stop with `Ctrl-C`.
104
+
105
+ Pass a count to cap the number of runs:
106
+
107
+ ```bash
108
+ mdless agent <name> --loop 2 # run twice, then exit
109
+ ```
110
+
111
+ #### Run an agent on a schedule
112
+
113
+ ```bash
114
+ mdless agent <name> --every 10m
115
+ ```
116
+
117
+ Runs the agent on repeat and waits the given time between runs. The wait starts
118
+ when a run ends. Use `s`, `m`, `h` or `d`, or combine them: `30s`, `10m`, `2h`,
119
+ `1d`, `1h30m`. Stop with `Ctrl-C`.
120
+
121
+ Add `--loop <n>` to cap the number of runs:
64
122
 
65
123
  ```bash
66
- mdless work
124
+ mdless agent <name> --every 1h --loop 3 # three runs, one hour apart
67
125
  ```
68
126
 
69
- Discovers every prompt in `.mdless/agents/` and launches each one as its own
70
- looping agent inside a single tmux session, split side by side.
127
+ The startup sound plays once when the command starts, not before each run.
71
128
 
72
- - Detach from the session: `Ctrl-b d`
73
- - Re-attach later: just run `mdless work` again
74
- - Kill everything: `tmux kill-session -t mdless-<repo>`
129
+ ## 🖼️ Evidence for pull requests
130
+
131
+ Agents that open a PR show proof that the work is done: screenshots for UI changes, a diagram for the rest, and the output of the checks.
132
+
133
+ ```bash
134
+ mdless evidence render .mdless-evidence/flow.html .mdless-evidence/flow.png # HTML → PNG, headless Chrome
135
+ mdless evidence publish .mdless-evidence/*.png # prints ![flow](https://github.com/...)
136
+ ```
75
137
 
76
- `mdless work` must be run inside a git repository and needs `tmux`, `gh`
77
- (authenticated), and `claude` available on your `PATH`. Missing tools are
78
- installed automatically where possible.
138
+ - `render` needs Chrome or Chromium. Set `MDLESS_CHROME` to use another Chromium-based browser. `--width` and `--height` set the size (default 1200×800).
139
+ - `publish` commits the images to `<branch>/` on an orphan `mdless-evidence` branch and pushes it. The PR diff stays clean. `--branch` overrides the current branch.
140
+ - `.mdless-evidence/` is kept out of git: `mdless init` adds it to `.gitignore`, and `render` adds it to `.git/info/exclude`.
79
141
 
80
142
  ## 📋 Command reference
81
143
 
82
- | Command | What it does |
83
- | --------------------- | ------------------------------------------------------- |
84
- | `mdless` | Interactive menu |
85
- | `mdless init` | Copy the default agent prompts into `.mdless/agents/` |
86
- | `mdless agent <name>` | Loop a single agent from `.mdless/agents/<name>.md` |
87
- | `mdless work` | Loop every agent in `.mdless/agents/` in a tmux session |
144
+ | Command | What it does |
145
+ | ------------------------------ | ------------------------------------------------------- |
146
+ | `mdless` | Interactive menu |
147
+ | `mdless init` | Copy the default agent prompts into `.mdless/agents/` |
148
+ | `mdless agent <name>` | Run a single agent once from `.mdless/agents/<name>.md` |
149
+ | `mdless agent <name> --loop` | Run the agent on repeat, forever |
150
+ | `mdless agent <name> --loop <n>` | Run the agent `<n>` times, then exit |
151
+ | `mdless agent <name> --every <interval>` | Run the agent on repeat, waiting `<interval>` between runs (eg `10m`) |
152
+ | `mdless evidence render <html> <png>` | Render an HTML file to a PNG with headless Chrome |
153
+ | `mdless evidence publish <png...>` | Push images to the `mdless-evidence` branch and print Markdown links |
88
154
 
89
155
  ## 📄 License
90
156
 
Binary file
Binary file
Binary file