nemu-cli 1.5.0 → 1.8.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/CHANGELOG.md +198 -116
- package/LICENSE +21 -21
- package/README.md +273 -235
- package/dist/args.js +9 -1
- package/dist/clients/claude-plugin.js +68 -0
- package/dist/clients/registry.js +9 -1
- package/dist/commands/login.js +9 -4
- package/dist/commands/private.js +259 -0
- package/dist/commands/status.js +42 -4
- package/dist/commands/sync.js +207 -0
- package/dist/commands/vault.js +257 -0
- package/dist/device.js +15 -9
- package/dist/http.js +32 -20
- package/dist/index.js +117 -100
- package/dist/vault/api.js +300 -0
- package/dist/vault/connect.js +59 -0
- package/dist/vault/engine.js +636 -0
- package/dist/vault/files.js +187 -0
- package/dist/vault/ignore.js +103 -0
- package/dist/vault/lock.js +85 -0
- package/dist/vault/merge.js +236 -0
- package/dist/vault/paths.js +99 -0
- package/dist/vault/plan.js +279 -0
- package/dist/vault/private/api.js +110 -0
- package/dist/vault/private/crypto.js +212 -0
- package/dist/vault/private/keystore.js +104 -0
- package/dist/vault/private/locks.js +59 -0
- package/dist/vault/private/strength.js +22 -0
- package/dist/vault/state.js +118 -0
- package/dist/vault/watch.js +101 -0
- package/dist/version.js +1 -1
- package/package.json +54 -48
- package/plugin/.claude-plugin/marketplace.json +14 -0
- package/plugin/nemu/.claude-plugin/plugin.json +8 -0
- package/plugin/nemu/.mcp.json +8 -0
- package/plugin/nemu/commands/inspo.md +22 -0
- package/plugin/nemu/commands/remember.md +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,116 +1,198 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 1.
|
|
4
|
-
|
|
5
|
-
`nemu
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## 1.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
`nemu
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
and
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
`nemu
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
`nemu status` now asks Nemu about this computer instead of only reading local files. It shows a
|
|
6
|
+
device the server no longer knows or has revoked, with `nemu login --force` as the fix, and shows an
|
|
7
|
+
expired sign in as expired rather than ok. `nemu login` reports when registering this computer for
|
|
8
|
+
Context fails instead of finishing silently without a device.
|
|
9
|
+
|
|
10
|
+
`nemu setup claude` now installs Nemu as a Claude Code plugin when your Claude Code supports plugins.
|
|
11
|
+
The plugin carries the MCP server, so nothing else changes about how the tools work, and adds two
|
|
12
|
+
commands: `/remember` saves something durable to the project's memory, updating a note that already
|
|
13
|
+
covers it, and `/inspo` reads an inspiration folder's board in a vault, follows each reference's use,
|
|
14
|
+
and asks for more when the folder is thin. An older Claude Code gets the MCP server as before.
|
|
15
|
+
`nemu uninstall claude` removes the plugin too.
|
|
16
|
+
|
|
17
|
+
## 1.7.0
|
|
18
|
+
|
|
19
|
+
Private vaults. `nemu vault link <folder> --create --private` makes a vault whose key only your
|
|
20
|
+
devices hold: you choose a vault password, and a recovery key is shown once and saved to a file in
|
|
21
|
+
your home folder. `nemu sync` then seals every name and text before it leaves this computer, so Nemu
|
|
22
|
+
stores only data it cannot read.
|
|
23
|
+
|
|
24
|
+
On another computer, `nemu vault unlock` opens it with the password, the recovery key, or approval
|
|
25
|
+
from a device that already has it open (`nemu vault approve` there, after comparing a six digit
|
|
26
|
+
code). The key is kept in the macOS Keychain, protected by Windows for your account, or in a file only
|
|
27
|
+
your account can read on Linux. `nemu vault forget` locks it on this computer again, and
|
|
28
|
+
`nemu vault status` says whether it is open. In scripts, `NEMU_VAULT_PASSWORD` and
|
|
29
|
+
`NEMU_VAULT_RECOVERY` stand in for typing.
|
|
30
|
+
|
|
31
|
+
## 1.6.2
|
|
32
|
+
|
|
33
|
+
`.obsidian/plugins/` no longer syncs when a device turns on `--obsidian`, because plugins are code
|
|
34
|
+
Obsidian runs, and a plugin added on one synced device would otherwise run on every other one. Turn
|
|
35
|
+
it on for one device with `nemu sync --obsidian-plugins on`; the CLI says what that means when you
|
|
36
|
+
do. Turning it off stops syncing plugins and deletes nothing, here or in the vault. Themes, settings
|
|
37
|
+
and hotkeys keep syncing with `--obsidian` as before. `nemu vault status` shows the setting.
|
|
38
|
+
|
|
39
|
+
## 1.6.1
|
|
40
|
+
|
|
41
|
+
When `nemu sync` merges a note automatically, it now records the merge in the vault's merge log,
|
|
42
|
+
with this computer's text from before the merge, so the console can restore either side with one
|
|
43
|
+
click. A merge log that cannot be reached never fails the sync; the run reports it as a notice.
|
|
44
|
+
|
|
45
|
+
`-w <workspace>` works. It was read as a switch, so the workspace after it was dropped and the
|
|
46
|
+
command ran in your first workspace; `--workspace` was not affected. `-o` and `-d` had the same
|
|
47
|
+
problem and are fixed too.
|
|
48
|
+
|
|
49
|
+
`nemu vault link` on a folder that is no longer linked, such as a drive folder that was emptied and
|
|
50
|
+
linked again, now starts fresh and downloads the vault, instead of treating every missing file as
|
|
51
|
+
deleted and stopping at the mass-delete guard.
|
|
52
|
+
|
|
53
|
+
Sync never writes `.claude/`, `.codex/`, `.cursor/`, `.vscode/`, `.idea/`, `.husky/`,
|
|
54
|
+
`.github/workflows/` or `.git/hooks/`, in either direction, because files there can run code when
|
|
55
|
+
you open the folder in an editor or an agent. A folder inside the vault that is a symbolic link to
|
|
56
|
+
somewhere else is never written through.
|
|
57
|
+
|
|
58
|
+
## 1.6.0
|
|
59
|
+
|
|
60
|
+
`nemu sync` keeps a folder, such as an Obsidian vault, in step with a Context vault.
|
|
61
|
+
`nemu vault link <folder>` links it once (`--vault <name|id>` picks the vault, `--create` makes
|
|
62
|
+
one) and writes `.nemu/vault.json`, without which sync refuses to run, so an unmounted drive never
|
|
63
|
+
looks like a folder whose notes were deleted. `nemu sync --watch` keeps syncing until stopped.
|
|
64
|
+
`nemu vault list`, `status` and `unlink` round it off.
|
|
65
|
+
|
|
66
|
+
Each run reads the vault's changes since the last run, or lists every file when the device has been
|
|
67
|
+
away longer than the change history, and compares files by content, never by modification time.
|
|
68
|
+
Markdown changed on both sides is merged line by line when the edits do not overlap, treating CRLF
|
|
69
|
+
and LF as equal and keeping your file's line endings. Otherwise the vault's version keeps the name
|
|
70
|
+
and yours is saved beside it as `Note (conflict, <device>, <date> <time>).md`; no note ever gets
|
|
71
|
+
conflict markers. `--conflicts=file` always writes the conflict file instead. An edit wins over a
|
|
72
|
+
delete, a rename is sent as a move so the note keeps its history, and two renames onto one name
|
|
73
|
+
give the second ` (2)`.
|
|
74
|
+
|
|
75
|
+
A run that would delete more than 10 files, every file, or at least 3 files and more than 10% of
|
|
76
|
+
the vault stops and deletes nothing until you pass `--allow-deletes`. `.nemu/lock` keeps two syncs
|
|
77
|
+
off one folder and is taken over when its process is gone. Downloads are written to a temporary file
|
|
78
|
+
and renamed; uploads wait until a file has been unchanged for 2 seconds and reads the same twice.
|
|
79
|
+
Symbolic links, files above the plan's size, case clashes and names Windows cannot hold are skipped
|
|
80
|
+
and listed. Out of storage stops uploads and keeps downloading; a revoked device or key stops sync
|
|
81
|
+
and never deletes a local file. `.git/`, `node_modules/`, `.trash/`, `.DS_Store`, `._*` and
|
|
82
|
+
`.obsidian/workspace*.json` are never synced, the rest of `.obsidian/` is opt in per device, and
|
|
83
|
+
`.nemuignore` adds patterns.
|
|
84
|
+
|
|
85
|
+
## 1.5.0
|
|
86
|
+
|
|
87
|
+
`nemu login key` signs in with a workspace API key, the same `sk_` key that calls the gateway. It
|
|
88
|
+
asks for the key, or reads `NEMU_API_KEY`, and shows the workspace and access the key has. Context
|
|
89
|
+
and vault commands use the unified routes under `/api/v1`, and work in the workspace you choose, so
|
|
90
|
+
members share the workspace's Context. Earlier versions call routes that no longer exist and need
|
|
91
|
+
this update.
|
|
92
|
+
|
|
93
|
+
## 1.4.0
|
|
94
|
+
|
|
95
|
+
`nemu setup opencode` adds the Nemu MCP server to OpenCode's global config,
|
|
96
|
+
`~/.config/opencode/opencode.json` (or `opencode.jsonc` when that is the file you have), as a local
|
|
97
|
+
server that runs `nemu mcp --client opencode`. Like the other editors, only the `nemu` entry is
|
|
98
|
+
written, the previous file is kept with a `.nemu-backup` suffix, `nemu uninstall opencode` removes
|
|
99
|
+
it, `nemu status` lists it and `nemu mcp config opencode` prints it.
|
|
100
|
+
|
|
101
|
+
The Stop hook no longer shows up as "Stop hook error" after every few edits. Claude Code shows any
|
|
102
|
+
Stop request that way, so the reminder to save a handoff now arrives quietly after the third edit,
|
|
103
|
+
as context the agent reads and you do not see. Stop asks at most once per session, and only when the
|
|
104
|
+
work is still unsaved. Saving with `memory_write` resets the count. Only files inside the project
|
|
105
|
+
count, so an agent's scratchpad or a temp folder no longer triggers a request, and the reminder no
|
|
106
|
+
longer tells the agent to hide it from you.
|
|
107
|
+
|
|
108
|
+
On Windows, `git`, editors and every other command the CLI starts are now found on `PATH` only.
|
|
109
|
+
Before, the current folder was searched first, so a `git.cmd` inside a cloned repository ran in
|
|
110
|
+
place of the real git.
|
|
111
|
+
|
|
112
|
+
`nemu setup`, `nemu uninstall` and the update repair keep the permissions of
|
|
113
|
+
`~/.claude/settings.json` and `~/.codex/hooks.json`. A file you locked to `0600` used to come back
|
|
114
|
+
readable by every user on the machine. Files the CLI creates from nothing are now `0600`.
|
|
115
|
+
|
|
116
|
+
`nemu login` opens the sign-in page only when it is on the same server the CLI talks to, over https
|
|
117
|
+
(or http on localhost), and on Windows it opens it without going through `cmd`. It now opens the
|
|
118
|
+
page without the code filled in, matching the device page, so you type the code shown in the
|
|
119
|
+
terminal.
|
|
120
|
+
|
|
121
|
+
## 1.3.2
|
|
122
|
+
|
|
123
|
+
After an update, the CLI checks once whether what setup installed still matches what this version
|
|
124
|
+
needs: the Nemu hooks for Claude Code and Codex, and the nemu entry in each editor. Only Nemu's own
|
|
125
|
+
entries that actually differ are rewritten, with every other hook and setting left as it was, and
|
|
126
|
+
nothing is printed when everything already matches. This runs on the first command after an
|
|
127
|
+
update, right after `nemu update` installs a new version, and quietly at the start of a session.
|
|
128
|
+
`nemu repair` runs the same check any time. Each check is a small migration in
|
|
129
|
+
`src/migrations.ts`, so a future release that changes setup adds one there.
|
|
130
|
+
|
|
131
|
+
Commands are started with cross-spawn instead of a shell on Windows, which removes Node's
|
|
132
|
+
DEP0190 deprecation warning and escapes arguments properly.
|
|
133
|
+
|
|
134
|
+
## 1.3.1
|
|
135
|
+
|
|
136
|
+
Fixes "hook failed, exited with code 1" for Codex on Windows. Codex starts hooks through a Windows
|
|
137
|
+
shell that cannot launch a command whose program path is quoted, and setup wrote the path to
|
|
138
|
+
`nemu.cmd` in quotes. The Codex hooks now name the program unquoted (or as `nemu.cmd` when its
|
|
139
|
+
path has spaces). `nemu codex` repairs hooks written by an earlier version before it starts Codex,
|
|
140
|
+
`nemu setup codex --hooks` does the same, and `nemu status` says when a repair is needed. Claude
|
|
141
|
+
Code runs hooks through Git Bash on Windows and is unchanged.
|
|
142
|
+
|
|
143
|
+
## 1.3.0
|
|
144
|
+
|
|
145
|
+
`nemu setup cursor`, `nemu setup vscode`, `nemu setup gemini`, `nemu setup windsurf` and
|
|
146
|
+
`nemu setup zed` add the Nemu MCP server to that editor's own config. Only the `nemu` entry is
|
|
147
|
+
written: every other server, setting, comment and the file's indentation stay exactly as they
|
|
148
|
+
were, the previous file is kept next to it with a `.nemu-backup` suffix, a file that cannot be
|
|
149
|
+
parsed is left alone, and a different server already called `nemu` is never overwritten. VS Code
|
|
150
|
+
uses its own `code --add-mcp` when it is on the PATH. `nemu uninstall <editor>` removes only
|
|
151
|
+
that entry, and `nemu status` lists the editors it finds. Hooks remain Claude Code and Codex
|
|
152
|
+
only.
|
|
153
|
+
|
|
154
|
+
## 1.2.0
|
|
155
|
+
|
|
156
|
+
The CLI tells you when a newer version is out: "There is a new version available (1.2.0 -> 1.3.0).
|
|
157
|
+
Do you want to upgrade?" Saying yes installs it with npm. It asks at most once a day, waits at most
|
|
158
|
+
1.5 seconds for the registry, and stays silent in hooks, the MCP bridge, `--json` output, scripts
|
|
159
|
+
and CI. `nemu update` checks right away; `nemu update --yes` installs without asking. Set
|
|
160
|
+
`NEMU_NO_UPDATE_CHECK=1` to turn the check off.
|
|
161
|
+
|
|
162
|
+
## 1.1.0
|
|
163
|
+
|
|
164
|
+
Nemu Context for coding agents. `nemu setup claude` (aliases `cc`, `claude-code`) and
|
|
165
|
+
`nemu setup codex` connect the client through its own `mcp add` command and optionally install hooks
|
|
166
|
+
that load project notes at session start and ask for a handoff before stopping. `nemu claude` and
|
|
167
|
+
`nemu codex` set up if needed and start the client.
|
|
168
|
+
|
|
169
|
+
`nemu mcp` is a stdio MCP bridge for any client, using the login and refreshing it; `nemu mcp config`
|
|
170
|
+
prints config for Cursor, Gemini CLI, VS Code, Windsurf, Zed and remote HTTP clients.
|
|
171
|
+
|
|
172
|
+
`nemu claude load memories` imports Claude Code's saved memories. `load sessions` hands your recent
|
|
173
|
+
sessions to your own agent to summarise. `nemu context` shows, searches and exports notes.
|
|
174
|
+
|
|
175
|
+
Login now registers this computer as a device. Token refresh takes a lock, so several sessions
|
|
176
|
+
refreshing at once no longer sign each other out. `nemu status`, `nemu uninstall`, `nemu token`.
|
|
177
|
+
|
|
178
|
+
Failures after login send a scrubbed report and print an `NMU-` reference for support. Every file,
|
|
179
|
+
response and hook input is validated.
|
|
180
|
+
|
|
181
|
+
## 1.0.0
|
|
182
|
+
|
|
183
|
+
First real release. `login` signs in with the device grant, so nothing is pasted
|
|
184
|
+
into the terminal and the package carries no secret.
|
|
185
|
+
|
|
186
|
+
Commands for everything the management API exposes: workspaces, members,
|
|
187
|
+
budgets, providers, models, prompts, mappings, indexes, quotas, metrics and
|
|
188
|
+
workflows. `nemu api` calls any endpoint directly for the things that have no
|
|
189
|
+
command of their own.
|
|
190
|
+
|
|
191
|
+
Every command takes `--json` and exits non zero on failure, so a script or an
|
|
192
|
+
agent can drive it without scraping tables.
|
|
193
|
+
|
|
194
|
+
Destructive commands need `--yes`. There is no interactive prompt anywhere.
|
|
195
|
+
|
|
196
|
+
## 0.1.0
|
|
197
|
+
|
|
198
|
+
Unpublished. login, logout and whoami only.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 hiraeeth
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 hiraeeth
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|