Update to set up arguments

This commit is contained in:
Raven Scott 2024-12-10 04:17:17 -05:00
parent d25d80d6fc
commit 81f10c7e44

View File

@ -102,7 +102,15 @@ function parseCommandsFromAIResponse(aiResponse) {
}
async function main() {
const goal = 'install apache2 (apache2) on the container and run it with service';
// Retrieve the goal from command-line arguments
const args = process.argv.slice(2);
const goal = args.join(' ').trim();
if (!goal) {
console.error("Usage: node script.js \"Your goal here\"");
process.exit(1);
}
let context = "Initial attempt. No commands have been run yet.\n" +
"We are working with a Debian/Ubuntu container.\n" +
"Goal: " + goal;