@mdless/cli 1.2.1 → 1.3.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/anteloio/mdless-cli/main/assets/screenshot.png)
4
4
 
5
5
  **Mind less, ship more.**
6
6
 
@@ -8,83 +8,134 @@ 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:
12
14
 
13
15
  ```bash
14
- npx @mdless/cli
16
+ npx @mdless/cli@latest
15
17
  ```
16
18
 
19
+ Pass any command after it, for example:
20
+
21
+ ```bash
22
+ npx @mdless/cli@latest init
23
+ npx @mdless/cli@latest agent orchestrator --loop
24
+ ```
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:
64
106
 
65
107
  ```bash
66
- mdless work
108
+ mdless agent <name> --loop 2 # run twice, then exit
67
109
  ```
68
110
 
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.
111
+ #### Run an agent on a schedule
71
112
 
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>`
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:
122
+
123
+ ```bash
124
+ mdless agent <name> --every 1h --loop 3 # three runs, one hour apart
125
+ ```
75
126
 
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.
127
+ The startup sound plays once when the command starts, not before each run.
79
128
 
80
129
  ## 📋 Command reference
81
130
 
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 |
131
+ | Command | What it does |
132
+ | ------------------------------ | ------------------------------------------------------- |
133
+ | `mdless` | Interactive menu |
134
+ | `mdless init` | Copy the default agent prompts into `.mdless/agents/` |
135
+ | `mdless agent <name>` | Run a single agent once from `.mdless/agents/<name>.md` |
136
+ | `mdless agent <name> --loop` | Run the agent on repeat, forever |
137
+ | `mdless agent <name> --loop <n>` | Run the agent `<n>` times, then exit |
138
+ | `mdless agent <name> --every <interval>` | Run the agent on repeat, waiting `<interval>` between runs (eg `10m`) |
88
139
 
89
140
  ## 📄 License
90
141
 
Binary file
Binary file
Binary file