@fizzyflow/wdoublesync_cli 1.0.3 → 1.0.6

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/SKILL.md +55 -81
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@ Each `push` stores a versioned, gzip-compressed diff or shapshot inside an [Endl
8
8
 
9
9
  ## AI Agent Skill
10
10
 
11
- wdoublesync ships with a [SKILL.md](https://github.com/FizzyFlow/wdoublesync_cli/SKILL.md) that teaches AI coding agents how to use it autonomously. Once loaded, an agent can push folders to on-chain storage, pull specific versions for inspection or rollback, watch a directory for bi-directional sync, and run rebate to compact a vector's archive — all without hand-holding on the commands. This is useful when you want an agent to persist its own working state, archive project snapshots, or coordinate versioned data across sessions. The skill also covers how to combine wdoublesync with [MemWal](https://github.com/MystenLabs/MemWal) for workflows.
11
+ wdoublesync ships with a [SKILL.md](https://github.com/FizzyFlow/wdoublesync_cli/blob/main/SKILL.md) that teaches AI coding agents how to use it autonomously. Once loaded, an agent can push folders to on-chain storage, pull specific versions for inspection or rollback, watch a directory for bi-directional sync, and run rebate to compact a vector's archive — all without hand-holding on the commands. This is useful when you want an agent to persist its own working state, archive project snapshots, or coordinate versioned data across sessions. The skill also covers how to combine wdoublesync with [MemWal](https://github.com/MystenLabs/MemWal) for workflows.
12
12
 
13
13
  ## Installation
14
14
 
package/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: wdoublesync
3
- version: 0.1.7
3
+ version: 0.1.8
4
4
  description: Claude agent skill for decentralized file storage, versioning, and sync on Sui + Walrus + Seal. Enables agents to push local folders as on-chain vectors, pull versions, manage Walrus storage, and watch for changes.
5
5
  keywords: [walrus, sui, storage, versioning, sync, seal-encryption, blockchain, defi]
6
6
  ---
@@ -22,7 +22,7 @@ An abstract virtual filesystem that synchronizes folder state on-chain via Sui +
22
22
 
23
23
  ## When NOT to Use
24
24
 
25
- - For **semantic/vector search over text** — if you need to index and search text by meaning, use [MemWal](https://raw.githubusercontent.com/MystenLabs/MemWal/refs/heads/dev/SKILL.md) instead (vector database with embeddings)
25
+ - For **semantic/vector search over text** — if you need to index and search text by meaning, use [MemWal](https://raw.githubusercontent.com/MystenLabs/MemWal/refs/heads/dev/SKILL.md) instead (vector database with embeddings). You'd better use 'default' workspace for MemWal, no need to try to create one based on the current directory or doublesync state.
26
26
 
27
27
  ## MemWal + WDoubleSync
28
28
 
@@ -44,7 +44,9 @@ npm install -g @fizzyflow/wdoublesync_cli
44
44
  # Now use: wdoublesync <command> (installed from npm)
45
45
  ```
46
46
 
47
- After you have access to `wdoublesync`, you can run `wdoublesync --help` to see the available commands and options. Use `wdoublesync info` to check your currently connected wallet (`your wallet` field), if there's no - wallet, you can set one with `--key` or `--phrase` flags, or by exporting `WDOUBLESYNC_KEY` environment variable. Feel free to ask user to set up a wallet if they haven't done so yet, as it's required for push operations and pull encrypted vectors.
47
+ After you have access to `wdoublesync`, you can run `wdoublesync --help` to see the available commands and options. Use `wdoublesync info` to check your currently connected wallet (`your wallet` field), if there's no wallet, you can set one with `--key` or `--phrase` flags, or by exporting `WDOUBLESYNC_KEY` environment variable. Feel free to ask user to set up a wallet if they haven't done so yet, as it's required for push operations and pull encrypted vectors.
48
+
49
+ After wdoublesync is installed, ask the user to set up MemWal if they want.
48
50
 
49
51
  ### Set up your key (required for push and pull of encrypted vectors)
50
52
 
@@ -56,23 +58,21 @@ For **read-only public vectors**, the key is not required.
56
58
 
57
59
  ### Push a folder (creates new vector if no ID provided)
58
60
 
59
- Be sure to run this command from the folder you want to sync:
61
+ Pass the path explicitly no need to `cd` first:
60
62
 
61
63
  ```bash
62
- cd ~/my-folder
63
- wdoublesync push
64
- # Creates new vector + syncs current folder
64
+ wdoublesync push ~/my-folder
65
+ # Creates new vector + syncs folder
65
66
  # Output: created: 0x1234... / syncing ./ → 0x1234...
66
67
  ```
67
68
 
68
- This creates a new EndlessVector on-chain and pushes the current folder as a snapshot encrypted by Seal. The output will show the vector ID (e.g., `0x1234...`) which you can use for future pulls or pushes.
69
+ This creates a new EndlessVector on-chain and pushes the folder as a snapshot encrypted by Seal. The output will show the vector ID (e.g., `0x1234...`) which you can use for future pulls or pushes. It's a good idea to save this ID to MemWal, with addition to the path info, so you can easily find it later when you want to pull or view the vector state. Ask a user if they want to set up MemWal if it's not available and you are going to push new vector.
69
70
 
70
71
  ### Pull a vector to restore it
71
72
 
72
73
  ```bash
73
- mkdir ~/restored-folder && cd ~/restored-folder
74
- wdoublesync pull 0x1234...
75
- # Restores vector to current directory
74
+ wdoublesync pull 0x1234... ~/restored-folder
75
+ # Restores vector to the specified folder
76
76
  ```
77
77
 
78
78
  ### View vector metadata
@@ -85,104 +85,84 @@ wdoublesync info 0x1234...
85
85
  ### Watch for changes (bi-directional sync)
86
86
 
87
87
  ```bash
88
- cd ~/my-data
89
- wdoublesync watch 0x1234... --poll-interval 5
90
- # Monitors local folder, auto-pushes changes
88
+ wdoublesync watch 0x1234... ~/my-data --poll-interval 5
89
+ # Monitors folder, auto-pushes changes
91
90
  # Checks remote every 5 seconds, auto-pulls updates
92
91
  ```
93
92
 
94
93
  ## API Surface
95
94
 
96
- All commands operate on the **current working directory** — `cd` into your folder first.
97
-
98
95
  | Command | Arguments | Use Case |
99
96
  |---------|-----------|----------|
100
- | **push** | `[vectorId]` `[options]` | Sync current folder to vector; creates new vector if no ID given |
101
- | **pull** | `vectorId` `[options]` | Restore vector (default: latest version) into current directory |
102
- | **info** | `[vectorId]` | No ID: show chain + wallet. With ID: full vector details |
103
- | **watch** | `vectorId` `[options]` | Bi-directional sync: auto-push local changes, auto-pull remote updates |
104
- | **rebate** | `vectorId` | Burn archive patches, push current folder as fresh single snapshot |
97
+ | **push** | `[vectorId]` `[path]` `[options]` | Sync folder to vector; creates new vector if no ID given |
98
+ | **pull** | `vectorId` `[path]` `[options]` | Restore vector (default: latest version) into folder |
99
+ | **info** | `[vectorId]` `[path]` | No ID: show chain + wallet. With ID: full vector details |
100
+ | **watch** | `vectorId` `[path]` `[options]` | Bi-directional sync: auto-push local changes, auto-pull remote updates |
101
+ | **rebate** | `vectorId` `[path]` | Burn archive patches, push folder as fresh single snapshot |
105
102
 
106
103
  ### Command Examples
107
104
 
108
105
  #### push (create new vector)
109
106
 
110
107
  ```bash
111
- cd ~/my-data
112
- wdoublesync push
113
- # Syncs current folder as new vector
108
+ wdoublesync push ~/my-data
114
109
  # Output: creating new EndlessVector on testnet...
115
110
  # created: 0xabc123...
116
111
  # syncing ./ → 0xabc123...
117
112
  ```
118
113
 
114
+ #### push (to existing vector)
115
+
116
+ ```bash
117
+ wdoublesync push 0x1234... ~/my-data
118
+ ```
119
+
119
120
  #### push (with manifest for faster change detection)
120
121
 
121
122
  ```bash
122
- cd ~/my-data
123
- wdoublesync push 0x1234... --manifest
124
- # Writes .wdoublesync manifest; faster change detection on future pushes
123
+ wdoublesync push 0x1234... ~/my-data --manifest
125
124
  ```
126
125
 
127
126
  #### push (full snapshot, not incremental)
128
127
 
129
128
  ```bash
130
- cd ~/my-data
131
- wdoublesync push 0x1234... --force-snapshot
129
+ wdoublesync push 0x1234... ~/my-data --force-snapshot
132
130
  # Uploads entire snapshot, useful if history is corrupted
133
131
  ```
134
132
 
135
133
  #### pull (latest version)
136
134
 
137
135
  ```bash
138
- mkdir ~/restored && cd ~/restored
139
- wdoublesync pull 0x1234...
140
- # Restores latest version to current directory
136
+ wdoublesync pull 0x1234... ~/restored
141
137
  ```
142
138
 
143
139
  #### pull (specific version)
144
140
 
145
141
  ```bash
146
- cd ~/restored
147
- wdoublesync pull 0x1234... --version 10
148
- # Restores version 10 instead of latest
142
+ wdoublesync pull 0x1234... ~/restored --version 10
149
143
  ```
150
144
 
151
145
  #### watch (bi-directional)
152
146
 
153
147
  ```bash
154
- cd ~/my-data
155
- wdoublesync watch 0x1234... --poll-interval 5
156
- # Monitors current folder, auto-pushes on change (debounce: 1000ms default)
148
+ wdoublesync watch 0x1234... ~/my-data --poll-interval 5
149
+ # Auto-pushes on change (debounce: 1000ms default)
157
150
  # Checks remote every 5 seconds, auto-pulls new versions
158
151
  # Runs indefinitely; stop with Ctrl+C
159
152
  ```
160
153
 
161
- #### watch (push-only)
162
-
163
- ```bash
164
- cd ~/my-data
165
- wdoublesync watch 0x1234... --push-only
166
- # Only auto-push on local changes, don't pull remote updates
167
- ```
168
-
169
- #### watch (pull-only)
154
+ #### watch (push-only or pull-only)
170
155
 
171
156
  ```bash
172
- cd ~/my-data
173
- wdoublesync watch 0x1234... --pull-only
174
- # Only pull remote updates, don't auto-push local changes
157
+ wdoublesync watch 0x1234... ~/my-data --push-only
158
+ wdoublesync watch 0x1234... ~/my-data --pull-only
175
159
  ```
176
160
 
177
161
  #### rebate
178
162
 
179
- When user asks to rebate, you can explain that this command is useful after many incremental syncs to reclaim on-chain storage. It burns the archive history and pushes the current folder as a fresh single snapshot. Make sure user understands that after rebate, only the latest snapshot is available, and old patches will be burned.
180
-
181
163
  ```bash
182
- cd ~/my-data
183
- wdoublesync rebate 0x1234...
184
- # Burns archive history, pushes current folder as fresh single snapshot
185
- # Useful after many incremental syncs to reclaim on-chain storage
164
+ wdoublesync rebate 0x1234... ~/my-data
165
+ # Burns archive history, pushes folder as fresh single snapshot
186
166
  ```
187
167
 
188
168
 
@@ -217,14 +197,12 @@ wdoublesync rebate 0x1234...
217
197
 
218
198
  ```bash
219
199
  # 1. Push a folder (creates new vector on first push)
220
- cd ~/important-data
221
- wdoublesync push
200
+ wdoublesync push ~/important-data
222
201
  # Output: creating new EndlessVector on testnet...
223
202
  # created: 0xabc123...
224
203
 
225
204
  # 2. Verify by pulling to a fresh folder
226
- mkdir ~/verify-tmp && cd ~/verify-tmp
227
- wdoublesync pull 0xabc123...
205
+ wdoublesync pull 0xabc123... ~/verify-tmp
228
206
 
229
207
  # 3. Check file counts match
230
208
  ls ~/important-data | wc -l
@@ -234,21 +212,18 @@ ls ~/verify-tmp | wc -l
234
212
  ### Workflow 2: Multi-version history and rollback
235
213
 
236
214
  ```bash
237
- cd ~/data
238
215
  # Push version 1
239
- wdoublesync push 0xabc123...
216
+ wdoublesync push 0xabc123... ~/data
240
217
 
241
218
  # Make changes, push version 2
242
- echo "new file" > new.txt
243
- wdoublesync push 0xabc123...
219
+ echo "new file" > ~/data/new.txt
220
+ wdoublesync push 0xabc123... ~/data
244
221
 
245
222
  # List all versions
246
223
  wdoublesync info 0xabc123...
247
224
 
248
225
  # Rollback to version 1
249
- mkdir ~/data-v1 && cd ~/data-v1
250
- wdoublesync pull 0xabc123... --version 1
251
- # Folder now matches state from version 1
226
+ wdoublesync pull 0xabc123... ~/data-v1 --version 1
252
227
  ```
253
228
 
254
229
  ### Workflow 3: Rebate to compact archive
@@ -256,28 +231,19 @@ wdoublesync pull 0xabc123... --version 1
256
231
  After many incremental syncs, archive grows with lots of patches. Rebate burns old data and rebuilds as single snapshot:
257
232
 
258
233
  ```bash
259
- # Before rebate: many small patches
260
234
  wdoublesync info 0xabc123...
261
235
  # Output: version 87, total size 45 MB (many patches)
262
236
 
263
- # Run rebate from current directory
264
- cd ~/data
265
- wdoublesync rebate 0xabc123...
237
+ wdoublesync rebate 0xabc123... ~/data
266
238
  # Output: Burned 86 items, pushed version 88 (3.2 MB)
267
-
268
- # After rebate: single snapshot instead of 87 patches
269
- # Much more efficient for Walrus storage
239
+ # Single snapshot instead of 87 patches — much more efficient
270
240
  ```
271
241
 
272
242
  ### Workflow 4: Watch for external changes
273
243
 
274
244
  ```bash
275
- # Another user pushes to the same vector
276
- # You want to auto-sync your local copy
277
-
278
- cd ~/data
279
- wdoublesync watch 0xabc123... --poll-interval 5
280
- # Monitors local folder for changes, auto-pushes them
245
+ wdoublesync watch 0xabc123... ~/data --poll-interval 5
246
+ # Monitors folder for changes, auto-pushes them
281
247
  # Also checks remote every 5 seconds for updates, auto-pulls
282
248
  # Press Ctrl+C to stop
283
249
  ```
@@ -290,8 +256,16 @@ wdoublesync watch 0xabc123... --poll-interval 5
290
256
  | **"vector-id is required"** | Command needs a vector ID but none provided | Pass the vector ID as the first argument: `wdoublesync pull 0x...` |
291
257
  | **"This vector is Seal-encrypted"** | Vector is encrypted but no key provided | Provide `--key` or `--phrase`, or export `WDOUBLESYNC_KEY` |
292
258
  | **"at() is out of range, this part of archive has been burned"** | Trying to restore a version whose archive was burned by rebate | Only the latest snapshot is available after rebate; pull without `--version` |
293
- | **Connection errors** | RPC endpoint unreachable or wrong chain | You may need to try again little later |
259
+ | **Connection errors** | RPC endpoint unreachable or wrong chain | Check `--chain` flag; try again in a moment if the RPC is temporarily down |
260
+
294
261
 
295
262
  ## Links
296
263
 
297
264
  - **Repository**: https://github.com/FizzyFlow/wdoublesync_cli
265
+
266
+ ## Agent Guidelines
267
+
268
+ - **Always run `wdoublesync` commands as standalone Bash calls** — never chain them with `&&`, `;`, or combine with file creation commands in the same shell invocation. Create files first in a separate tool call, then push in a dedicated call.
269
+ - **Keep user posted**, After a successful push to an endless_vector, inform the user about the vector ID and the version that was just pushed. Also propose they view the current state in the browser by providing a link to the explorer, e.g. https://doublesync.wal.app/vector#testnet:0xafe7ab81339c9c4e5750f20708ef982ef553d9b20b17a85342e4af055661a852
270
+ - **MemWal vector ID logging is critical on first push** — when a new vector is created, immediately propose saving the vector ID + local path to MemWal. Phrase it as: "Want me to save the vector ID and path to MemWal so we can find it later?" This is the most important MemWal step — without it the vector ID can be lost. Only skip if the user explicitly says no.
271
+ - **MemWal version logging is mandatory after every push** — after every successful push, always propose saving a version description to MemWal. Phrase it as: "Want me to save a description of this version to MemWal?" and wait for the user response. Only skip if the user explicitly says no. Do not silently skip this step.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fizzyflow/wdoublesync_cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "description": "CLI tool built on the wdoublesync library to sync local folders to Walrus decentralised storage on the Sui network. Stores versioned gzip-compressed snapshots and diffs inside an EndlessVector on-chain object. Supports Seal encryption, manifest-based fast change detection, and full version history with point-in-time restore.",
6
6
  "bin": {