import { Args, Command, Flags } from '@oclif/core';
import { newMonorepo } from '../../generator/handlers/monorepo.handler.js';
export default class New extends Command {
    static args = {
        name: Args.string({
            description: 'Name of the project to create.',
            required: true,
        }),
    };
    static description = 'Create a new Aurora monorepo project.';
    static examples = [
        '<%= config.bin %> new my-project',
        '<%= config.bin %> new my-project --force',
    ];
    static flags = {
        force: Flags.boolean({
            char: 'f',
            default: false,
            description: 'Overwrite existing directory.',
        }),
    };
    async run() {
        const { args, flags } = await this.parse(New);
        await newMonorepo(args.name, flags);
        this.log(`Project "${args.name}" created successfully.`);
    }
}
