software-engineer 0.1.16 → 0.1.20
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/dist/claude.js +7 -5
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -0
- package/dist/index.js +2 -0
- package/package.json +4 -2
package/dist/claude.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import spawn from 'cross-spawn';
|
|
2
2
|
import { logInfo, logSuccess, logError, logDryRun } from './logger.js';
|
|
3
3
|
// Exit codes
|
|
4
4
|
const EXIT_SUCCESS = 0;
|
|
@@ -10,6 +10,9 @@ export async function runClaude(options, config) {
|
|
|
10
10
|
if (config.dangerouslySkipPermissions) {
|
|
11
11
|
args.push('--dangerously-skip-permissions');
|
|
12
12
|
}
|
|
13
|
+
if (config.printOutput) {
|
|
14
|
+
args.push('-p');
|
|
15
|
+
}
|
|
13
16
|
if (options.continueConversation) {
|
|
14
17
|
args.push('-c');
|
|
15
18
|
}
|
|
@@ -21,10 +24,9 @@ export async function runClaude(options, config) {
|
|
|
21
24
|
}
|
|
22
25
|
logInfo('Calling Claude...');
|
|
23
26
|
return new Promise((resolve) => {
|
|
24
|
-
// Spawn Claude using
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
// Piping stdout/stderr causes Claude to detect non-TTY and buffer/disable output
|
|
27
|
+
// Spawn Claude using cross-spawn for cross-platform compatibility
|
|
28
|
+
// cross-spawn handles Windows .cmd/.bat files automatically without shell:true
|
|
29
|
+
// Use 'inherit' for stdio to allow Claude's interactive UI to work properly
|
|
28
30
|
const child = spawn('claude', args, {
|
|
29
31
|
cwd: process.cwd(),
|
|
30
32
|
env: process.env,
|
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -19,6 +19,7 @@ export function loadConfigFromEnv() {
|
|
|
19
19
|
skipPush: parseBoolEnv(process.env.SF_SKIP_PUSH, false),
|
|
20
20
|
skipBranchManagement: parseBoolEnv(process.env.SF_SKIP_BRANCH_MANAGEMENT, false),
|
|
21
21
|
dangerouslySkipPermissions: parseBoolEnv(process.env.SF_DANGEROUSLY_SKIP_PERMISSIONS, false),
|
|
22
|
+
printOutput: parseBoolEnv(process.env.SF_PRINT_OUTPUT, false),
|
|
22
23
|
adaptiveExecution: parseBoolEnv(process.env.SF_ADAPTIVE_EXECUTION, false),
|
|
23
24
|
};
|
|
24
25
|
}
|
|
@@ -31,6 +32,7 @@ export function mergeConfig(envConfig, cliConfig) {
|
|
|
31
32
|
skipPush: cliConfig.skipPush ?? envConfig.skipPush ?? false,
|
|
32
33
|
skipBranchManagement: cliConfig.skipBranchManagement ?? envConfig.skipBranchManagement ?? false,
|
|
33
34
|
dangerouslySkipPermissions: cliConfig.dangerouslySkipPermissions ?? envConfig.dangerouslySkipPermissions ?? false,
|
|
35
|
+
printOutput: cliConfig.printOutput ?? envConfig.printOutput ?? false,
|
|
34
36
|
requirement: cliConfig.requirement ?? '',
|
|
35
37
|
adaptiveExecution: cliConfig.adaptiveExecution ?? envConfig.adaptiveExecution ?? false,
|
|
36
38
|
};
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ program
|
|
|
24
24
|
.option('--skip-branch-management', 'Skip smart branch management')
|
|
25
25
|
.option('--log <file>', 'Log output to file')
|
|
26
26
|
.option('--dangerously-skip-permissions', 'Pass flag to claude to skip permission prompts')
|
|
27
|
+
.option('-p, --print', 'Print Claude output (pass -p to claude CLI)')
|
|
27
28
|
.action(async (requirement, options) => {
|
|
28
29
|
// Check for updates (non-blocking, fails silently)
|
|
29
30
|
await checkForUpdates(pkg.name, pkg.version).catch(() => { });
|
|
@@ -37,6 +38,7 @@ program
|
|
|
37
38
|
skipBranchManagement: options.skipBranchManagement ?? undefined,
|
|
38
39
|
logFile: options.log ?? undefined,
|
|
39
40
|
dangerouslySkipPermissions: options.dangerouslySkipPermissions ?? undefined,
|
|
41
|
+
printOutput: options.print ?? undefined,
|
|
40
42
|
adaptiveExecution: options.adaptive ?? undefined,
|
|
41
43
|
};
|
|
42
44
|
const config = mergeConfig(envConfig, cliConfig);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "software-engineer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "CLI that automates the full dev workflow with Claude AI - implement, review, test, and commit code with a single command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"chalk": "^5.3.0",
|
|
35
|
-
"commander": "^12.1.0"
|
|
35
|
+
"commander": "^12.1.0",
|
|
36
|
+
"cross-spawn": "^7.0.6"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
39
|
+
"@types/cross-spawn": "^6.0.6",
|
|
38
40
|
"@types/node": "^20.11.0",
|
|
39
41
|
"typescript": "^5.3.3"
|
|
40
42
|
},
|