tmrw-audit
Version:
tmrw audit: Your escape hatch from the cloud cage.
51 lines (50 loc) • 1.91 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const commander_1 = require("commander");
const scanner_1 = require("./scanner");
const report_1 = require("./report");
const dotenv_1 = __importDefault(require("dotenv"));
dotenv_1.default.config();
commander_1.program
.command('audit')
.description('Scan codebase for cloud lock-in vulnerabilities')
.action(async () => {
try {
const results = await (0, scanner_1.scanCodebase)(process.cwd());
console.log('AUDIT COMPLETE: YOUR INFRA’S FATE EXPOSED');
console.log(`Cloud Lock-in Vulnerability (CLV) Score: ${results.clvScore}/100 (${results.riskLabel})`);
console.log(`Vendor Lock-In: ${results.lockInScore.toFixed(1)}%`);
console.log(`Deplatforming Risk: ${results.deplatformingRisk}`);
console.log('Recommendations:\n- ' + results.recommendations.join('\n- '));
const reportPath = await (0, report_1.generateReport)(results);
console.log(`Report saved to: ${reportPath}`);
}
catch (err) {
console.error('Error:', err.message);
process.exit(1);
}
});
commander_1.program
.command('report [file]')
.description('View a saved report')
.action(async (file) => {
try {
await (0, report_1.displayReport)(file);
}
catch (err) {
console.error('Error:', err.message);
process.exit(1);
}
});
commander_1.program
.command('escape')
.description('Learn how to deploy the Sovereign Stack')
.action(() => {
console.log('Deploy the Sovereign Stack: https://tmrw.it/stack');
console.log('Follow the Escape Manifesto to build user-owned infrastructure.');
});
commander_1.program.parse(process.argv);