@kevin0181/memoc 1.0.8 → 1.1.2
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 +89 -19
- package/bin/cli.js +649 -500
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
Scaffolds a Markdown-based project memory into any codebase. Works with Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, and Gemini CLI.
|
|
6
6
|
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
9
|
```bash
|
|
10
10
|
npx @kevin0181/memoc init
|
|
11
|
+
|
|
12
|
+
# Upgrade memoc in this project without deleting existing memory
|
|
13
|
+
npx @kevin0181/memoc@latest upgrade
|
|
11
14
|
```
|
|
12
15
|
|
|
13
16
|
Run inside your project directory. Detects your stack automatically and generates everything agents need.
|
|
14
17
|
|
|
15
|
-
`init` also creates PATH helpers so agents can keep using memoc even when the global/npm bin is not on PATH.
|
|
18
|
+
`init` also creates project-local PATH helpers so agents can keep using memoc even when the global/npm bin is not on PATH.
|
|
16
19
|
|
|
17
20
|
```bash
|
|
18
21
|
# PowerShell
|
|
@@ -22,9 +25,45 @@ Run inside your project directory. Detects your stack automatically and generate
|
|
|
22
25
|
. ./.memoc/env.sh
|
|
23
26
|
```
|
|
24
27
|
|
|
25
|
-
Agents are instructed to
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
Agents are instructed to use the project-local wrapper if PATH fails:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Windows
|
|
32
|
+
.\.memoc\bin\memoc.cmd summary
|
|
33
|
+
|
|
34
|
+
# macOS / Linux
|
|
35
|
+
.memoc/bin/memoc summary
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Ask An Agent To Install
|
|
41
|
+
|
|
42
|
+
If you are giving this repo or npm package to an AI coding agent, use a prompt like:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
Install memoc in this project and run init.
|
|
46
|
+
Use the npm package only. Run `npx @kevin0181/memoc@latest init`
|
|
47
|
+
from this project's root. Do not clone the GitHub repository into this project.
|
|
48
|
+
If npm/npx is missing, stop and ask the user to install Node.js LTS with npm first.
|
|
49
|
+
After init, verify with the project-local wrapper:
|
|
50
|
+
Windows: .\.memoc\bin\memoc.cmd summary
|
|
51
|
+
macOS/Linux: .memoc/bin/memoc summary
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Agent install checklist:
|
|
55
|
+
|
|
56
|
+
1. Run `node --version` and `npm --version`. If either fails, ask the user to install Node.js LTS with npm first.
|
|
57
|
+
2. Run `npx @kevin0181/memoc@latest init` from the target project root.
|
|
58
|
+
3. Do not clone this GitHub repository into the target project. Do not download the repo ZIP as an installer.
|
|
59
|
+
4. `.claude/settings.json` is intentionally generated for the Claude Code Stop hook; keep or commit it only if the project wants that hook.
|
|
60
|
+
5. After init, do not depend on global PATH. Use the project-local wrapper when needed:
|
|
61
|
+
- Windows: `.\.memoc\bin\memoc.cmd <command>`
|
|
62
|
+
- macOS/Linux: `.memoc/bin/memoc <command>`
|
|
63
|
+
|
|
64
|
+
If `node --version` or `npm --version` fails, memoc cannot be installed yet. Install Node.js LTS with npm first, then repeat the steps above.
|
|
65
|
+
|
|
66
|
+
---
|
|
28
67
|
|
|
29
68
|
## The Problem
|
|
30
69
|
|
|
@@ -46,13 +85,13 @@ npx @kevin0181/memoc update
|
|
|
46
85
|
# Print current status in ~10 lines
|
|
47
86
|
npx @kevin0181/memoc summary
|
|
48
87
|
|
|
49
|
-
# Search memory/agent docs first (token-efficient)
|
|
50
|
-
npx @kevin0181/memoc search "auth"
|
|
51
|
-
npx @kevin0181/memoc search "auth" --snippets --limit 5
|
|
52
|
-
|
|
53
|
-
# Search project source/text files only when memory is not enough
|
|
54
|
-
npx @kevin0181/memoc grep "GetParticles"
|
|
55
|
-
npx @kevin0181/memoc grep "GetParticles" --snippets --limit 5
|
|
88
|
+
# Search memory/agent docs first (token-efficient)
|
|
89
|
+
npx @kevin0181/memoc search "auth"
|
|
90
|
+
npx @kevin0181/memoc search "auth" --snippets --limit 5
|
|
91
|
+
|
|
92
|
+
# Search project source/text files only when memory is not enough
|
|
93
|
+
npx @kevin0181/memoc grep "GetParticles"
|
|
94
|
+
npx @kevin0181/memoc grep "GetParticles" --snippets --limit 5
|
|
56
95
|
|
|
57
96
|
# Estimate token cost of current memory files
|
|
58
97
|
npx @kevin0181/memoc tokens
|
|
@@ -69,7 +108,38 @@ npx @kevin0181/memoc add gemini
|
|
|
69
108
|
|
|
70
109
|
---
|
|
71
110
|
|
|
72
|
-
##
|
|
111
|
+
## Upgrade Existing Projects
|
|
112
|
+
|
|
113
|
+
memoc never auto-updates itself. Upgrade only when you choose to run:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npx @kevin0181/memoc@latest upgrade
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Run it from the project root. It preserves existing project memory, including:
|
|
120
|
+
|
|
121
|
+
- `.memoc/session-summary.md`
|
|
122
|
+
- `.memoc/02-current-project-state.md` human-written sections
|
|
123
|
+
- `.memoc/03-decisions.md`
|
|
124
|
+
- `.memoc/04-handoff.md`
|
|
125
|
+
- `.memoc/06-project-rules.md`
|
|
126
|
+
- `.memoc/log.md`
|
|
127
|
+
- `.memoc/systems/`
|
|
128
|
+
- `.memoc/wiki/`
|
|
129
|
+
|
|
130
|
+
It refreshes the managed blocks, project-local wrappers, runtime copy, PATH helpers, and missing template files. If `memoc` is not on PATH after upgrading, keep using:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Windows
|
|
134
|
+
.\.memoc\bin\memoc.cmd summary
|
|
135
|
+
|
|
136
|
+
# macOS / Linux
|
|
137
|
+
.memoc/bin/memoc summary
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## What Gets Created
|
|
73
143
|
|
|
74
144
|
```
|
|
75
145
|
CLAUDE.md ← Claude Code entry point (auto-loaded)
|
|
@@ -77,11 +147,11 @@ AGENTS.md ← Codex entry point (auto-loaded)
|
|
|
77
147
|
llms.txt ← LLM-facing project map
|
|
78
148
|
.claude/settings.json ← Claude Code Stop hook
|
|
79
149
|
|
|
80
|
-
.memoc/
|
|
81
|
-
bin/memoc ← project-local wrapper for PATH fallback
|
|
82
|
-
env.ps1 · env.sh ← shell helpers that prepend .memoc/bin to PATH
|
|
83
|
-
session-summary.md ← Only required startup read (~150 tokens)
|
|
84
|
-
02-current-project-state.md ← Status, open tasks, commands
|
|
150
|
+
.memoc/
|
|
151
|
+
bin/memoc ← project-local wrapper for PATH fallback
|
|
152
|
+
env.ps1 · env.sh ← shell helpers that prepend .memoc/bin to PATH
|
|
153
|
+
session-summary.md ← Only required startup read (~150 tokens)
|
|
154
|
+
02-current-project-state.md ← Status, open tasks, commands
|
|
85
155
|
03-decisions.md ← Durable decision log
|
|
86
156
|
04-handoff.md ← Resume context, verified/unverified
|
|
87
157
|
06-project-rules.md ← User preferences
|