@llmnative/react 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js CHANGED
@@ -1,118 +1,118 @@
1
1
  #!/usr/bin/env node
2
-
3
- const path = require('path');
4
-
5
- const SCRIPT_PATH = '../scripts/cli';
6
- const [,, cmd] = process.argv;
7
- const args = process.argv.slice(3);
8
-
9
- function printGeneralHelp() {
10
- console.log(`
11
- LLM Native CLI
12
-
13
- Available commands:
14
-
15
- create - Generates a Vite + React project scaffold
16
- devtools - Generates Vite, TypeScript, and PostCSS config only
17
- version - Prints the installed @llmnative/react version
18
- help - Displays this help message
19
-
20
- Examples:
21
- npx @llmnative/react create
22
- npx @llmnative/react create --yes --provider=mock
23
- npx @llmnative/react create --yes --provider=mock --ai-provider=openai
24
- npx @llmnative/react create --yes --provider=mock --proxy-provider=viteDevProxy
25
- npx @llmnative/react create --help
26
- npx @llmnative/react devtools
27
- npx @llmnative/react version
28
- `);
29
- }
30
-
31
- function printCreateHelp() {
32
- console.log(`
33
- LLM Native create
34
-
35
- Usage:
36
- npx llmnative create
37
- npx llmnative create --yes --name=my-app --provider=mock
38
-
39
- Interactive prompts:
40
- project name
41
- data provider: firebase | supabase | mock | custom
42
- ai provider: none | openai | gemini | anthropic | mistral
43
- proxy provider: none | vite | express | nextjs-app | nextjs-pages | cloudflare
44
- icon provider: lucide | phosphor
45
- theme: default | flat | cyber
46
- provider credentials for Firebase, Supabase or the selected AI provider
47
-
48
- Options:
49
- --yes
50
- --reset
51
- --name=<name>
52
- --provider=<firebase|supabase|mock|custom>
53
- --ai-provider=<none|openai|gemini|anthropic|mistral>
54
- --proxy-provider=<none|vite|express|nextjs-app|nextjs-pages|cloudflare>
55
- --icon-provider=<lucide|phosphor>
56
- --theme=<default|flat|cyber>
57
- --hosting=<site|n>
58
- --firebase-api-key=<value>
59
- --firebase-auth-domain=<value>
60
- --firebase-database-url=<value>
61
- --firebase-project-id=<value>
62
- --firebase-storage-bucket=<value>
63
- --firebase-messaging-sender-id=<value>
64
- --firebase-app-id=<value>
65
- --firebase-measurement-id=<value>
66
- --google-client-id=<value>
67
- --supabase-url=<value>
68
- --supabase-anon-key=<value>
69
- --openai-api-key=<value>
70
- --openrouter-api-key=<value>
71
- --opencode-api-key=<value>
72
- --gemini-api-key=<value>
73
- --anthropic-api-key=<value>
74
- --deepseek-api-key=<value>
75
- --mistral-api-key=<value>
76
-
77
- Generated files:
78
- .env (filled with values from prompts/flags)
79
- .env.example (same structure, all values empty — commit this)
80
-
81
- Generated env variables:
82
- VITE_PROVIDER, VITE_AI_PROVIDER, VITE_ICON_PROVIDER, VITE_THEME
83
- VITE_PROXY_PROVIDER, VITE_PROXY_ENABLED (route is fixed: /api/proxy)
84
- VITE_FIREBASE_* (apikey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId, appId, measurementId)
85
- VITE_GOOGLE_CLIENT_ID, VITE_GOOGLE_SCOPE
86
- VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY
87
- VITE_DROPBOX_CLIENT_ID, VITE_DROPBOX_ROOT_PATH
88
- VITE_OPENAI_API_KEY, VITE_OPENROUTER_API_KEY, VITE_OPENCODE_API_KEY
89
- VITE_GEMINI_API_KEY, VITE_ANTHROPIC_API_KEY, VITE_DEEPSEEK_API_KEY, VITE_MISTRAL_API_KEY
90
- VITE_OPENAI_COMPATIBLE_BASE_URL, VITE_OPENAI_COMPATIBLE_API_KEY
91
- `);
92
- }
93
-
94
- switch (cmd) {
95
- case 'create':
96
- if (args.includes('--help') || args.includes('-h')) {
97
- printCreateHelp();
98
- } else {
99
- require(`${SCRIPT_PATH}/setup-project`).scaffoldProject();
100
- }
101
- break;
102
-
103
- case 'devtools':
104
- require(`${SCRIPT_PATH}/setup-devtools`).setupDevTools();
105
- break;
106
-
107
- case 'version':
108
- case '--version':
109
- case '-v':
110
- const pkg = require(path.join(__dirname, '../package.json'));
111
- console.log(`@llmnative/react version: ${pkg.version}`);
112
- break;
113
-
114
- case 'help':
115
- default:
116
- printGeneralHelp();
117
- break;
118
- }
2
+
3
+ const path = require('path');
4
+
5
+ const SCRIPT_PATH = '../scripts/cli';
6
+ const [,, cmd] = process.argv;
7
+ const args = process.argv.slice(3);
8
+
9
+ function printGeneralHelp() {
10
+ console.log(`
11
+ LLM Native CLI
12
+
13
+ Available commands:
14
+
15
+ create - Generates a Vite + React project scaffold
16
+ devtools - Generates Vite, TypeScript, and PostCSS config only
17
+ version - Prints the installed @llmnative/react version
18
+ help - Displays this help message
19
+
20
+ Examples:
21
+ npx @llmnative/react create
22
+ npx @llmnative/react create --yes --provider=mock
23
+ npx @llmnative/react create --yes --provider=mock --ai-provider=openai
24
+ npx @llmnative/react create --yes --provider=mock --proxy-provider=viteDevProxy
25
+ npx @llmnative/react create --help
26
+ npx @llmnative/react devtools
27
+ npx @llmnative/react version
28
+ `);
29
+ }
30
+
31
+ function printCreateHelp() {
32
+ console.log(`
33
+ LLM Native create
34
+
35
+ Usage:
36
+ npx llmnative create
37
+ npx llmnative create --yes --name=my-app --provider=mock
38
+
39
+ Interactive prompts:
40
+ project name
41
+ data provider: firebase | supabase | mock | custom
42
+ ai provider: none | openai | gemini | anthropic | mistral
43
+ proxy provider: none | vite | express | nextjs-app | nextjs-pages | cloudflare
44
+ icon provider: lucide | phosphor
45
+ theme: vscode-light-modern (default) | vscode-dark-modern | vscode-light-plus | vscode-dark-plus | tokyo-night-light | tokyo-night | default | flat | cyber
46
+ provider credentials for Firebase, Supabase or the selected AI provider
47
+
48
+ Options:
49
+ --yes
50
+ --reset
51
+ --name=<name>
52
+ --provider=<firebase|supabase|mock|custom>
53
+ --ai-provider=<none|openai|gemini|anthropic|mistral>
54
+ --proxy-provider=<none|vite|express|nextjs-app|nextjs-pages|cloudflare>
55
+ --icon-provider=<lucide|phosphor>
56
+ --theme=<vscode-light-modern|vscode-dark-modern|vscode-light-plus|vscode-dark-plus|tokyo-night-light|tokyo-night|default|flat|cyber>
57
+ --hosting=<site|n>
58
+ --firebase-api-key=<value>
59
+ --firebase-auth-domain=<value>
60
+ --firebase-database-url=<value>
61
+ --firebase-project-id=<value>
62
+ --firebase-storage-bucket=<value>
63
+ --firebase-messaging-sender-id=<value>
64
+ --firebase-app-id=<value>
65
+ --firebase-measurement-id=<value>
66
+ --google-client-id=<value>
67
+ --supabase-url=<value>
68
+ --supabase-anon-key=<value>
69
+ --openai-api-key=<value>
70
+ --openrouter-api-key=<value>
71
+ --opencode-api-key=<value>
72
+ --gemini-api-key=<value>
73
+ --anthropic-api-key=<value>
74
+ --deepseek-api-key=<value>
75
+ --mistral-api-key=<value>
76
+
77
+ Generated files:
78
+ .env (filled with values from prompts/flags)
79
+ .env.example (same structure, all values empty — commit this)
80
+
81
+ Generated env variables:
82
+ VITE_PROVIDER, VITE_AI_PROVIDER, VITE_ICON_PROVIDER, VITE_THEME
83
+ VITE_PROXY_PROVIDER, VITE_PROXY_ENABLED (route is fixed: /api/proxy)
84
+ VITE_FIREBASE_* (apikey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId, appId, measurementId)
85
+ VITE_GOOGLE_CLIENT_ID, VITE_GOOGLE_SCOPE
86
+ VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY
87
+ VITE_DROPBOX_CLIENT_ID, VITE_DROPBOX_ROOT_PATH
88
+ VITE_OPENAI_API_KEY, VITE_OPENROUTER_API_KEY, VITE_OPENCODE_API_KEY
89
+ VITE_GEMINI_API_KEY, VITE_ANTHROPIC_API_KEY, VITE_DEEPSEEK_API_KEY, VITE_MISTRAL_API_KEY
90
+ VITE_OPENAI_COMPATIBLE_BASE_URL, VITE_OPENAI_COMPATIBLE_API_KEY
91
+ `);
92
+ }
93
+
94
+ switch (cmd) {
95
+ case 'create':
96
+ if (args.includes('--help') || args.includes('-h')) {
97
+ printCreateHelp();
98
+ } else {
99
+ require(`${SCRIPT_PATH}/setup-project`).scaffoldProject();
100
+ }
101
+ break;
102
+
103
+ case 'devtools':
104
+ require(`${SCRIPT_PATH}/setup-devtools`).setupDevTools();
105
+ break;
106
+
107
+ case 'version':
108
+ case '--version':
109
+ case '-v':
110
+ const pkg = require(path.join(__dirname, '../package.json'));
111
+ console.log(`@llmnative/react version: ${pkg.version}`);
112
+ break;
113
+
114
+ case 'help':
115
+ default:
116
+ printGeneralHelp();
117
+ break;
118
+ }