@kevin0181/memoc 1.0.8 → 1.1.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 +92 -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,48 @@ 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 npm/npx if available. If npm is missing but node is available, clone or download
|
|
47
|
+
https://github.com/neneee0181/memoc and run `node <memoc-repo>/bin/cli.js init`
|
|
48
|
+
from this project's root. After init, verify with the project-local wrapper:
|
|
49
|
+
Windows: .\.memoc\bin\memoc.cmd summary
|
|
50
|
+
macOS/Linux: .memoc/bin/memoc summary
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Agent install checklist:
|
|
54
|
+
|
|
55
|
+
1. Run `node --version`. If Node.js is missing, ask the user to install Node.js LTS first.
|
|
56
|
+
2. Run `npx @kevin0181/memoc init` from the target project root.
|
|
57
|
+
3. If `npx` or `npm` is missing, use GitHub source instead:
|
|
58
|
+
```bash
|
|
59
|
+
git clone https://github.com/neneee0181/memoc.git
|
|
60
|
+
node /path/to/memoc/bin/cli.js init
|
|
61
|
+
```
|
|
62
|
+
4. If `git` is missing too, download the GitHub ZIP, extract it, then run `node /path/to/memoc/bin/cli.js init`.
|
|
63
|
+
5. After init, do not depend on global PATH. Use the project-local wrapper when needed:
|
|
64
|
+
- Windows: `.\.memoc\bin\memoc.cmd <command>`
|
|
65
|
+
- macOS/Linux: `.memoc/bin/memoc <command>`
|
|
66
|
+
|
|
67
|
+
If `node --version` fails, memoc cannot run yet. Install Node.js first, then repeat the steps above.
|
|
68
|
+
|
|
69
|
+
---
|
|
28
70
|
|
|
29
71
|
## The Problem
|
|
30
72
|
|
|
@@ -46,13 +88,13 @@ npx @kevin0181/memoc update
|
|
|
46
88
|
# Print current status in ~10 lines
|
|
47
89
|
npx @kevin0181/memoc summary
|
|
48
90
|
|
|
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
|
|
91
|
+
# Search memory/agent docs first (token-efficient)
|
|
92
|
+
npx @kevin0181/memoc search "auth"
|
|
93
|
+
npx @kevin0181/memoc search "auth" --snippets --limit 5
|
|
94
|
+
|
|
95
|
+
# Search project source/text files only when memory is not enough
|
|
96
|
+
npx @kevin0181/memoc grep "GetParticles"
|
|
97
|
+
npx @kevin0181/memoc grep "GetParticles" --snippets --limit 5
|
|
56
98
|
|
|
57
99
|
# Estimate token cost of current memory files
|
|
58
100
|
npx @kevin0181/memoc tokens
|
|
@@ -69,7 +111,38 @@ npx @kevin0181/memoc add gemini
|
|
|
69
111
|
|
|
70
112
|
---
|
|
71
113
|
|
|
72
|
-
##
|
|
114
|
+
## Upgrade Existing Projects
|
|
115
|
+
|
|
116
|
+
memoc never auto-updates itself. Upgrade only when you choose to run:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npx @kevin0181/memoc@latest upgrade
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Run it from the project root. It preserves existing project memory, including:
|
|
123
|
+
|
|
124
|
+
- `.memoc/session-summary.md`
|
|
125
|
+
- `.memoc/02-current-project-state.md` human-written sections
|
|
126
|
+
- `.memoc/03-decisions.md`
|
|
127
|
+
- `.memoc/04-handoff.md`
|
|
128
|
+
- `.memoc/06-project-rules.md`
|
|
129
|
+
- `.memoc/log.md`
|
|
130
|
+
- `.memoc/systems/`
|
|
131
|
+
- `.memoc/wiki/`
|
|
132
|
+
|
|
133
|
+
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:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Windows
|
|
137
|
+
.\.memoc\bin\memoc.cmd summary
|
|
138
|
+
|
|
139
|
+
# macOS / Linux
|
|
140
|
+
.memoc/bin/memoc summary
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## What Gets Created
|
|
73
146
|
|
|
74
147
|
```
|
|
75
148
|
CLAUDE.md ← Claude Code entry point (auto-loaded)
|
|
@@ -77,11 +150,11 @@ AGENTS.md ← Codex entry point (auto-loaded)
|
|
|
77
150
|
llms.txt ← LLM-facing project map
|
|
78
151
|
.claude/settings.json ← Claude Code Stop hook
|
|
79
152
|
|
|
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
|
|
153
|
+
.memoc/
|
|
154
|
+
bin/memoc ← project-local wrapper for PATH fallback
|
|
155
|
+
env.ps1 · env.sh ← shell helpers that prepend .memoc/bin to PATH
|
|
156
|
+
session-summary.md ← Only required startup read (~150 tokens)
|
|
157
|
+
02-current-project-state.md ← Status, open tasks, commands
|
|
85
158
|
03-decisions.md ← Durable decision log
|
|
86
159
|
04-handoff.md ← Resume context, verified/unverified
|
|
87
160
|
06-project-rules.md ← User preferences
|