@cjvana/claude-auto 0.3.2 → 0.4.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 +1 -1
- package/README.md +3 -10
- package/package.json +1 -1
- package/scripts/postinstall.mjs +20 -95
- package/scripts/preuninstall.mjs +5 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-auto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Autonomous Claude Code cron jobs for continuous codebase improvement. Set up scheduled jobs where Claude autonomously works on your repos — you wake up to PRs.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "claude-auto contributors"
|
package/README.md
CHANGED
|
@@ -10,19 +10,12 @@ Claude researches your codebase, picks the highest-value work (open issues, bugs
|
|
|
10
10
|
npm install -g @cjvana/claude-auto
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The postinstall script
|
|
13
|
+
The postinstall script copies slash commands to `~/.claude/commands/claude-auto/`. Restart Claude Code and `/claude-auto:setup` will be available in autocomplete.
|
|
14
14
|
|
|
15
|
-
**If auto-
|
|
15
|
+
**If auto-install fails**, copy manually:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
|
|
19
|
-
claude plugin install claude-auto@claude-auto-local
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Or load per-session without installing:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
claude --plugin-dir $(npm root -g)/@cjvana/claude-auto
|
|
18
|
+
cp $(npm root -g)/@cjvana/claude-auto/skills/*/SKILL.md ~/.claude/commands/claude-auto/
|
|
26
19
|
```
|
|
27
20
|
|
|
28
21
|
### Requirements
|
package/package.json
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -1,106 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mkdirSync, writeFileSync, existsSync, symlinkSync, readlinkSync } from "node:fs";
|
|
1
|
+
import { cpSync, mkdirSync, readdirSync, existsSync } from "node:fs";
|
|
3
2
|
import { join } from "node:path";
|
|
4
3
|
import { homedir } from "node:os";
|
|
5
4
|
|
|
6
5
|
const pluginRoot = join(import.meta.dirname, "..");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const marketplaceManifest = join(marketplaceDir, ".claude-plugin", "marketplace.json");
|
|
10
|
-
const symlinkPath = join(marketplacePluginDir, "claude-auto");
|
|
6
|
+
const skillsSource = join(pluginRoot, "skills");
|
|
7
|
+
const commandsDir = join(homedir(), ".claude", "commands", "claude-auto");
|
|
11
8
|
|
|
12
9
|
try {
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
name: "claude-auto",
|
|
27
|
-
description:
|
|
28
|
-
"Autonomous Claude Code cron jobs for continuous codebase improvement",
|
|
29
|
-
source: "./plugins/claude-auto",
|
|
30
|
-
category: "productivity",
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
null,
|
|
35
|
-
2,
|
|
36
|
-
) + "\n",
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
// 2. Symlink plugin into marketplace (remove stale link first)
|
|
40
|
-
try {
|
|
41
|
-
if (existsSync(symlinkPath)) {
|
|
42
|
-
const current = readlinkSync(symlinkPath);
|
|
43
|
-
if (current !== pluginRoot) {
|
|
44
|
-
// Stale symlink — remove and recreate
|
|
45
|
-
const { unlinkSync } = await import("node:fs");
|
|
46
|
-
unlinkSync(symlinkPath);
|
|
47
|
-
symlinkSync(pluginRoot, symlinkPath);
|
|
10
|
+
// Install slash commands to ~/.claude/commands/claude-auto/
|
|
11
|
+
// This gives /claude-auto:setup, /claude-auto:list, etc.
|
|
12
|
+
if (existsSync(skillsSource)) {
|
|
13
|
+
mkdirSync(commandsDir, { recursive: true });
|
|
14
|
+
const skills = readdirSync(skillsSource, { withFileTypes: true });
|
|
15
|
+
for (const entry of skills) {
|
|
16
|
+
if (entry.isDirectory()) {
|
|
17
|
+
const src = join(skillsSource, entry.name, "SKILL.md");
|
|
18
|
+
const dest = join(commandsDir, `${entry.name}.md`);
|
|
19
|
+
if (existsSync(src)) {
|
|
20
|
+
cpSync(src, dest);
|
|
21
|
+
}
|
|
48
22
|
}
|
|
49
|
-
} else {
|
|
50
|
-
symlinkSync(pluginRoot, symlinkPath);
|
|
51
23
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
writeFileSync(
|
|
55
|
-
marketplaceManifest,
|
|
56
|
-
JSON.stringify(
|
|
57
|
-
{
|
|
58
|
-
name: "claude-auto-local",
|
|
59
|
-
description: "Local marketplace for claude-auto plugin",
|
|
60
|
-
owner: { name: "claude-auto", email: "noreply@claude-auto.dev" },
|
|
61
|
-
plugins: [
|
|
62
|
-
{
|
|
63
|
-
name: "claude-auto",
|
|
64
|
-
description:
|
|
65
|
-
"Autonomous Claude Code cron jobs for continuous codebase improvement",
|
|
66
|
-
source: pluginRoot,
|
|
67
|
-
category: "productivity",
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
null,
|
|
72
|
-
2,
|
|
73
|
-
) + "\n",
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// 3. Register marketplace + install plugin via Claude CLI
|
|
78
|
-
try {
|
|
79
|
-
execFileSync("claude", ["plugin", "marketplace", "add", marketplaceDir], {
|
|
80
|
-
stdio: "pipe",
|
|
81
|
-
timeout: 15000,
|
|
82
|
-
});
|
|
83
|
-
} catch {
|
|
84
|
-
// Marketplace may already be registered — that's fine
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
try {
|
|
88
|
-
execFileSync("claude", ["plugin", "install", "claude-auto@claude-auto-local"], {
|
|
89
|
-
stdio: "inherit",
|
|
90
|
-
timeout: 15000,
|
|
91
|
-
});
|
|
92
|
-
console.log("claude-auto: Plugin installed successfully");
|
|
93
|
-
console.log(
|
|
94
|
-
"claude-auto: Slash commands available — /claude-auto:setup, /claude-auto:list, etc.",
|
|
95
|
-
);
|
|
96
|
-
} catch {
|
|
97
|
-
console.warn("claude-auto: Could not auto-install plugin via Claude CLI.");
|
|
98
|
-
console.warn("claude-auto: Register manually:");
|
|
99
|
-
console.warn(` claude plugin marketplace add ${marketplaceDir}`);
|
|
100
|
-
console.warn(" claude plugin install claude-auto@claude-auto-local");
|
|
24
|
+
console.log("claude-auto: Slash commands installed");
|
|
25
|
+
console.log("claude-auto: Available: /claude-auto:setup, /claude-auto:list, /claude-auto:logs, etc.");
|
|
101
26
|
}
|
|
102
27
|
} catch (err) {
|
|
103
|
-
console.warn("claude-auto:
|
|
104
|
-
console.warn("claude-auto:
|
|
105
|
-
console.warn(`
|
|
28
|
+
console.warn("claude-auto: Could not install slash commands:", err.message);
|
|
29
|
+
console.warn("claude-auto: Copy skills manually:");
|
|
30
|
+
console.warn(` cp ${skillsSource}/*/SKILL.md ~/.claude/commands/claude-auto/`);
|
|
106
31
|
}
|
package/scripts/preuninstall.mjs
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { rmSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { homedir } from "node:os";
|
|
2
4
|
|
|
3
5
|
try {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
timeout: 15000,
|
|
7
|
-
});
|
|
8
|
-
console.log("claude-auto: Plugin uninstalled");
|
|
6
|
+
rmSync(join(homedir(), ".claude", "commands", "claude-auto"), { recursive: true, force: true });
|
|
7
|
+
console.log("claude-auto: Slash commands removed");
|
|
9
8
|
} catch {
|
|
10
9
|
// Best-effort — don't fail npm uninstall
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
execFileSync("claude", ["plugin", "marketplace", "remove", "claude-auto-local"], {
|
|
15
|
-
stdio: "pipe",
|
|
16
|
-
timeout: 15000,
|
|
17
|
-
});
|
|
18
|
-
} catch {
|
|
19
|
-
// Marketplace removal is optional
|
|
20
|
-
}
|