7 lines
331 B
JavaScript
7 lines
331 B
JavaScript
import fs from 'node:fs';
|
|
const [file, phrase, profile, tts] = Bare.argv.slice(2);
|
|
let config = {};
|
|
try { config = JSON.parse(fs.readFileSync(file, 'utf8')); } catch {}
|
|
Object.assign(config, { wakePhrase: phrase, modelProfile: profile, ttsEnabled: tts === 'true' });
|
|
fs.writeFileSync(file, JSON.stringify(config, null, 2) + '\n');
|