mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-30 09:21:52 +00:00
feat(cli): enhance init output with config summary and dashboard link
- Updates `cmdInit` to output the Nostr hashtag, namespace, and a direct dashboard URL upon completion. - Refactors `createDashboardLinkFile` to return the generated URL for console output. - Ensures the initialization process provides clear next steps for both human users and agents. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
5783f995d7
commit
08d8407a7d
1 file changed
+7
-1
+7
-1
@@ -328,11 +328,16 @@ export async function cmdInit(force = false, cwd = process.cwd(), mockAnswers =
|
||||
installAppAssets(paths.torchDir, installDir);
|
||||
installTorchAssets(paths, installDir);
|
||||
configureTorch(cwd, paths, installDir, namespace, relays, hashtag);
|
||||
createDashboardLinkFile(paths, namespace, relays, hashtag);
|
||||
const dashboardUrl = createDashboardLinkFile(paths, namespace, relays, hashtag);
|
||||
injectHostScriptsIfNeeded(paths, installDir);
|
||||
|
||||
console.log('\nInitialization complete.');
|
||||
console.log('You can now customize the files in ' + path.relative(cwd, paths.torchDir) + '/');
|
||||
|
||||
console.log(`\n● From torch-config.json:`);
|
||||
console.log(`\n - Hashtag: ${hashtag}`);
|
||||
console.log(` - Namespace: ${namespace}\n`);
|
||||
console.log(dashboardUrl);
|
||||
}
|
||||
|
||||
function createDashboardLinkFile(paths, namespace, relays, hashtag) {
|
||||
@@ -358,6 +363,7 @@ To change these settings, edit \`torch-config.json\` in your project root.
|
||||
const filePath = path.join(paths.torchDir, 'TORCH_DASHBOARD.md');
|
||||
fs.writeFileSync(filePath, content, 'utf8');
|
||||
console.log(`Created ${path.relative(paths.root, filePath)}`);
|
||||
return dashboardUrl;
|
||||
}
|
||||
|
||||
function injectScriptsIntoHost(hostRoot, installDirName) {
|
||||
|
||||
Reference in new issue
Block a user