Blame Raw
· · · 21 lines (703 B)
0 contributors
1import process from 'node:process';
2import { setConfigFilePath } from './src/util.js';
3
4const userAccount = process.argv[2];
5const userPassword = process.argv[3];
6const configPath = './config.yaml';
7
8if (!userAccount) {
9 console.error('A tool for recovering lost SillyTavern accounts. Uses a "dataRoot" setting from config.yaml file.');
10 console.error('Usage: node recover.js [account] (password)');
11 console.error('Example: node recover.js admin password');
12 process.exit(1);
13}
14
15async function main() {
16 setConfigFilePath(configPath);
17 const { recoverPassword } = await import('./src/recover-password.js');
18 await recoverPassword(configPath, userAccount, userPassword);
19}
20
21main();