runtrim 0.1.14 → 0.1.16
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 +38 -205
- package/dist-cli/runtrim.cjs +14 -4
- package/dist-cli/runtrim.js +14 -4
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -1,243 +1,76 @@
|
|
|
1
1
|
# RunTrim
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
RunTrim is the control layer for AI coding agents.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It gives Claude, Codex, Cursor, ChatGPT, and other agents project memory, scoped contracts, MCP guidance, approval flow, and finish verification before changes are accepted.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
RunTrim is a CLI for developers using tools like Claude Code, Codex, Cursor, and ChatGPT. It sits in front of your coding run and helps you avoid risky, oversized, or context-wasting prompts.
|
|
10
|
-
|
|
11
|
-
## Why RunTrim exists
|
|
12
|
-
|
|
13
|
-
AI coding runs often fail for operational reasons, not model quality:
|
|
14
|
-
- tasks are too broad
|
|
15
|
-
- sensitive surfaces are touched by accident
|
|
16
|
-
- context is lost between sessions
|
|
17
|
-
- teams repeat failed attempts without a reliable run log
|
|
18
|
-
|
|
19
|
-
RunTrim adds structure before the run and continuity after the run.
|
|
20
|
-
|
|
21
|
-
## Daily loop
|
|
22
|
-
|
|
23
|
-
Recommended daily flow:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
runtrim go "your task"
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
RunTrim prepares a guarded prompt, copies it for your agent, records the run locally, and prints the next steps.
|
|
30
|
-
Paste the guarded prompt into your agent.
|
|
31
|
-
Keep the local panel open:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
runtrim panel --monitor
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
After edits:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
runtrim check
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
If context or usage runs out:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
runtrim continue --reason usage_limit
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Guided menu when unsure:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
runtrim start
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
`runtrim start` checks repo state and tells you the next safe command.
|
|
56
|
-
Free includes 1 tracked local repo.
|
|
57
|
-
|
|
58
|
-
Direct operator flow:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
runtrim go "fix checkout redirect"
|
|
62
|
-
runtrim panel --monitor
|
|
63
|
-
runtrim check
|
|
64
|
-
runtrim continue --reason usage_limit
|
|
65
|
-
runtrim memory
|
|
66
|
-
```
|
|
7
|
+
Website: https://www.runtrim.com
|
|
67
8
|
|
|
68
9
|
## Install
|
|
69
10
|
|
|
70
|
-
Global install for end users:
|
|
71
|
-
|
|
72
11
|
```bash
|
|
73
12
|
npm install -g runtrim
|
|
74
|
-
runtrim go "your task"
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Local preview for repository development:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
git clone https://github.com/michelpronkk-oss/rtrim
|
|
81
|
-
cd rtrim
|
|
82
|
-
npm install
|
|
83
|
-
npm run runtrim -- init
|
|
84
|
-
npm run runtrim -- start
|
|
85
13
|
```
|
|
86
14
|
|
|
87
|
-
##
|
|
88
|
-
|
|
89
|
-
Before publishing to npm:
|
|
90
|
-
|
|
91
|
-
1. `npm run build`
|
|
92
|
-
2. `npm run verify:cli`
|
|
93
|
-
3. `npm run verify:package`
|
|
94
|
-
4. `npm link`
|
|
95
|
-
5. `runtrim agent --help`
|
|
96
|
-
6. `runtrim go "test task" --no-sync`
|
|
97
|
-
7. `npm version patch`
|
|
98
|
-
8. `npm publish`
|
|
99
|
-
|
|
100
|
-
## What RunTrim does
|
|
101
|
-
|
|
102
|
-
- audits task scope before execution
|
|
103
|
-
- blocks unsafe mega-runs and suggests split-safe follow-ups
|
|
104
|
-
- generates guarded prompts with explicit stop rules
|
|
105
|
-
- monitors changed files during execution
|
|
106
|
-
- reviews changed files, risk flags, verification debt, and next safe action after edits
|
|
107
|
-
- shows current project memory, latest run state, and continuation guidance in `.runtrim/`
|
|
108
|
-
|
|
109
|
-
## Core commands
|
|
15
|
+
## Quickstart
|
|
110
16
|
|
|
111
17
|
```bash
|
|
112
|
-
|
|
113
|
-
runtrim go "<task>"
|
|
18
|
+
cd your-project
|
|
114
19
|
runtrim start
|
|
115
|
-
runtrim
|
|
116
|
-
runtrim
|
|
117
|
-
runtrim panel --monitor
|
|
118
|
-
runtrim check
|
|
119
|
-
runtrim continue --reason usage_limit
|
|
120
|
-
runtrim memory
|
|
121
|
-
runtrim sync
|
|
20
|
+
runtrim agent "Fix the homepage copy" --copy
|
|
21
|
+
runtrim finish
|
|
122
22
|
```
|
|
123
23
|
|
|
124
|
-
|
|
24
|
+
## Primary flow
|
|
125
25
|
|
|
126
|
-
|
|
127
|
-
runtrim
|
|
128
|
-
|
|
129
|
-
runtrim
|
|
130
|
-
runtrim panel --monitor
|
|
131
|
-
runtrim check
|
|
132
|
-
runtrim continue --reason usage_limit
|
|
133
|
-
```
|
|
26
|
+
1. `runtrim start` analyzes the project and prepares local RunTrim memory and instructions.
|
|
27
|
+
2. `runtrim agent "task" --copy` creates a guarded run and handoff prompt for your coding agent.
|
|
28
|
+
3. Agent completes the task inside contract scope.
|
|
29
|
+
4. `runtrim finish` verifies scope and sensitive-file safety with a clear verdict: `PASS`, `WARN`, or `BLOCKED`.
|
|
134
30
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Guarded prepare flow:
|
|
31
|
+
If scope needs to expand safely:
|
|
138
32
|
|
|
139
33
|
```bash
|
|
140
|
-
runtrim
|
|
34
|
+
runtrim approve "Allow <path or scope> for this run only"
|
|
141
35
|
```
|
|
142
36
|
|
|
143
|
-
|
|
37
|
+
## MCP (optional)
|
|
144
38
|
|
|
145
39
|
```bash
|
|
146
|
-
runtrim
|
|
40
|
+
runtrim mcp instructions
|
|
41
|
+
runtrim mcp config --print
|
|
42
|
+
runtrim mcp start
|
|
147
43
|
```
|
|
148
44
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
Use `runtrim panel` to open a local browser panel on localhost.
|
|
152
|
-
Use `runtrim panel --monitor` to open the same local panel with live git change monitoring.
|
|
45
|
+
MCP lets compatible agents use RunTrim tools like contract creation, path checks, approval suggestions, and finish guidance.
|
|
153
46
|
|
|
154
|
-
|
|
155
|
-
Quick keys in panel:
|
|
156
|
-
- `p` prepare
|
|
157
|
-
- `g` guard
|
|
158
|
-
- `c` check
|
|
159
|
-
- `m` memory
|
|
160
|
-
- `r` report
|
|
161
|
-
- `s` sync
|
|
162
|
-
- `q` quit
|
|
47
|
+
## Local-first trust model
|
|
163
48
|
|
|
164
|
-
|
|
49
|
+
- Free CLI runs locally.
|
|
50
|
+
- Source code stays local by default.
|
|
51
|
+
- RunTrim does not read env file contents.
|
|
52
|
+
- Ignored `.env.local` is warned and reported, not read.
|
|
53
|
+
- Sensitive tracked/changed or unignored sensitive files still block finish.
|
|
165
54
|
|
|
166
|
-
|
|
55
|
+
## Plans and sync
|
|
167
56
|
|
|
168
|
-
|
|
57
|
+
- Free: local control flow and local history.
|
|
58
|
+
- Pro+: cloud sync and hosted dashboard history.
|
|
169
59
|
|
|
170
|
-
##
|
|
171
|
-
|
|
172
|
-
When a run stops due to usage or context limits:
|
|
60
|
+
## Core commands
|
|
173
61
|
|
|
174
62
|
```bash
|
|
175
|
-
runtrim
|
|
63
|
+
runtrim start
|
|
64
|
+
runtrim agent "Your task" --copy
|
|
65
|
+
runtrim finish
|
|
66
|
+
runtrim approve "Allow <scope> for this run only"
|
|
67
|
+
runtrim status
|
|
68
|
+
runtrim mcp instructions
|
|
69
|
+
runtrim bridge status
|
|
176
70
|
```
|
|
177
71
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
## Project memory
|
|
181
|
-
|
|
182
|
-
`runtrim memory` shows where the project currently stands:
|
|
183
|
-
- latest task and run status
|
|
184
|
-
- changed files
|
|
185
|
-
- missing proof
|
|
186
|
-
- protected areas
|
|
187
|
-
- next safe action
|
|
188
|
-
|
|
189
|
-
## Sync V0 private beta
|
|
190
|
-
|
|
191
|
-
Cloud sync is private beta and metadata-only.
|
|
192
|
-
|
|
193
|
-
Sync can upload:
|
|
194
|
-
- project name and status
|
|
195
|
-
- run status and risk metadata
|
|
196
|
-
- RunTrim-generated prompts
|
|
197
|
-
- changed file paths
|
|
198
|
-
- project memory summaries
|
|
199
|
-
- timestamps and estimated savings
|
|
200
|
-
|
|
201
|
-
Sync does not intentionally upload:
|
|
202
|
-
- source code
|
|
203
|
-
- `.env` values
|
|
204
|
-
- secret file contents
|
|
72
|
+
Advanced/lower-level command (still supported):
|
|
205
73
|
|
|
206
74
|
```bash
|
|
207
|
-
runtrim
|
|
208
|
-
runtrim config set dashboard-url https://www.runtrim.com/app
|
|
209
|
-
runtrim sync
|
|
75
|
+
runtrim go "Your task"
|
|
210
76
|
```
|
|
211
|
-
|
|
212
|
-
## Privacy model
|
|
213
|
-
|
|
214
|
-
RunTrim Free runs locally and stores state in `.runtrim`.
|
|
215
|
-
Free includes 1 tracked local repo. Builder early access supports unlimited tracked repos.
|
|
216
|
-
A tracked repo is one codebase with its own `.runtrim` workspace.
|
|
217
|
-
|
|
218
|
-
V1 is designed so source code is not uploaded. Cloud sync stores metadata only when enabled.
|
|
219
|
-
|
|
220
|
-
See:
|
|
221
|
-
- https://www.runtrim.com/privacy
|
|
222
|
-
- https://www.runtrim.com/security
|
|
223
|
-
|
|
224
|
-
## Status
|
|
225
|
-
|
|
226
|
-
RunTrim is in early V1.
|
|
227
|
-
|
|
228
|
-
Free local CLI is available. Cloud sync and hosted dashboard access are private beta.
|
|
229
|
-
|
|
230
|
-
## Roadmap
|
|
231
|
-
|
|
232
|
-
- npm package launch hardening
|
|
233
|
-
- stronger local policy presets
|
|
234
|
-
- richer post-run verification workflows
|
|
235
|
-
- expanded cloud memory rollout
|
|
236
|
-
|
|
237
|
-
## Packaging
|
|
238
|
-
|
|
239
|
-
```bash
|
|
240
|
-
npm run build
|
|
241
|
-
npm run build:cli
|
|
242
|
-
npm pack --dry-run
|
|
243
|
-
```
|
package/dist-cli/runtrim.cjs
CHANGED
|
@@ -10845,6 +10845,9 @@ async function syncRunsToCloud(input) {
|
|
|
10845
10845
|
});
|
|
10846
10846
|
const body = await res.json().catch(() => ({}));
|
|
10847
10847
|
if (!res.ok || !body.ok) {
|
|
10848
|
+
if (res.status === 401 || res.status === 403) {
|
|
10849
|
+
return { status: "skipped_invalid_token" };
|
|
10850
|
+
}
|
|
10848
10851
|
if (markPendingRunIds && markPendingRunIds.length > 0) {
|
|
10849
10852
|
for (const id of markPendingRunIds) updateRun(id, { pendingSync: true }, cwd);
|
|
10850
10853
|
}
|
|
@@ -11420,18 +11423,25 @@ program.command("sync").description("Sync local run history and project memory t
|
|
|
11420
11423
|
runs
|
|
11421
11424
|
});
|
|
11422
11425
|
if (result.status !== "synced") {
|
|
11423
|
-
spinner.fail(" Sync failed.");
|
|
11424
|
-
console.log("");
|
|
11425
11426
|
if (result.status === "skipped_no_token") {
|
|
11426
|
-
|
|
11427
|
+
spinner.stop();
|
|
11428
|
+
console.log("");
|
|
11429
|
+
console.log(DIM(" Cloud sync not configured."));
|
|
11427
11430
|
console.log(DIM(" Run ") + GO_ACCENT("runtrim login") + DIM(" to connect cloud sync."));
|
|
11428
11431
|
console.log(DIM(" Local CLI still works without a token."));
|
|
11429
11432
|
} else if (result.status === "skipped_invalid_token") {
|
|
11430
|
-
|
|
11433
|
+
spinner.stop();
|
|
11434
|
+
console.log("");
|
|
11435
|
+
console.log(DIM(" Cloud sync not configured. Run saved locally."));
|
|
11436
|
+
console.log(DIM(" Re-run: runtrim login"));
|
|
11431
11437
|
} else if (result.error) {
|
|
11438
|
+
spinner.fail(" Sync failed.");
|
|
11439
|
+
console.log("");
|
|
11432
11440
|
console.log(chalk.red(" Error: ") + chalk.white(result.error));
|
|
11433
11441
|
if (result.details) console.log(chalk.red(" Details: ") + chalk.white(result.details));
|
|
11434
11442
|
} else {
|
|
11443
|
+
spinner.fail(" Sync failed.");
|
|
11444
|
+
console.log("");
|
|
11435
11445
|
console.log(chalk.yellow(" Failed. Run saved locally. Use runtrim sync later."));
|
|
11436
11446
|
}
|
|
11437
11447
|
console.log("");
|
package/dist-cli/runtrim.js
CHANGED
|
@@ -10824,6 +10824,9 @@ async function syncRunsToCloud(input) {
|
|
|
10824
10824
|
});
|
|
10825
10825
|
const body = await res.json().catch(() => ({}));
|
|
10826
10826
|
if (!res.ok || !body.ok) {
|
|
10827
|
+
if (res.status === 401 || res.status === 403) {
|
|
10828
|
+
return { status: "skipped_invalid_token" };
|
|
10829
|
+
}
|
|
10827
10830
|
if (markPendingRunIds && markPendingRunIds.length > 0) {
|
|
10828
10831
|
for (const id of markPendingRunIds) updateRun(id, { pendingSync: true }, cwd);
|
|
10829
10832
|
}
|
|
@@ -11399,18 +11402,25 @@ program.command("sync").description("Sync local run history and project memory t
|
|
|
11399
11402
|
runs
|
|
11400
11403
|
});
|
|
11401
11404
|
if (result.status !== "synced") {
|
|
11402
|
-
spinner.fail(" Sync failed.");
|
|
11403
|
-
console.log("");
|
|
11404
11405
|
if (result.status === "skipped_no_token") {
|
|
11405
|
-
|
|
11406
|
+
spinner.stop();
|
|
11407
|
+
console.log("");
|
|
11408
|
+
console.log(DIM(" Cloud sync not configured."));
|
|
11406
11409
|
console.log(DIM(" Run ") + GO_ACCENT("runtrim login") + DIM(" to connect cloud sync."));
|
|
11407
11410
|
console.log(DIM(" Local CLI still works without a token."));
|
|
11408
11411
|
} else if (result.status === "skipped_invalid_token") {
|
|
11409
|
-
|
|
11412
|
+
spinner.stop();
|
|
11413
|
+
console.log("");
|
|
11414
|
+
console.log(DIM(" Cloud sync not configured. Run saved locally."));
|
|
11415
|
+
console.log(DIM(" Re-run: runtrim login"));
|
|
11410
11416
|
} else if (result.error) {
|
|
11417
|
+
spinner.fail(" Sync failed.");
|
|
11418
|
+
console.log("");
|
|
11411
11419
|
console.log(chalk.red(" Error: ") + chalk.white(result.error));
|
|
11412
11420
|
if (result.details) console.log(chalk.red(" Details: ") + chalk.white(result.details));
|
|
11413
11421
|
} else {
|
|
11422
|
+
spinner.fail(" Sync failed.");
|
|
11423
|
+
console.log("");
|
|
11414
11424
|
console.log(chalk.yellow(" Failed. Run saved locally. Use runtrim sync later."));
|
|
11415
11425
|
}
|
|
11416
11426
|
console.log("");
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runtrim",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.16",
|
|
4
|
+
"description": "The control layer for AI coding agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "RunTrim",
|
|
7
|
-
"homepage": "https://runtrim.
|
|
7
|
+
"homepage": "https://www.runtrim.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/michelpronkk-oss/rtrim.git"
|
|
@@ -15,11 +15,15 @@
|
|
|
15
15
|
"keywords": [
|
|
16
16
|
"cli",
|
|
17
17
|
"ai-coding",
|
|
18
|
+
"coding-agents",
|
|
18
19
|
"codex",
|
|
19
20
|
"claude",
|
|
20
21
|
"cursor",
|
|
22
|
+
"mcp",
|
|
21
23
|
"developer-tools",
|
|
22
|
-
"
|
|
24
|
+
"agent-control",
|
|
25
|
+
"code-safety",
|
|
26
|
+
"ai-agents"
|
|
23
27
|
],
|
|
24
28
|
"bin": {
|
|
25
29
|
"runtrim": "dist-cli/runtrim.cjs"
|