-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcli.js
More file actions
executable file
·38 lines (33 loc) · 665 Bytes
/
cli.js
File metadata and controls
executable file
·38 lines (33 loc) · 665 Bytes
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
#!/usr/bin/env node
import React from 'react';
import meow from 'meow';
import App from './app.js';
import Logo from './utils/logo.js';
import { render } from 'ink';
render(<Logo />, {patchConsole: false});
const cli = meow(
`Usage
$ magicc
Options
--setopenai, -s OpenAI API key
--delopenai, -d Delete OpenAI API key
--help Show help
--version Show version
Examples
$ magicc -s=sk-<api-key>
`,
{
importMeta: import.meta,
flags: {
setopenai: {
type: 'string',
alias: 's',
},
delopenai: {
type: 'boolean',
alias: 'd',
},
},
},
);
render(<App flags={cli.flags} />, {patchConsole: false});