-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.ts
More file actions
41 lines (31 loc) · 1.13 KB
/
init.ts
File metadata and controls
41 lines (31 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import chalk from 'chalk';
import { BaseCommand } from '../common/base-command.js';
import { InitializeOrchestrator } from '../orchestrators/init.js';
import { Flags } from '@oclif/core';
export default class Init extends BaseCommand {
static strict = false;
static override description =
`A helper to quickly get started with Codify.
Use this command to automatically generate Codify configs based on
the currently installed system resources. By default, the new file
will be written to ${chalk.bold.bgMagenta(' ~/codify.jsonc ')}.
For more information, visit: https://codifycli.com/docs/commands/init`
static baseFlags= {
...BaseCommand.baseFlags,
includeSensitive: Flags.boolean({
description: 'Include sensitive resources in the generated configs.',
}),
}
static override examples = [
'<%= config.bin %> <%= command.id %>',
]
public async run(): Promise<void> {
const { flags } = await this.parse(Init)
await InitializeOrchestrator.run({
verbosityLevel: flags.debug ? 3 : 0,
path: flags.path,
includeSensitive: flags.includeSensitive,
},this.reporter);
process.exit(0)
}
}