story-weaver-ai
Version:
A narrative development system for AI-driven storytelling with Jungian psychology
35 lines (28 loc) • 877 B
JavaScript
/**
* Story Weaver Initializer
*
* @author Sean Pavlak
* @github https://github.com/seanpavlak/cursor-story-master
*
* Initializes a new Story Weaver project with Jungian psychology influences.
*/
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { spawn } from 'child_process';
// Get the directory path for the module
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Path to initialization script
const initScriptPath = resolve(__dirname, '../scripts/init.js');
// Get arguments passed to this script
const args = process.argv.slice(2);
// Spawn the init.js script with all args
const child = spawn('node', [initScriptPath, ...args], {
stdio: 'inherit',
cwd: process.cwd()
});
// Handle process exit
child.on('close', (code) => {
process.exit(code);
});