@andrestobelem/clone 0.1.1 → 0.1.3
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 +28 -2
- package/bin/clone.js +6 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Run a local issue and project workspace without installing Python.
|
|
4
4
|
|
|
5
|
-
Website: <https://clone
|
|
5
|
+
Website: <https://clone.andrestobelem.dev>
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npx @andrestobelem/clone
|
|
@@ -22,7 +22,33 @@ npx @andrestobelem/clone --help
|
|
|
22
22
|
|
|
23
23
|
Use `--no-open` with `start` to keep the browser closed. Set `CLONE_DATA_DIR` to select another data directory.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
## Use one workspace per repository
|
|
26
|
+
|
|
27
|
+
Open a terminal in the repository that the workspace belongs to. Then run:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npx @andrestobelem/clone --local
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
With `--local`, the current directory determines where Clone stores data. Clone creates `.clone/` there and stores `workspace.sqlite3`, snapshots, attachments, and backups inside it. Running the same command from another repository creates a separate workspace.
|
|
34
|
+
|
|
35
|
+
Add the directory to that repository's `.gitignore` unless you have a specific backup workflow:
|
|
36
|
+
|
|
37
|
+
```gitignore
|
|
38
|
+
.clone/
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Always run the command from the same repository to reopen that workspace. `--local` does not copy or move records from the operating system's user data directory. `--data-dir PATH` selects an explicit directory.
|
|
42
|
+
|
|
43
|
+
## Agent skill
|
|
44
|
+
|
|
45
|
+
Install the shared Clone skill for Codex and Claude Code:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npx skills add andrestobelem/clone --skill clone-workspace --agent codex claude-code -y
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The skill gives each agent a stable actor identity and a verified workflow for reads, writes, and synchronization recovery.
|
|
26
52
|
|
|
27
53
|
## Data locations
|
|
28
54
|
|
package/bin/clone.js
CHANGED
|
@@ -145,9 +145,13 @@ function parseStartArguments(arguments_) {
|
|
|
145
145
|
function initialize(binary, database, storage) {
|
|
146
146
|
if (fs.existsSync(database) || fs.existsSync(path.join(storage, "snapshot"))) return;
|
|
147
147
|
fs.mkdirSync(storage, { recursive: true });
|
|
148
|
-
const result = spawnSync(binary, ["--db", database, "init"], { encoding: "utf8"
|
|
148
|
+
const result = spawnSync(binary, ["--db", database, "init"], { encoding: "utf8" });
|
|
149
149
|
if (result.error) throw result.error;
|
|
150
|
-
if (result.status !== 0)
|
|
150
|
+
if (result.status !== 0) {
|
|
151
|
+
if (result.stdout) process.stdout.write(result.stdout);
|
|
152
|
+
if (result.stderr) process.stderr.write(result.stderr);
|
|
153
|
+
throw new Error(`Clone initialization failed with exit code ${result.status}.`);
|
|
154
|
+
}
|
|
151
155
|
}
|
|
152
156
|
|
|
153
157
|
async function start(binary, arguments_, environment = process.env) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrestobelem/clone",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Run the Clone issue and project workspace locally.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/andrestobelem/clone.git"
|
|
9
9
|
},
|
|
10
|
-
"homepage": "https://clone
|
|
10
|
+
"homepage": "https://clone.andrestobelem.dev",
|
|
11
11
|
"bugs": "https://github.com/andrestobelem/clone/issues",
|
|
12
12
|
"type": "commonjs",
|
|
13
13
|
"bin": {
|