@delegance/claude-autopilot 1.2.6 → 1.2.8
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 +11 -0
- package/package.json +1 -1
- package/src/cli/run.ts +19 -0
package/README.md
CHANGED
|
@@ -10,6 +10,17 @@ npm install @delegance/claude-autopilot
|
|
|
10
10
|
|
|
11
11
|
**Prerequisites:** Node 22+, [`gh` CLI](https://cli.github.com/) authenticated, [`claude` CLI](https://claude.ai/claude-code) (Claude Code).
|
|
12
12
|
|
|
13
|
+
## Claude Code Skill
|
|
14
|
+
|
|
15
|
+
The package ships a ready-made Claude Code skill. After installing, copy it into your project:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
mkdir -p .claude/skills
|
|
19
|
+
cp node_modules/@delegance/claude-autopilot/skills/autopilot.md .claude/skills/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Claude will then know when and how to invoke `autopilot run`, interpret findings, and wire it into your dev pipeline automatically.
|
|
23
|
+
|
|
13
24
|
## Quick Start
|
|
14
25
|
|
|
15
26
|
```bash
|
package/package.json
CHANGED
package/src/cli/run.ts
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
+
|
|
5
|
+
// Load .env.local / .env so OPENAI_API_KEY etc. are available without shell export
|
|
6
|
+
const ENV_FILES = ['.env.local', '.env.dev', '.env.development', '.env'];
|
|
7
|
+
for (const f of ENV_FILES) {
|
|
8
|
+
const p = path.join(process.cwd(), f);
|
|
9
|
+
if (!fs.existsSync(p)) continue;
|
|
10
|
+
for (const line of fs.readFileSync(p, 'utf8').split('\n')) {
|
|
11
|
+
const t = line.trim();
|
|
12
|
+
if (!t || t.startsWith('#')) continue;
|
|
13
|
+
const eq = t.indexOf('=');
|
|
14
|
+
if (eq < 0) continue;
|
|
15
|
+
const key = t.slice(0, eq).trim();
|
|
16
|
+
if (!process.env[key]) {
|
|
17
|
+
process.env[key] = t.slice(eq + 1).trim().replace(/^['"]|['"]$/g, '');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
|
|
4
23
|
import { loadConfig } from '../core/config/loader.ts';
|
|
5
24
|
import { resolvePreset } from '../core/config/preset-resolver.ts';
|
|
6
25
|
import { mergeConfigs } from '../core/config/preset-resolver.ts';
|