@coderook/cli 0.33.0 → 0.34.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/.claude-plugin/plugin.json +4 -3
- package/README.md +64 -9
- package/dist/cbx/src/core/upload.js +4 -0
- package/dist/cbx/src/local/remote.js +1 -0
- package/dist/cli/src/build_command.js +808 -0
- package/dist/cli/src/cli.js +278 -74
- package/dist/cli/src/config.js +6 -0
- package/dist/cli/src/folder_match.js +62 -0
- package/dist/cli/src/git_remote.js +76 -11
- package/dist/cli/src/local_commands.js +23 -2
- package/dist/cli/src/mcp.js +39 -3
- package/dist/cli/src/project_choice.js +122 -0
- package/dist/cli/src/publish.js +1 -0
- package/package.json +1 -1
- package/skills/coderook/SKILL.md +66 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coderook",
|
|
3
3
|
"displayName": "CodeRook",
|
|
4
|
-
"description": "Save, browse and restore whole-snapshot versions of a project on CodeRook, from Claude Code.",
|
|
5
|
-
"version": "0.
|
|
4
|
+
"description": "Save, browse and restore whole-snapshot versions of a project on CodeRook, with cbx or plain git, from Claude Code.",
|
|
5
|
+
"version": "0.34.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ACCA Gaming Productions",
|
|
8
8
|
"url": "https://coderook.com"
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"coderook",
|
|
14
14
|
"versioning",
|
|
15
15
|
"snapshots",
|
|
16
|
-
"backup"
|
|
16
|
+
"backup",
|
|
17
|
+
"git"
|
|
17
18
|
]
|
|
18
19
|
}
|
package/README.md
CHANGED
|
@@ -80,9 +80,20 @@ cbx clone my-project fetch a project into a new folder
|
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
`status` and `submit` act on the current directory unless you name another.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
|
|
84
|
+
A folder is linked to its project by its first save, by `cbx clone`, or by
|
|
85
|
+
`cbx link <project>`, and the link travels with the folder (in
|
|
86
|
+
`.coderook/link.json`), so the same disk seen from another operating system is
|
|
87
|
+
still recognised. A folder that is not linked is never matched to a project by
|
|
88
|
+
name. Its first `submit` starts a new project, unless your account already has
|
|
89
|
+
one with a name like it; then you are asked which you mean. A script or an
|
|
90
|
+
assistant has to say:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
cbx submit --into my-project -m "…" this folder is that project
|
|
94
|
+
cbx submit --new -m "…" a separate project
|
|
95
|
+
cbx link my-project link it now, send nothing
|
|
96
|
+
```
|
|
86
97
|
|
|
87
98
|
`submit` sends only what changed. Files the service already holds are not
|
|
88
99
|
uploaded again, and the version it records still names every file in the
|
|
@@ -302,14 +313,31 @@ Installing the CLI also installs `git-remote-coderook`, so git talks to
|
|
|
302
313
|
CodeRook directly — both ways:
|
|
303
314
|
|
|
304
315
|
```
|
|
305
|
-
git clone coderook://my-project
|
|
316
|
+
git clone coderook://my-project # the remote is called origin
|
|
317
|
+
git remote add coderook coderook://my-project # or add it to a repository you have
|
|
306
318
|
git push coderook main
|
|
307
|
-
git fetch
|
|
319
|
+
git fetch coderook
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
If your folder is a git repository, use this rather than `cbx submit`: each
|
|
323
|
+
commit arrives with its own message, and every editor's built-in git panel
|
|
324
|
+
works with CodeRook without a plugin. `cbx submit` is the tool for folders
|
|
325
|
+
that are not git repositories. The helper is installed by
|
|
326
|
+
`npm install --global @coderook/cli`; the Claude Code plugin and `npx` do not
|
|
327
|
+
put it on your `PATH`.
|
|
328
|
+
|
|
329
|
+
**A project you started with `cbx submit`.** Its saves did not come from git,
|
|
330
|
+
so the first push from your repository is refused rather than replaying your
|
|
331
|
+
history on top of them. If the repository holds that project, adopt it once:
|
|
332
|
+
|
|
333
|
+
```
|
|
334
|
+
git push -o adopt coderook main
|
|
308
335
|
```
|
|
309
336
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
the
|
|
337
|
+
The project's saves stay as they are, your current commit is saved on top as
|
|
338
|
+
one save, and from then on every push sends one save per commit. Or start
|
|
339
|
+
from the project instead: `git clone coderook://my-project` and carry on in
|
|
340
|
+
the clone.
|
|
313
341
|
|
|
314
342
|
**Pushing.** Each commit becomes a version, oldest first, with its message
|
|
315
343
|
kept. Later pushes send only what is new, so the usual case — a few commits —
|
|
@@ -348,7 +376,7 @@ has two parents is rebuilt as a real git merge.
|
|
|
348
376
|
Each version records the commit it came from, so a colleague pushing the same
|
|
349
377
|
project does not republish history the project already holds. Pushing a git
|
|
350
378
|
history into a project whose versions came from somewhere else is refused
|
|
351
|
-
rather than interleaved.
|
|
379
|
+
rather than interleaved, unless you adopt it with `-o adopt` as above.
|
|
352
380
|
|
|
353
381
|
### The names are the same
|
|
354
382
|
|
|
@@ -408,6 +436,33 @@ artifacts or with `cbx attach <file>`, so a release made by pushing a tag
|
|
|
408
436
|
simply has none until something adds them — which is what a release without a
|
|
409
437
|
build has always looked like.
|
|
410
438
|
|
|
439
|
+
## Building for every platform
|
|
440
|
+
|
|
441
|
+
```
|
|
442
|
+
cbx build --plan how each target would be built on this machine
|
|
443
|
+
cbx build --target win,linux,mac build them
|
|
444
|
+
cbx build --target all --ship and attach them to the newest save
|
|
445
|
+
cbx build init describe the build in coderook.build.json
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
`cbx build` makes the project's executables for Windows, Linux and macOS on
|
|
449
|
+
the machine you are using. Each target is built natively, cross-compiled, in
|
|
450
|
+
Docker or in WSL, chosen from what is installed; one that cannot be built here
|
|
451
|
+
is named, with what would build it.
|
|
452
|
+
|
|
453
|
+
| Toolchain | From any machine | Needs its own system |
|
|
454
|
+
| --- | --- | --- |
|
|
455
|
+
| Go, Bun, Deno, .NET | Windows, Linux, macOS | — |
|
|
456
|
+
| Rust | all three, with cargo-zigbuild | macOS apps using system frameworks |
|
|
457
|
+
| Electron | Windows and Linux, with Docker (or wine) | macOS |
|
|
458
|
+
| PyInstaller | Linux, with Docker or WSL | Windows, macOS |
|
|
459
|
+
|
|
460
|
+
The toolchain is recognised from the files present. `coderook.build.json`
|
|
461
|
+
settles it, and takes a command of your own (`{target}`, `{os}`, `{arch}` and
|
|
462
|
+
`{out}` are filled in, and a target can name a Docker image to run it in).
|
|
463
|
+
Output lands in `.coderook/build/<target>/`, which is never uploaded and which
|
|
464
|
+
git ignores — not `dist/`, which Electron apps commonly package.
|
|
465
|
+
|
|
411
466
|
## Bundles
|
|
412
467
|
|
|
413
468
|
```
|
|
@@ -730,6 +730,10 @@ class Uploader {
|
|
|
730
730
|
const existing = await this.findBySlug(slug);
|
|
731
731
|
if (!existing)
|
|
732
732
|
throw error;
|
|
733
|
+
if (request.joinExisting === false) {
|
|
734
|
+
throw new Error(`Your account already has a project called ${slug}. Save into it on purpose, ` +
|
|
735
|
+
`or give this one another name.`);
|
|
736
|
+
}
|
|
733
737
|
return existing;
|
|
734
738
|
}
|
|
735
739
|
}
|
|
@@ -217,6 +217,7 @@ async function push(repository, options) {
|
|
|
217
217
|
message: shortMessage(save.message),
|
|
218
218
|
projectName: options.projectName,
|
|
219
219
|
repositoryId,
|
|
220
|
+
...(options.joinExisting === false ? { joinExisting: false } : {}),
|
|
220
221
|
baseVersionId,
|
|
221
222
|
...(baseVersionId ? { expectedHeadVersionId: baseVersionId } : {}),
|
|
222
223
|
track: line,
|