UNPKG

gh-legacy

Version:

A powerful GitHub CLI tool for automatic repository ownership transfer to trusted beneficiaries after periods of inactivity

20 lines (16 loc) 514 B
// commands/init.js const fs = require('fs'); const path = require('path'); const CONFIG_PATH = path.join(__dirname, '../db.json'); exports.init = () => { if (fs.existsSync(CONFIG_PATH)) { console.log('⚠️ Already initialized.'); return; } const defaultConfig = { lastHeartbeat: new Date().toISOString(), beneficiaries: [] }; fs.writeFileSync(CONFIG_PATH, JSON.stringify(defaultConfig, null, 2)); console.log('✅ GitHub Legacy configuration initialized.'); };