context-carwash 0.1.7 → 0.1.8
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/CHANGELOG.md +4 -0
- package/README.md +23 -71
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.8
|
|
4
|
+
|
|
5
|
+
- Shorter, clearer README.
|
|
6
|
+
|
|
3
7
|
## 0.1.7
|
|
4
8
|
|
|
5
9
|
- `carwash doctor` checks that the Node Carwash runs with is still there, and says how to fix it if not. Removing that Node, for example an old version in nvm, stops the meter and `/wash` until install is run again. The installer now says which Node that is.
|
package/README.md
CHANGED
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
# Context Carwash
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Context Carwash adds a line to Claude Code in your terminal that:
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Nothing happens automatically, and nothing about you is ever sent. Carwash goes online only for these: once a day it reads its own public page on npm to see if a newer version is out (you can turn that off); `install` and `doctor` read the same page when you run them, and `install` downloads the newer version if there is one; and `carwash stats --share` sends anonymous totals if you run it and say yes.
|
|
9
|
-
|
|
10
|
-
**Status:** pre-release. The meter and the typed `/wash` command work today. Clickable links in the status line and the one-step restart are not built yet. See [plan-3.md](plan-3.md) for the design.
|
|
5
|
+
1. Shows the current conversation's context size.
|
|
6
|
+
2. Lets you compress your context and start a new session without losing the important details.
|
|
11
7
|
|
|
12
8
|
## Install
|
|
13
9
|
|
|
14
10
|
Requires Node 18 or later.
|
|
15
11
|
|
|
16
12
|
```sh
|
|
17
|
-
npx context-carwash preview # sample meters
|
|
13
|
+
npx context-carwash preview # see sample meters, nothing installed
|
|
18
14
|
npx context-carwash install # lists what it will change, then asks
|
|
19
15
|
```
|
|
20
16
|
|
|
21
|
-
To update later, run `npx context-carwash@latest install`.
|
|
22
|
-
|
|
23
|
-
You do not have to watch for new versions. Once a day, when a session starts, Carwash checks npm in the background. If a newer version is out, or the version you have has a known problem, a line under the meter says so, with the command to update. `/wash help` shows the version you have.
|
|
24
|
-
|
|
25
|
-
The installer copies itself to `~/.carwash/app` and makes three changes to Claude Code, all listed before you confirm:
|
|
26
|
-
|
|
27
|
-
- **Status line** in `~/.claude/settings.json`. If you already have one, yours keeps running and the meter is added after it.
|
|
28
|
-
- **Three hooks** in the same file, added after any hooks you already have. They are how `/wash` saves a brief and how a fresh session receives it.
|
|
29
|
-
- **The `/wash` command** at `~/.claude/skills/wash`.
|
|
30
|
-
|
|
31
|
-
Start a new Claude Code session afterwards. The first one explains the meter and `/wash` in a short note, shown once.
|
|
17
|
+
Then start a new Claude Code session. To update later, run `npx context-carwash@latest install`. You don't need to watch for updates: a line under the meter tells you when there's a new version.
|
|
32
18
|
|
|
33
|
-
The status line and hooks
|
|
19
|
+
The installer adds a status line and three hooks to `~/.claude/settings.json`, after anything you already have there, and adds the `/wash` command at `~/.claude/skills/wash`.
|
|
34
20
|
|
|
35
21
|
## The meter
|
|
36
22
|
|
|
@@ -38,22 +24,14 @@ The status line and hooks run with the Node you installed with. If you later rem
|
|
|
38
24
|
session context ~136k [██████████░░░░░] /wash to compress & save context, then /clear keeps compressed context
|
|
39
25
|
```
|
|
40
26
|
|
|
41
|
-
The number is how many tokens the conversation is using
|
|
27
|
+
The number is how many tokens the conversation is using, as estimated by Claude Code. The bar shows how full the context window is and changes colour as it fills. In narrow windows the text gets shorter. The meter never does anything on its own.
|
|
42
28
|
|
|
43
|
-
|
|
44
|
-
session context ~150k [███████████░░░░] getting full · /wash to compress & save context, then /clear keeps compressed context
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Narrower windows show less. The sentence shortens first: `/wash to compress & save context, then /clear` fits about half a Mac screen, `/wash to compress, then /clear` fits an 80-column window, and the narrowest windows show `/wash to compress`. Then the bar goes.
|
|
29
|
+
## /wash
|
|
48
30
|
|
|
49
|
-
|
|
31
|
+
1. Type `/wash`. Claude writes a short brief: what you're doing, where things stand, and what to do next. The status line changes to `Brief ready ✓`.
|
|
32
|
+
2. Type `/clear`. The new session starts with that brief already loaded.
|
|
50
33
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
1. Type `/wash` (or `/wash light`, `/wash detailed`). Claude replies with a brief: what you are doing, where things stand, and what to do next. The status line changes to `Brief ready ✓`.
|
|
54
|
-
2. Type `/clear`. The new session starts with that brief already loaded, and says so: `Loaded your Carwash brief (mid ~1.1k, 2m ago), down from ~136k in the old session.`
|
|
55
|
-
|
|
56
|
-
Your old conversation is not deleted. It stays in `/resume`.
|
|
34
|
+
Your old conversation stays in `/resume`.
|
|
57
35
|
|
|
58
36
|
| Command | What it does |
|
|
59
37
|
|---|---|
|
|
@@ -63,21 +41,15 @@ Your old conversation is not deleted. It stays in `/resume`.
|
|
|
63
41
|
| `/wash detailed` | Adds rationale, history, test results, risks, a step checklist |
|
|
64
42
|
| `/wash discard` | Drop the brief. `/clear` is a normal clear again |
|
|
65
43
|
| `/wash load [id]` | Make a waiting brief the one your next `/clear` uses |
|
|
66
|
-
| `/wash stats` | How much context your washes have saved
|
|
67
|
-
| `/wash help` | Explain the meter and these options
|
|
68
|
-
|
|
69
|
-
Each level has a size limit: the most tokens its brief may take, worked out from what the conversation is using (a hundredth for `light`, three hundredths for `mid`, a tenth for `detailed`). `/wash help` shows the limits for the session you are in.
|
|
44
|
+
| `/wash stats` | How much context your washes have saved |
|
|
45
|
+
| `/wash help` | Explain the meter and these options |
|
|
70
46
|
|
|
71
|
-
Words after the level
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
- **The cap is a ceiling, not a target.** A brief is as short as it can be. If one comes out over its cap, Claude is asked to shorten it, up to twice. If it is still over, it is kept and the message says so.
|
|
78
|
-
- **Sizes are estimates.** The brief's size is worked out from its length. It covers the brief alone, so the meter in the new session reads higher: it also counts Claude Code's own baseline.
|
|
79
|
-
- **Closed the terminal before clearing?** Start `claude` in the same folder. If exactly one brief is waiting for that folder, it is under 12 hours old, and the session that wrote it has ended, it is loaded. If there is any doubt about which brief is meant, nothing is loaded and you are shown what is waiting, with the `/wash load <id>` to use.
|
|
80
|
-
- **Briefs expire after 48 hours.** A delivered brief is kept for 24 hours in case you want it again (`/wash load <id>`), then deleted.
|
|
47
|
+
- Words after the level tell Claude what to focus on: `/wash mid focus on the failing test`.
|
|
48
|
+
- A `/clear` with no brief ready is a normal clear.
|
|
49
|
+
- Writing a brief is an ordinary Claude reply, so it uses tokens. `help`, `discard` and `load` don't.
|
|
50
|
+
- Each level has a size limit based on how big the conversation is. `/wash help` shows them.
|
|
51
|
+
- Closed the terminal before `/clear`? Start `claude` in the same folder and the brief loads. If more than one is waiting, you're shown which ones, with the `/wash load <id>` to pick one.
|
|
52
|
+
- Briefs expire after 48 hours.
|
|
81
53
|
|
|
82
54
|
## Stats
|
|
83
55
|
|
|
@@ -96,19 +68,9 @@ Carwash stats, since 3 Oct 2026 (12 days)
|
|
|
96
68
|
Net saved ~20M tokens
|
|
97
69
|
```
|
|
98
70
|
|
|
99
|
-
`/wash stats` shows the same inside Claude Code
|
|
100
|
-
|
|
101
|
-
How it is worked out: every request to Claude carries the whole conversation, and a single prompt can make many requests while Claude uses tools. After a wash, each request in the fresh session starts from the brief instead of the old conversation. Claude Code's transcript of that session records the size of every request, so Carwash counts the requests and multiplies by the gap. Nothing is assumed about how long you would have kept going: only requests you actually made count. Counting stops where the old session would have compacted on its own.
|
|
102
|
-
|
|
103
|
-
Claude caches repeated context and charges about a tenth for it, so in money terms the saving is roughly a tenth of these numbers. The brief cost counts every brief written, used or not.
|
|
104
|
-
|
|
105
|
-
### Sharing your stats
|
|
106
|
-
|
|
107
|
-
```sh
|
|
108
|
-
npx context-carwash stats --share
|
|
109
|
-
```
|
|
71
|
+
Every request to Claude re-sends the whole conversation. After a wash, each request starts from the small brief instead, so Carwash counts the requests you actually made and adds up the difference. Claude charges about a tenth for repeated context, so the money saved is roughly a tenth of these numbers. `/wash stats` shows the same inside Claude Code.
|
|
110
72
|
|
|
111
|
-
|
|
73
|
+
`npx context-carwash stats --share` sends your anonymous totals, but only after showing you exactly what it will send and you say yes.
|
|
112
74
|
|
|
113
75
|
## Something not working?
|
|
114
76
|
|
|
@@ -116,15 +78,11 @@ This shows every field it would send, and sends only if you say yes. It sends to
|
|
|
116
78
|
npx context-carwash doctor
|
|
117
79
|
```
|
|
118
80
|
|
|
119
|
-
This checks that
|
|
120
|
-
|
|
121
|
-
If a hook fails, the status line shows `Carwash hit an error` until you run `doctor`.
|
|
81
|
+
This checks that everything is still installed and working, and shows your versions and recent errors. Paste the output into a [new issue](https://github.com/Spobi/context-carwash/issues/new). Issues are public, and errors can include folder names, so look it over first.
|
|
122
82
|
|
|
123
83
|
## Where things are kept
|
|
124
84
|
|
|
125
|
-
Briefs are
|
|
126
|
-
|
|
127
|
-
If a hook fails it stays silent, writes the error to `~/.carwash/errors.log`, and the status line says so.
|
|
85
|
+
Briefs, stats and error logs are kept in `~/.carwash`, readable only by you. Nothing about you is uploaded. Once a day Carwash checks npm for a newer version. Set `CARWASH_NO_UPDATE_CHECK=1` to turn that off.
|
|
128
86
|
|
|
129
87
|
## Uninstall
|
|
130
88
|
|
|
@@ -134,12 +92,6 @@ npx context-carwash uninstall
|
|
|
134
92
|
|
|
135
93
|
This puts `settings.json` back exactly as it was. If you have edited the file since installing, it removes only Carwash's own status line and hooks and keeps your edits. It then removes the `/wash` command and deletes `~/.carwash`, including any briefs still waiting and your stats.
|
|
136
94
|
|
|
137
|
-
## Limitations
|
|
138
|
-
|
|
139
|
-
- Terminal.app cannot click links. When clickable links arrive for other terminals, Terminal.app will keep showing the command to type.
|
|
140
|
-
- The status line re-runs every 5 seconds while a session is open, so it stays correct after `/wash discard` and `/wash load`. Each run reads a few small local files. If your own status line sets a refresh interval, yours is kept.
|
|
141
|
-
- Claude Code shows `help`, `discard`, `load`, and mistyped arguments under the heading "operation blocked by hook". That is Carwash answering the command itself instead of sending it to Claude.
|
|
142
|
-
|
|
143
95
|
## Platforms
|
|
144
96
|
|
|
145
97
|
Developed and tested on macOS. Automated tests also run on Linux and Windows; neither has been tried by hand yet.
|