UNPKG

tat-optimize

Version:

🧿 Tat Tvam Asi CLI — Chakra Diagnostic, Healing & Optimization Tool powered by Multidimensional Consciousness Coding. Ideal for DevOps mystics, spiritual engineers, and agentic AI orchestration.

99 lines (79 loc) • 3.24 kB
#!/usr/bin/env node // tat-check.mjs 🧿 Chakra Alignment Diagnostic CLI (Multidimensional Holistic Completion) import fs from 'fs'; import path from 'path'; import chalk from 'chalk'; import ora from 'ora'; const FILE = '.tat-optimize'; const LOG_FILE = '.chakra.log'; const EXPORT_FILE = 'chakra-export.json'; const SNAPSHOT_FILE = '.chakra.snapshot.json'; const args = process.argv.slice(2); const chakraColors = { Muladhara: 'red', Svadhisthana: 'orange', Manipura: 'yellow', Anahata: 'green', Vishuddha: 'blue', Ajna: 'magenta', Sahasrara: 'cyan', 'Anahata (Human)': 'greenBright', 'Ajna (Ethics)': 'magentaBright', 'Sahasrara (Growth)': 'cyanBright' }; function logToFile(data) { const timestamp = new Date().toISOString(); const entry = `[${timestamp}] ${data}\n`; fs.appendFileSync(path.resolve(LOG_FILE), entry); } function exportChakrasToJSON(chakras) { const outputPath = path.resolve(EXPORT_FILE); fs.writeFileSync(outputPath, JSON.stringify(chakras, null, 2)); console.log(chalk.yellow(`\nšŸ“¦ Exported chakra data to ${EXPORT_FILE}`)); } function syncSnapshot(manifest) { const outputPath = path.resolve(SNAPSHOT_FILE); fs.writeFileSync(outputPath, JSON.stringify(manifest, null, 2)); console.log(chalk.blue(`\nšŸ’¾ Synced chakra snapshot to ${SNAPSHOT_FILE}`)); } function printChakraStatus(chakra, mode = 'diagnostic') { const { chakra: name, field, status } = chakra; const color = chakraColors[name] || 'white'; const label = chalk[color]?.(`šŸ”¹ ${name.padEnd(20)} → ${field.padEnd(28)}`) || `šŸ”¹ ${name.padEnd(20)} → ${field.padEnd(28)}`; const logStatus = (status === 'active') ? 'āœ… ACTIVE' : 'āš ļø INACTIVE'; logToFile(`${name} (${field}): ${logStatus}`); if (status === 'active') { console.log(`${label} ${chalk.green.bold(logStatus)}`); } else { console.log(`${label} ${chalk.red.bold(logStatus)}`); if (mode === 'heal') { console.log(chalk.green(` 🌿 Healing action: Apply mudra, chant bija mantra, and visualize ${name} blossoming.`)); } else { console.log(chalk.gray(` ✨ Affirmation: "I now activate the ${name} center for full-flow integration."`)); } } } async function runDiagnostic() { const spinner = ora('🌌 Scanning chakra alignment...').start(); try { const raw = fs.readFileSync(path.resolve(FILE), 'utf8'); const manifest = JSON.parse(raw); spinner.succeed('✨ Chakra scan complete!\n'); console.log(chalk.bold.cyan('\n🌌 Tat Tvam Asi — Chakra Optimization Diagnostic 🌌\n')); console.log(chalk.gray(`System: ${manifest.system} | Profile: ${manifest.profile}\n`)); const chakras = manifest.chakras || []; const mode = args.includes('--heal') ? 'heal' : 'diagnostic'; chakras.forEach(chakra => printChakraStatus(chakra, mode)); if (args.includes('--export')) { exportChakrasToJSON(chakras); } if (args.includes('--sync')) { syncSnapshot(manifest); } console.log(chalk.cyan('\n✨ Diagnostic complete. All chakras are now visible to the agents of flow.\n')); } catch (err) { spinner.fail('āŒ Failed to read .tat-optimize file.'); console.error(chalk.red(err.message)); } } runDiagnostic();