rn-ai 0.0.9 → 0.1.1
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/README.md +1 -1
- package/cli.js +22 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@ Full stack mobile framework for building cross-platform mobile AI apps supportin
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- LLM support for [OpenAI](https://openai.com/) ChatGPT, [Anthropic](https://anthropic.com) Claude, [Cohere](https://cohere.com/) and Cohere Web
|
|
10
|
+
- An array of image models provided by [Fal.ai](https://www.fal.ai/)
|
|
10
11
|
- Image processing with [ByteScale](https://bytescale.com/)
|
|
11
12
|
- Real-time / streaming responses from all providers
|
|
12
|
-
- An array of image models provided by [Fal.ai](https://www.fal.ai/)
|
|
13
13
|
- OpenAI Assistants including code interpreter and retrieval
|
|
14
14
|
- Server proxy to easily enable authentication and authorization with auth provider of choice.
|
|
15
15
|
- Theming (comes out of the box with 4 themes) - easily add additional themes with just a few lines of code.
|
package/cli.js
CHANGED
|
@@ -77,6 +77,16 @@ async function main() {
|
|
|
77
77
|
]
|
|
78
78
|
})
|
|
79
79
|
|
|
80
|
+
let clientEnvs = `
|
|
81
|
+
EXPO_PUBLIC_ENV="DEVELOPMENT"
|
|
82
|
+
|
|
83
|
+
# Your development URL (localhost or ngrok)
|
|
84
|
+
EXPO_PUBLIC_DEV_API_URL="http://localhost:3050"
|
|
85
|
+
|
|
86
|
+
# Your production URL
|
|
87
|
+
EXPO_PUBLIC_PROD_API_URL="https://staging.example.com"
|
|
88
|
+
`
|
|
89
|
+
|
|
80
90
|
let envs = `
|
|
81
91
|
# environment, either PRODUCTION or DEVELOPMENT
|
|
82
92
|
ENVIRONMENT="PRODUCTION"
|
|
@@ -154,51 +164,54 @@ FAL_API_KEY="${fal_api_key}"
|
|
|
154
164
|
packageJson = JSON.stringify(packageObj2, null, 2)
|
|
155
165
|
fs.writeFileSync(`${appName}/app/package.json`, packageJson2)
|
|
156
166
|
fs.writeFileSync(`${appName}/server/.env`, envs)
|
|
167
|
+
fs.writeFileSync(`${appName}/app/.env`, clientEnvs)
|
|
157
168
|
|
|
158
169
|
process.chdir(path.join(process.cwd(), `${appName}/server`))
|
|
159
170
|
spinner.text = ''
|
|
160
|
-
let
|
|
171
|
+
let serverStartCommand = ''
|
|
161
172
|
|
|
162
173
|
if (isBunInstalled()) {
|
|
163
174
|
spinner.text = 'Installing server dependencies'
|
|
164
175
|
await execaCommand('bun install').pipeStdout(process.stdout)
|
|
165
176
|
spinner.text = ''
|
|
166
|
-
|
|
177
|
+
serverStartCommand = 'bun dev'
|
|
167
178
|
console.log('\n')
|
|
168
179
|
} else if (isYarnInstalled()) {
|
|
169
180
|
await execaCommand('yarn').pipeStdout(process.stdout)
|
|
170
|
-
|
|
181
|
+
serverStartCommand = 'yarn dev'
|
|
171
182
|
} else {
|
|
172
183
|
spinner.text = 'Installing server dependencies'
|
|
173
184
|
await execa('npm', ['install', '--verbose']).pipeStdout(process.stdout)
|
|
174
185
|
spinner.text = ''
|
|
175
|
-
|
|
186
|
+
serverStartCommand = 'npm run dev'
|
|
176
187
|
}
|
|
177
188
|
|
|
178
189
|
process.chdir('../')
|
|
179
190
|
process.chdir(path.join(process.cwd(), `app`))
|
|
180
191
|
|
|
181
192
|
spinner.text = ''
|
|
182
|
-
|
|
193
|
+
let appStartCommand = ''
|
|
183
194
|
|
|
184
195
|
if (isBunInstalled()) {
|
|
185
196
|
spinner.text = 'Installing app dependencies'
|
|
186
197
|
await execaCommand('bun install').pipeStdout(process.stdout)
|
|
187
198
|
spinner.text = ''
|
|
188
|
-
|
|
199
|
+
appStartCommand = 'bun start'
|
|
189
200
|
console.log('\n')
|
|
190
201
|
} else if (isYarnInstalled()) {
|
|
191
202
|
await execaCommand('yarn').pipeStdout(process.stdout)
|
|
192
|
-
|
|
203
|
+
appStartCommand = 'yarn start'
|
|
193
204
|
} else {
|
|
194
205
|
spinner.text = 'Installing app dependencies'
|
|
195
206
|
await execa('npm', ['install', '--verbose']).pipeStdout(process.stdout)
|
|
196
207
|
spinner.text = ''
|
|
197
|
-
|
|
208
|
+
appStartCommand = 'npm start'
|
|
198
209
|
}
|
|
199
210
|
spinner.stop()
|
|
211
|
+
process.chdir('../')
|
|
200
212
|
log(`${green.bold('Success!')} Created ${appName} at ${process.cwd()} \n`)
|
|
201
|
-
log(`To get started, change into the
|
|
213
|
+
log(`To get started, change into the server directory and run ${chalk.cyan(serverStartCommand)}\n`)
|
|
214
|
+
log(`In a separate terminal, change into the app directory and run ${chalk.cyan(appStartCommand)}`)
|
|
202
215
|
} catch (err) {
|
|
203
216
|
console.log('eror:', err)
|
|
204
217
|
log('\n')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rn-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Full stack mobile framework for building cross-platform mobile AI apps supporting image processing, real-time / streaming text and chat UIs, and image uploads with multiple service providers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "cli.js",
|