Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions bin/aiox.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ USAGE:
npx aiox-core@latest info # Show system info
npx aiox-core@latest doctor # Run diagnostics
aiox-delegate codex -t <slug> # Delegate implementation to external executor
npx aiox-core@latest enterprise upgrade --target . --dry-run --enterprise-source <path>
# Plan Pro to Enterprise upgrade
npx aiox-core@latest --version # Show version
npx aiox-core@latest --version -d # Show detailed version info
npx aiox-core@latest --help # Show this help
Expand Down Expand Up @@ -110,6 +112,10 @@ EXTERNAL EXECUTION:
aiox-delegate codex -t story-4.3 -f prompt.md
aiox-delegate codex -t story-4.3 -p "Implement AC1" --dry-run

ENTERPRISE:
aiox enterprise upgrade --target . --enterprise-source /path/to/AIOX-enterprise --dry-run
aiox enterprise upgrade --target . --enterprise-source /path/to/AIOX-enterprise --dry-run --plan outputs/enterprise-upgrade-plan.yaml

EXAMPLES:
# Install in current directory
npx aiox-core@latest
Expand Down Expand Up @@ -415,6 +421,35 @@ async function runDoctor(options = {}) {
}
}

// Helper: Run Enterprise commands
async function runEnterprise() {
const enterpriseArgs = args.slice(1);
const enterprisePath = path.join(
__dirname,
'..',
'packages',
'installer',
'src',
'enterprise',
'enterprise-upgrade-plan.js',
);

try {
const { runEnterpriseUpgradeCli } = require(enterprisePath);
const exitCode = await runEnterpriseUpgradeCli(enterpriseArgs, {
stdout: process.stdout,
stderr: process.stderr,
});

if (exitCode !== 0) {
process.exit(exitCode);
}
} catch (error) {
console.error(`❌ Enterprise command error: ${error.message}`);
process.exit(1);
}
}

// Helper: Format bytes to human readable
function formatBytes(bytes) {
if (bytes === 0) return '0 Bytes';
Expand Down Expand Up @@ -884,6 +919,11 @@ async function main() {
}
break;

case 'enterprise':
// AIOX Enterprise Upgrade Planning - Story PEM.1
await runEnterprise();
break;

case 'install': {
// Install in current project with flag support
const installArgs = args.slice(1);
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
],
"exports": {
"./installer/aiox-core-installer": "./packages/installer/src/installer/aiox-core-installer.js",
"./installer/enterprise-detector": "./packages/installer/src/enterprise/enterprise-detector.js",
"./installer/enterprise-errors": "./packages/installer/src/enterprise/enterprise-errors.js",
"./installer/enterprise-manifest-loader": "./packages/installer/src/enterprise/enterprise-manifest-loader.js",
"./installer/enterprise-rollback": "./packages/installer/src/enterprise/enterprise-rollback.js",
"./installer/enterprise-upgrader": "./packages/installer/src/enterprise/enterprise-upgrader.js",
"./installer/enterprise-upgrade-plan": "./packages/installer/src/enterprise/enterprise-upgrade-plan.js",
"./installer/pro-scaffolder": "./packages/installer/src/pro/pro-scaffolder.js",
"./package.json": "./package.json"
},
Expand All @@ -60,6 +66,7 @@
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:e2e:installed-skills": "node scripts/e2e/installed-skills-smoke.js",
"test:e2e:pro-enterprise-upgrade": "node scripts/e2e/pro-to-enterprise-upgrade-smoke.js",
"test:health-check": "mocha tests/health-check/**/*.test.js --timeout 30000",
"lint": "eslint . --cache --cache-location .eslintcache",
"typecheck": "tsc --noEmit",
Expand Down
Loading
Loading