Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
fix: Add --version flag to CLI and fix Windows CI path issue
trohitg7351cd9581bf
diff --git a/.github/workflows/predeploy.yml b/.github/workflows/predeploy.ymlindex 9b6db6c6..ec3c660c 100644--- a/.github/workflows/predeploy.yml+++ b/.github/workflows/predeploy.yml@@ -193,7 +193,13 @@ jobs:if: runner.os == 'Windows'shell: pwshrun: |- $job = Start-Job -ScriptBlock { machinaos start }+ # Get the npm global bin path and pass it to the job+ $npmBin = npm prefix -g+ $job = Start-Job -ScriptBlock {+ param($binPath)+ $env:PATH = "$binPath;$env:PATH"+ machinaos start+ } -ArgumentList $npmBinStart-Sleep -Seconds 15# Check if backend is respondingdiff --git a/bin/cli.js b/bin/cli.jsindex 7c5dd5dd..350978ad 100644--- a/bin/cli.js+++ b/bin/cli.js@@ -3,8 +3,10 @@import { spawn, execSync } from 'child_process';import { dirname, resolve } from 'path';import { fileURLToPath } from 'url';+import { readFileSync } from 'fs';const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');+const PKG = JSON.parse(readFileSync(resolve(ROOT, 'package.json'), 'utf-8'));const COMMANDS = {start: 'Start the development server',@@ -16,6 +18,7 @@ const COMMANDS = {'docker:build': 'Build Docker images','docker:logs': 'View Docker logs',help: 'Show this help message',+ version: 'Show version number',};function printHelp() {@@ -114,6 +117,8 @@ const cmd = process.argv[2] || 'help';if (cmd === 'help' || cmd === '--help' || cmd === '-h') {printHelp();+} else if (cmd === 'version' || cmd === '--version' || cmd === '-v') {+ console.log(`machinaos v${PKG.version}`);} else if (cmd === 'start' || cmd === 'build') {checkDeps();run(cmd);