(name: string)
| 341 | } |
| 342 | |
| 343 | export async function getCommand(name: string): Promise<{ template: string }> { |
| 344 | const config = await getConfig(); |
| 345 | const cmd = config.command?.[name]; |
| 346 | if (!cmd) throw new Error('Command not found'); |
| 347 | return cmd; |
| 348 | } |
| 349 | |
| 350 | export async function saveCommand(name: string, template: string): Promise<void> { |
| 351 | const config = await getConfig(); |