(
directory?: string,
options: CreateCommandOptions = {},
)
| 122 | } |
| 123 | |
| 124 | export async function createCommand( |
| 125 | directory?: string, |
| 126 | options: CreateCommandOptions = {}, |
| 127 | ): Promise<void> { |
| 128 | const workDir = directory ? path.resolve(directory) : process.cwd(); |
| 129 | |
| 130 | if (directory) { |
| 131 | fs.mkdirSync(workDir, { recursive: true }); |
| 132 | } |
| 133 | |
| 134 | // --config mode: initialize from remote/local skillpack.json |
| 135 | if (options.config) { |
| 136 | await initFromConfig(workDir, options.config); |
| 137 | return; |
| 138 | } |
| 139 | |
| 140 | // Interactive creation mode |
| 141 | await interactiveCreate(workDir); |
| 142 | } |
| 143 | |
| 144 | // --------------------------------------------------------------------------- |
| 145 | // --config mode (formerly init command) |
no test coverage detected