appsec-agent 0.0.1 → 0.0.2
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 +1 -1
- package/bin/agent-run.js +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/bin/agent-run.js
CHANGED
|
@@ -30,6 +30,8 @@ program
|
|
|
30
30
|
.option('-s, --src_dir <dir>', 'Project source code directory for code review agent - default to "src"')
|
|
31
31
|
.option('-o, --output_file <file>', 'Output file - default to "code_review_report.md"', 'code_review_report.md')
|
|
32
32
|
.option('-f, --output_format <format>', 'Output format - default to "markdown"', 'markdown')
|
|
33
|
+
.option('-k, --anthropic-api-key <key>', 'Anthropic API key (overrides ANTHROPIC_API_KEY environment variable)')
|
|
34
|
+
.option('-u, --anthropic-base-url <url>', 'Anthropic API base URL (overrides ANTHROPIC_BASE_URL environment variable)')
|
|
33
35
|
.option('-l, --list_roles', 'List all available roles')
|
|
34
36
|
.option('-v, --version', 'Program version')
|
|
35
37
|
.option('-V, --verbose', 'Verbose mode');
|
|
@@ -64,6 +66,14 @@ if (options.list_roles) {
|
|
|
64
66
|
process.exit(0);
|
|
65
67
|
}
|
|
66
68
|
|
|
69
|
+
// Set Anthropic API environment variables if provided via command line
|
|
70
|
+
if (options.anthropicApiKey) {
|
|
71
|
+
process.env.ANTHROPIC_API_KEY = options.anthropicApiKey;
|
|
72
|
+
}
|
|
73
|
+
if (options.anthropicBaseUrl) {
|
|
74
|
+
process.env.ANTHROPIC_BASE_URL = options.anthropicBaseUrl;
|
|
75
|
+
}
|
|
76
|
+
|
|
67
77
|
// Prepare args
|
|
68
78
|
const args = {
|
|
69
79
|
role: options.role,
|