@coderook/cli 0.48.0 → 0.49.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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "coderook",
|
|
3
3
|
"displayName": "CodeRook",
|
|
4
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.
|
|
5
|
+
"version": "0.49.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ACCA Gaming Productions",
|
|
8
8
|
"url": "https://coderook.com"
|
package/dist/cli/src/cli.js
CHANGED
|
@@ -3256,8 +3256,12 @@ const SPECS = [
|
|
|
3256
3256
|
{ flags: "--base-version <id>", description: "select a saved base version" },
|
|
3257
3257
|
{ flags: "--revision <number>", description: "the exact reviewed workspace revision" },
|
|
3258
3258
|
{ flags: "--key <operation-key>", description: "unique idempotency key; preserve it for retries" },
|
|
3259
|
-
{ flags: "--path <path>", description: "read this project-relative file" },
|
|
3259
|
+
{ flags: "--path <path>", description: "read this project-relative file; search: only this folder or glob (src/api, client/**/*.tsx, *.md)" },
|
|
3260
3260
|
{ flags: "--query <text>", description: "text to find in the remote workspace" },
|
|
3261
|
+
{ flags: "--regex", description: "search: the query is a regular expression (a bad one is an error, not zero hits)" },
|
|
3262
|
+
{ flags: "--case-sensitive", description: "search: match upper and lower case exactly" },
|
|
3263
|
+
{ flags: "--count", description: "search: how many matches in each file, not the lines" },
|
|
3264
|
+
{ flags: "--hunks", description: "diff: unified-diff hunks instead of whole before/after files" },
|
|
3261
3265
|
{ flags: "--offset <number>", description: "continue a paginated listing, search or diff" },
|
|
3262
3266
|
{ flags: "--start-line <number>", description: "first text line to read" },
|
|
3263
3267
|
{ flags: "--lines <number>", description: "maximum text lines to read" },
|
|
@@ -101,7 +101,13 @@ async function commandWorkspace(parsed) {
|
|
|
101
101
|
if (!workspace)
|
|
102
102
|
throw new Error("Supply the remote workspace ID; this command does not use a local project folder");
|
|
103
103
|
path += `/${encodeURIComponent(workspace)}`;
|
|
104
|
-
if (operation === "read"
|
|
104
|
+
if (operation === "read" && Array.isArray(data.files)) {
|
|
105
|
+
/* Several files in one request: --data-file {"files":[{"path":"a.ts","startLine":1,"lines":40},…]}. */
|
|
106
|
+
path += "/files/read";
|
|
107
|
+
method = "POST";
|
|
108
|
+
body = { files: data.files, ...(integer("revision") !== undefined ? { revision: integer("revision") } : {}) };
|
|
109
|
+
}
|
|
110
|
+
else if (operation === "read" || operation === "files") {
|
|
105
111
|
const q = new URLSearchParams();
|
|
106
112
|
for (const [name, value] of Object.entries({
|
|
107
113
|
path: flag("path"),
|
|
@@ -114,10 +120,20 @@ async function commandWorkspace(parsed) {
|
|
|
114
120
|
q.set(name, String(value));
|
|
115
121
|
path += `/files?${q}`;
|
|
116
122
|
}
|
|
117
|
-
else if (operation === "search")
|
|
118
|
-
|
|
123
|
+
else if (operation === "search") {
|
|
124
|
+
const q = new URLSearchParams({ q: flag("query") ?? "", offset: String(integer("offset") ?? 0) });
|
|
125
|
+
if (parsed.flags.has("regex"))
|
|
126
|
+
q.set("regex", "1");
|
|
127
|
+
if (parsed.flags.has("case-sensitive"))
|
|
128
|
+
q.set("caseSensitive", "1");
|
|
129
|
+
if (parsed.flags.has("count"))
|
|
130
|
+
q.set("count", "1");
|
|
131
|
+
if (flag("path"))
|
|
132
|
+
q.set("path", flag("path"));
|
|
133
|
+
path += `/search?${q}`;
|
|
134
|
+
}
|
|
119
135
|
else if (operation === "diff")
|
|
120
|
-
path += `/diff?offset=${integer("offset") ?? 0}`;
|
|
136
|
+
path += `/diff?offset=${integer("offset") ?? 0}${parsed.flags.has("hunks") ? "&format=hunks" : ""}`;
|
|
121
137
|
else if (operation === "patch") {
|
|
122
138
|
path += "/changes";
|
|
123
139
|
method = "POST";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderook/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "The command line for CodeRook (coderook.com): version control and project hosting for projects of any size. Every save is a compressed snapshot, private or public, never used to train AI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://coderook.com",
|
package/skills/coderook/SKILL.md
CHANGED
|
@@ -23,6 +23,8 @@ Use `cbx submit` for folders that are not git repositories.
|
|
|
23
23
|
|
|
24
24
|
Use `cbx workspace` when the person wants to continue a CodeRook project from a lightweight laptop. Do not clone the full project unless that work needs local files. Start with `cbx workspace list <project>` or open a named draft with a unique `--key`. Keep its ID and revision, read/search the needed paths, edit with explicit hashes in a JSON `--data-file`, review the diff, then save the authorised revision. Retry a lost response using the same operation key and arguments. Saving and deploying are different actions.
|
|
25
25
|
|
|
26
|
+
Send only what changes. In a `patch` data file a change can be `{"path":"src/a.ts","edits":[{"oldText":"…","newText":"…"}]}` (each oldText must appear exactly once, or set `"replaceAll":true`; a CRLF file needs `\r\n` in the text) or `{"path":"new/name.ts","from":"old/name.ts"}` to rename; the reply gives each changed file's new sha256. Search with `--regex`, `--case-sensitive`, `--path <folder or glob>` and `--count`; read several files in one call with `read --data-file` holding `{"files":[{"path":"…","startLine":1,"lines":80}]}`; review with `diff --hunks`. An empty project gets its first version with the remote MCP `create_first_version` tool.
|
|
27
|
+
|
|
26
28
|
`cbx workspace show <project> <id>` includes the administrator-configured recipe commands and target information. Run a named recipe, inspect its job with `logs`, and use `cancel` if needed. Only deploy an explicitly requested target and a saved version with applicable checks. A missing recipe requires configuration; running a local terminal command does not change remote files.
|
|
27
29
|
|
|
28
30
|
To hand a draft to a machine that is not signed in as the owner, run `cbx workspace assign <project> <draft> --name "Laptop"`. It prints a token that reaches that one draft (read the project, edit, save and run its checks; no deploys, settings, other drafts or more tokens). Tell the person to give it to the other machine privately; never repeat the token yourself. On that machine: `cbx sign-in` (paste the token), `cbx workspace checkout <project> <draft> [folder]`, edit the files, then `cbx workspace push` (add `--save -m "…"` to save, `--dry-run` to preview). A checked-out folder is not a linked folder, so `cbx submit` does not apply there. A handed-over machine's saves never land on the draft's line directly: they go to the draft's own line `drafts/<name>-<id>` and open a pull request into it, which the owner or a reviewer approves and merges (see it with `cbx pr list`). Saves made signed in as the owner go straight to the line. `cbx workspace assignments` lists live tokens and `cbx workspace unassign` ends one; archiving the draft ends them all.
|